Move real UR5 Robot using ROS2 Humble.
- ROS2 Jazzy
- Universal_Robots_ROS2_Driver
sudo apt-get install ros-jazzy-ur
UR5 Path Planning and Execute Move UR5
Using Universal_Robots_ROS2_Driver for connect UR5 Robot to ROS2 system and Using MoveIt package for create path of UR5 Robot and execute path to move real UR5 Robot using MoveGroupInterface.
In Setup Robot -> Network -> Network detailed settings
IP address: 192.168.1.102
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.1
IP address: 192.168.1.101
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.1
ping 192.168.1.102if successful output is
# Output
PING 192.168.1.102 (192.168.1.102) 56(84) bytes of data.
64 bytes from 192.168.1.102: icmp_seq=1 ttl=64 time=0.153 ms
64 bytes from 192.168.1.102: icmp_seq=2 ttl=64 time=0.178 ms
64 bytes from 192.168.1.102: icmp_seq=3 ttl=64 time=0.183 ms
In UR5 program insert External Control and setup in Installation -> External Control
Host IP: 192.168.1.101 # Using PC IP address
Custom port: 50002 # Default in Driver
Host name: EXternal Control
Run this command in terminal
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5 robot_ip:=192.168.1.102if successful output is
# Output
[INFO] [spawner-7]: process has finished cleanly [pid 10600]
Robot position in Rviz is related to Real UR5 Robot.
Install project from this GitHub
git clone https://github.com/DenWaritthon/ur_move_ws.gitBuild and Source workspace
cd ur_move_ws/
colcon build
source install/setup.bashAdd source ~/ur_move_ws/install/setup.bash to .bashrc file.
echo "source ~/ur_move_ws/install/setup.bash" >> ~/.bashrc- launch UR Robot Driver for connect UR5 Robot.
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5 launch_rviz:=true robot_ip:=192.168.1.102- Run External Control Program In Teach Pendant if successful output in terminal is.
# Output
[ur_ros2_control_node-1] [INFO] [1741780162.100902189] [UR_Client_Library:]: Robot connected to reverse interface. Ready to receive control commands.- Launch MoveIt Config for control UR5 Robot.
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5 launch_rviz:=false- Run Target management node for get pick and place target and manage target to move UR5 Robot.
ros2 run ur5_management target_management.py- Run MoveIt controller node for control UR5 Robot.
ros2 run ur5_moveit ur5_moveit- Run Node for set dummy pick and place target to Target management node.
ros2 run ur5_management set_target.py- Call
/startservice for run UR5 Robot to pick-place with rqt or cli.
ros2 service call /start ur5_interfaces/srv/Start "start: true"
