UR ROS2 humble driver - Build error

Hello everyone,

This is my first post in this forum. Please excuse me for any mistakes. And I’m new to ROS.
I have installed following

  1. WSL2 (windows 11, GPU Nvidia RTX 4050, 32 GB Ram)
  2. Ubuntu-22.04
  3. ROS2 Humble

followed this UR github branch-Humble installation instructions : Universal_Robots_ROS2_Driver

I get this following build error

vemulapk@EMA-Surface-9:~/workspace/ros_ur_driver$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> ur_dashboard_msgs
Starting >>> ur_moveit_config
Finished <<< ur_moveit_config [0.43s]
Finished <<< ur_dashboard_msgs [0.46s]
Starting >>> ur_controllers
Finished <<< ur_controllers [0.27s]
Starting >>> ur_robot_driver
Starting >>> ur_bringup
Finished <<< ur_bringup [0.15s]
— stderr: ur_robot_driver
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/dashboard_client_ros.cpp: In constructor ‘ur_robot_driver::DashboardClientROS::DashboardClientROS(const SharedPtr&, const string&)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/dashboard_client_ros.cpp:55:40: error: ‘class urcl::primary_interface::PrimaryClient’ has no member named ‘getRobotVersion’
55 | auto robot_version = primary_client_.getRobotVersion();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In constructor ‘ur_robot_driver::RobotStateHelper::RobotStateHelper(const SharedPtr&)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:72:41: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘getRobotVersion’
72 | auto robot_version = primary_client_->getRobotVersion();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/dashboard_client_ros.cpp: In constructor ‘ur_robot_driver::DashboardClientROS::DashboardClientROS(const SharedPtr&, const string&)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/dashboard_client_ros.cpp:55:40: error: ‘class urcl::primary_interface::PrimaryClient’ has no member named ‘getRobotVersion’
55 | auto robot_version = primary_client_.getRobotVersion();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In constructor ‘ur_robot_driver::RobotStateHelper::RobotStateHelper(const SharedPtr&)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:72:41: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘getRobotVersion’
72 | auto robot_version = primary_client_->getRobotVersion();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::recoverFromSafety()’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:136:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandUnlockProtectiveStop’
136 | primary_client_->commandUnlockProtectiveStop();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::jumpToRobotMode(urcl::RobotMode)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:167:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandPowerOff’
167 | primary_client_->commandPowerOff();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:170:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandPowerOn’
170 | primary_client_->commandPowerOn();
| ^~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:173:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandBrakeRelease’
173 | primary_client_->commandBrakeRelease();
| ^~~~~~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::recoverFromSafety()’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:136:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandUnlockProtectiveStop’
136 | primary_client_->commandUnlockProtectiveStop();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::stopProgram()’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:264:22: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandStop’
264 | primary_client_->commandStop();
| ^~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::jumpToRobotMode(urcl::RobotMode)’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:167:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandPowerOff’
167 | primary_client_->commandPowerOff();
| ^~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:170:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandPowerOn’
170 | primary_client_->commandPowerOn();
| ^~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:173:26: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandBrakeRelease’
173 | primary_client_->commandBrakeRelease();
| ^~~~~~~~~~~~~~~~~~~
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp: In member function ‘bool ur_robot_driver::RobotStateHelper::stopProgram()’:
/home/vemulapk/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_robot_driver/src/robot_state_helper.cpp:264:22: error: ‘using element_type = class urcl::primary_interface::PrimaryClient’ {aka ‘class urcl::primary_interface::PrimaryClient’} has no member named ‘commandStop’
264 | primary_client_->commandStop();
| ^~~~~~~~~~~
gmake[2]: *** [CMakeFiles/ur_robot_driver_plugin.dir/build.make:76: CMakeFiles/ur_robot_driver_plugin.dir/src/dashboard_client_ros.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs…
gmake[2]: *** [CMakeFiles/dashboard_client.dir/build.make:76: CMakeFiles/dashboard_client.dir/src/dashboard_client_ros.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:176: CMakeFiles/dashboard_client.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
gmake[2]: *** [CMakeFiles/ur_robot_driver_plugin.dir/build.make:118: CMakeFiles/ur_robot_driver_plugin.dir/src/robot_state_helper.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:150: CMakeFiles/ur_robot_driver_plugin.dir/all] Error 2
gmake[2]: *** [CMakeFiles/robot_state_helper.dir/build.make:76: CMakeFiles/robot_state_helper.dir/src/robot_state_helper.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:254: CMakeFiles/robot_state_helper.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed <<< ur_robot_driver [7.90s, exited with code 2]

Summary: 4 packages finished [9.10s]
1 package failed: ur_robot_driver
1 package had stderr output: ur_robot_driver
2 packages not processed

Since you are running on WSL, I highly recommend to install the UR robot drivers for ROS2 via the Ubuntu’s apt install command. Here are more details:

sudo apt update
sudo apt install ros-humble-desktop

Check out the detailed instructions for all the steps that need to be done beforehand at: Ubuntu (deb packages) — ROS 2 Documentation: Humble documentation