Hi,
I have been using the UR driver with ROS 2 Humble. After some updates of ROS2 libraries, I am not able to run the “ros2 launch ur_robot_driver ur_control.launch.py” to connect to the robot via URCap which has been working over the past 10 months with no issue.
This manifests in two different ways. With the humble branch of the driver the ur_controllers package build fails.
‘’’
Starting >>> ur_dashboard_msgs
Starting >>> ur_description
Starting >>> ur_msgs
Starting >>> ur_client_library
Finished <<< ur_description [0.86s]
Starting >>> ur_moveit_config
Finished <<< ur_client_library [1.13s]
Finished <<< ur_moveit_config [1.35s]
Finished <<< ur_msgs [2.33s]
Finished <<< ur_dashboard_msgs [4.75s]
Starting >>> ur_controllers
— stderr: ur_controllers
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp: In lambda function:
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:98:9: error: ‘joints_angle_wraparound_’ was not declared in this scope
98 | if (joints_angle_wraparound_[index]) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp: In member function ‘virtual controller_interface::return_type ur_controllers::ScaledJointTrajectoryController::update(const rclcpp::Time&, const rclcpp::Duration&)’:
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:120:55: error: ‘rt_has_pending_goal_’ was not declared in this scope
120 | if (current_external_msg != new_external_msg && ((rt_has_pending_goal_.readFromRT()) && !active_goal) == false) {
| ^~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:137:3: error: ‘read_state_from_state_interfaces’ was not declared in this scope; did you mean ‘read_state_from_command_interfaces’?
137 | read_state_from_state_interfaces(state_current_);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| read_state_from_command_interfaces
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:140:7: error: ‘has_active_trajectory’ was not declared in this scope
140 | if (has_active_trajectory()) {
| ^~~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:184:35: error: ‘rt_is_holding_’ was not declared in this scope
184 | if (!before_last_point && *(rt_is_holding_.readFromRT()) == false && cmd_timeout_ > 0.0 &&
| ^~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:184:76: error: ‘cmd_timeout_’ was not declared in this scope
184 | if (!before_last_point && *(rt_is_holding_.readFromRT()) == false && cmd_timeout_ > 0.0 &&
| ^~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:189:62: error: invalid use of void expression
189 | traj_msg_external_point_ptr_.initRT(set_hold_position());
| ~^~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:200:15: error: ‘rt_is_holding_’ was not declared in this scope
200 | *(rt_is_holding_.readFromRT()) == false) {
| ^~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:207:15: error: ‘rt_is_holding_’ was not declared in this scope
207 | *(rt_is_holding_.readFromRT()) == false) {
| ^~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:270:11: error: ‘rt_has_pending_goal_’ was not declared in this scope
270 | rt_has_pending_goal_.writeFromNonRT(false);
| ^~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:275:64: error: invalid use of void expression
275 | traj_msg_external_point_ptr_.initRT(set_hold_position());
| ~^~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:284:13: error: ‘rt_has_pending_goal_’ was not declared in this scope
284 | rt_has_pending_goal_.writeFromNonRT(false);
| ^~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:289:49: error: ‘set_success_trajectory_point’ was not declared in this scope
289 | traj_msg_external_point_ptr_.initRT(set_success_trajectory_point());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:297:13: error: ‘rt_has_pending_goal_’ was not declared in this scope
297 | rt_has_pending_goal_.writeFromNonRT(false);
| ^~~~~~~~~~~~~~~~~~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:303:66: error: invalid use of void expression
303 | traj_msg_external_point_ptr_.initRT(set_hold_position());
| ~^~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:306:55: error: ‘rt_has_pending_goal_’ was not declared in this scope
306 | } else if (tolerance_violated_while_moving && *(rt_has_pending_goal_.readFromRT()) == false) {
| ^~~~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:311:62: error: invalid use of void expression
311 | traj_msg_external_point_ptr_.initRT(set_hold_position());
| ~~~~~~~~~~~~~~~~~^~
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:316:62: error: invalid use of void expression
316 | traj_msg_external_point_ptr_.initRT(set_hold_position());
| ~~~~~~~~~~~~~~~~~^~
gmake[2]: *** [CMakeFiles/ur_controllers.dir/build.make:76: CMakeFiles/ur_controllers.dir/src/scaled_joint_trajectory_controller.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs…
gmake[1]: *** [CMakeFiles/Makefile2:223: CMakeFiles/ur_controllers.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:200:15: error: ‘rt_is_holding_’ was not declared in this scope
200 | *(rt_is_holding_.readFromRT()) == false) {
| ^
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:207:15: error: ‘rt_is_holding_’ was not declared in this scope
207 | *(rt_is_holding_.readFromRT()) == false) {
| ^
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:284:13: error: ‘rt_has_pending_goal_’ was not declared in this scope
284 | rt_has_pending_goal_.writeFromNonRT(false);
| ^
/home/francesco/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:306:55: error: ‘rt_has_pending_goal_’ was not declared in this scope
306 | } else if (tolerance_violated_while_moving && *(rt_has_pending_goal_.readFromRT()) == false) {
| ^
Failed <<< ur_controllers [13.2s, exited with code 2]
Summary: 5 packages finished [19.5s]
1 package failed: ur_controllers
1 package had stderr output: ur_controllers
4 packages not processed
‘’’
If I roll back to branch 657c035, the build is successful. However, when I try to run the launch file mentioned before, this error is returned.
‘’’
[INFO] [launch]: All log files can be found below /home/francesco/.ros/log/2024-01-08-18-57-54-705269-francesco-ThinkPad-P53-63192
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [dashboard_client-2]: process started with pid [63197]
[INFO] [controller_stopper_node-3]: process started with pid [63199]
[INFO] [ur_ros2_control_node-1]: process started with pid [63195]
[INFO] [robot_state_publisher-4]: process started with pid [63201]
[INFO] [spawner-5]: process started with pid [63203]
[INFO] [spawner-6]: process started with pid [63205]
[INFO] [spawner-7]: process started with pid [63207]
[INFO] [spawner-8]: process started with pid [63209]
[INFO] [spawner-9]: process started with pid [63211]
[INFO] [spawner-10]: process started with pid [63213]
[controller_stopper_node-3] [INFO] [1704740275.460835212] [Controller stopper]: Waiting for switch controller service to come up on controller_manager/switch_controller
[ur_ros2_control_node-1] [WARN] [1704740275.476935181] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use ‘~/robot_description’ topic from ‘robot_state_publisher’ instead.
[ur_ros2_control_node-1] text not specified in the tf_prefix tag
[ur_ros2_control_node-1] [INFO] [1704740275.477944664] [resource_manager]: Loading hardware ‘ur5e’
[ur_ros2_control_node-1] [INFO] [1704740275.481917416] [resource_manager]: Initialize hardware ‘ur5e’
[ur_ros2_control_node-1] [INFO] [1704740275.482800448] [resource_manager]: Successful initialization of hardware ‘ur5e’
[ur_ros2_control_node-1] terminate called after throwing an instance of ‘std::runtime_error’
[ur_ros2_control_node-1] what(): Wrong state or command interface configuration.
[ur_ros2_control_node-1] missing state interfaces:
[ur_ros2_control_node-1]
[ur_ros2_control_node-1] missing command interfaces:
[ur_ros2_control_node-1] ’ hand_back_control/hand_back_control_cmd ’ ’ hand_back_control/hand_back_control_async_success ’ ’ force_mode/task_frame_x ’ ’ force_mode/task_frame_y ’ ’ force_mode/task_frame_z ’ ’ force_mode/task_frame_rx ’ ’ force_mode/task_frame_ry ’ ’ force_mode/task_frame_rz ’ ’ force_mode/selection_vector_x ’ ’ force_mode/selection_vector_y ’ ’ force_mode/selection_vector_z ’ ’ force_mode/selection_vector_rx ’ ’ force_mode/selection_vector_ry ’ ’ force_mode/selection_vector_rz ’ ’ force_mode/wrench_x ’ ’ force_mode/wrench_y ’ ’ force_mode/wrench_z ’ ’ force_mode/wrench_rx ’ ’ force_mode/wrench_ry ’ ’ force_mode/wrench_rz ’ ’ force_mode/limits_x ’ ’ force_mode/limits_y ’ ’ force_mode/limits_z ’ ’ force_mode/limits_rx ’ ’ force_mode/limits_ry ’ ’ force_mode/limits_rz ’ ’ force_mode/type ’ ’ force_mode/disable_cmd ’ ’ force_mode/force_mode_async_success ’ ’ force_mode/damping ’ ’ force_mode/gain_scaling ’
[robot_state_publisher-4] [INFO] [1704740275.484414143] [robot_state_publisher]: got segment base
[robot_state_publisher-4] [INFO] [1704740275.484555236] [robot_state_publisher]: got segment base_link
[robot_state_publisher-4] [INFO] [1704740275.484569697] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-4] [INFO] [1704740275.484577632] [robot_state_publisher]: got segment flange
[robot_state_publisher-4] [INFO] [1704740275.484584711] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-4] [INFO] [1704740275.484592052] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-4] [INFO] [1704740275.484599170] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-4] [INFO] [1704740275.484606129] [robot_state_publisher]: got segment tool0
[robot_state_publisher-4] [INFO] [1704740275.484613201] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-4] [INFO] [1704740275.484620159] [robot_state_publisher]: got segment world
[robot_state_publisher-4] [INFO] [1704740275.484627078] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-4] [INFO] [1704740275.484633995] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-4] [INFO] [1704740275.484640825] [robot_state_publisher]: got segment wrist_3_link
[ERROR] [ur_ros2_control_node-1]: process has died [pid 63195, exit code -6, cmd ‘/home/francesco/workspace/ros_ur_driver/install/ur_robot_driver/lib/ur_robot_driver/ur_ros2_control_node --ros-args --params-file /tmp/launch_params_989deozy --params-file /home/francesco/workspace/ros_ur_driver/install/ur_robot_driver/share/ur_robot_driver/config/ur5e_update_rate.yaml --params-file /home/francesco/workspace/ros_ur_driver/install/ur_robot_driver/share/ur_robot_driver/config/ur_controllers.yaml’].
[spawner-5] [INFO] [1704740277.964862287] [spawner_scaled_joint_trajectory_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-7] [INFO] [1704740277.981028540] [spawner_io_and_status_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-10] [INFO] [1704740277.985997715] [spawner_forward_position_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-6] [INFO] [1704740278.062972622] [spawner_joint_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-8] [INFO] [1704740278.063045355] [spawner_speed_scaling_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-9] [INFO] [1704740278.065889394] [spawner_force_torque_sensor_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1704740279.985584566] [spawner_scaled_joint_trajectory_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-7] [INFO] [1704740280.002898424] [spawner_io_and_status_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-10] [INFO] [1704740280.007053207] [spawner_forward_position_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-6] [INFO] [1704740280.082569786] [spawner_joint_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-8] [INFO] [1704740280.082573025] [spawner_speed_scaling_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-9] [INFO] [1704740280.088028493] [spawner_force_torque_sensor_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1704740282.004371136] [spawner_scaled_joint_trajectory_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-7] [INFO] [1704740282.022285576] [spawner_io_and_status_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-10] [INFO] [1704740282.027363568] [spawner_forward_position_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-8] [INFO] [1704740282.099723179] [spawner_speed_scaling_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-6] [INFO] [1704740282.099724503] [spawner_joint_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-9] [INFO] [1704740282.105578621] [spawner_force_torque_sensor_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [INFO] [1704740284.024549298] [spawner_scaled_joint_trajectory_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-7] [INFO] [1704740284.041840919] [spawner_io_and_status_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-10] [INFO] [1704740284.047064358] [spawner_forward_position_controller]: Waiting for ‘/controller_manager’ node to exist
[spawner-8] [INFO] [1704740284.119854287] [spawner_speed_scaling_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-6] [INFO] [1704740284.119856117] [spawner_joint_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-9] [INFO] [1704740284.125656940] [spawner_force_torque_sensor_broadcaster]: Waiting for ‘/controller_manager’ node to exist
[spawner-5] [ERROR] [1704740286.045951135] [spawner_scaled_joint_trajectory_controller]: Controller manager not available
[spawner-7] [ERROR] [1704740286.062008806] [spawner_io_and_status_controller]: Controller manager not available
[spawner-10] [ERROR] [1704740286.066526495] [spawner_forward_position_controller]: Controller manager not available
[spawner-6] [ERROR] [1704740286.139648207] [spawner_joint_state_broadcaster]: Controller manager not available
[spawner-8] [ERROR] [1704740286.139653220] [spawner_speed_scaling_state_broadcaster]: Controller manager not available
[spawner-9] [ERROR] [1704740286.145425836] [spawner_force_torque_sensor_broadcaster]: Controller manager not available
[ERROR] [spawner-5]: process has died [pid 63203, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner scaled_joint_trajectory_controller -c /controller_manager --controller-manager-timeout 10 --ros-args’].
[ERROR] [spawner-7]: process has died [pid 63207, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner io_and_status_controller --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args’].
[ERROR] [spawner-10]: process has died [pid 63213, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner forward_position_controller --controller-manager /controller_manager --controller-manager-timeout 10 --inactive --ros-args’].
[ERROR] [spawner-8]: process has died [pid 63209, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner speed_scaling_state_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args’].
[ERROR] [spawner-6]: process has died [pid 63205, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args’].
[ERROR] [spawner-9]: process has died [pid 63211, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner force_torque_sensor_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args’].
‘’’
I have found a similar post from last May here. I have reproduced thee suggesteed workarounds, but nothing changed.
I would be very grateful if anyone could provide any suggestions to make this work back. This has happened in the most inconvenient of times for me, as we are about to run a user study with the UR5e very soon. Any help is appreciated.
Francesco