This package launches the UR20 teleoperation stack with one ROS 2 launch file.
Source the ROS 2 Humble environment and make sure the workspace dependencies are installed:
source /opt/ros/humble/setup.bash
cd /home/glahr/ros/teleop_ws
rosdep install --from-paths src --ignore-src -r -yThe workspace must contain these packages:
ur20_teleop- this packageros2_robotiqgripper- the Robotiq gripper serverjoy- the joystick driver
A joystick must be connected for joy_node to publish joystick messages. The gripper server also requires a Robotiq gripper reachable at 192.168.1.102.
Build the package from the workspace root:
cd /home/glahr/ros/teleop_ws
source /opt/ros/humble/setup.bash
colcon build --packages-select ur20_teleop
source install/setup.bashIf the ros2_robotiqgripper package is part of this workspace and has changed, rebuild the workspace or build that package as well.
cd /home/glahr/ros/teleop_ws
source /opt/ros/humble/setup.bash
source install/setup.bash
ros2 launch ur20_teleop teleop.launch.pyThe launch file is installed by the ur20_teleop package, so the launch command uses ur20_teleop as its package name.
| Launch entry | ROS 2 package | Executable | Purpose |
|---|---|---|---|
robotiq_gripper_server |
ros2_robotiqgripper |
server.py |
Starts the Robotiq gripper service server and sets its IPAddress parameter to 192.168.1.102. |
joy_node |
joy |
joy_node |
Reads the connected joystick and publishes sensor_msgs/msg/Joy messages on /joy. |
ur20_teleop |
ur20_teleop |
ur20_teleop |
Runs the C++ UR20 teleoperation node. It reads joystick and joint-state data, receives /robot_description, calculates joint velocities, publishes commands, and calls the gripper service. |
The C++ executable is called ur20_teleop. The node created by that executable is named ur20_cpp_teleop; these are different names.
The C++ teleoperation node:
- subscribes to
/joy - subscribes to
/joint_states - subscribes to
/robot_description - publishes joint velocity commands on
/forward_velocity_controller/commands - calls the
Robotiq_Gripperservice provided byros2_robotiqgripper
A running robot driver or simulation must provide /joint_states, /robot_description, and the controller that consumes /forward_velocity_controller/commands.
If the gripper server reports an error while parsing GET FLT, check that:
- The gripper is powered and connected.
192.168.1.102is the correct IP address.- The gripper accepts the expected socket protocol at its configured port.
- The gripper server can be run independently and communicate with the hardware.
The launch file only passes the IP address parameter; it does not configure the gripper hardware or the robot driver.
ros2 pkg prefix ur20_teleop
ros2 pkg executables ur20_teleopThe package should list the ur20_teleop executable after a successful build, and the launch file should be under the package's installed share/ur20_teleop/launch directory.
Press Ctrl+C in the terminal running the launch file. This shuts down all three nodes started by the launch description.