UniversalRobots / Universal_Robots_ROS_Driver

Universal Robots ROS driver supporting CB3 and e-Series
Apache License 2.0
738 stars 396 forks source link

Unable to connect UR5e to a ROS machine due to scaled_pos_traj_controller failing to load #711

Closed Mechazo11 closed 1 month ago

Mechazo11 commented 1 month ago

Affected ROS Driver version(s)

2.1.5

Used ROS distribution.

Melodic

Which combination of platform is the ROS driver running on.

Linux without realtime patch

How is the UR ROS Driver installed.

Build both the ROS driver and UR Client Library from source

Which robot platform is the driver connected to.

UR E-series robot

Robot SW / URSim version(s)

5.11

How is the ROS driver used.

Others

Issue details

Summary

Short introduction to the issue and how it impact you and why

Hello,

We have a UR5e mounted on top of a RBKAIROS unit from Robotnik. Due to failure of scaled_pos_traj_controller to load and initialize, we cannot send commands to UR5e. We can only see its current state in Rviz via MoveIT.

Issue details

Network configurations

ROS_MASTER: 192.168.0.200
ROS Melodic (cannot be easily upgraded to Noetic)

UR5e IP: 192.168.0.210
Port: 50002
Polyscope 5.11

The src file contains many different modules. The UR packages are stored as shown

└── src/
    └── summit_xl_packages/
        └── manipulation/
            ├── universal_robot
            ├── Universal_Robots_Client_Library
            ├── Universal_Robots_ROS_Driver
            ├── Universal_Robots_ROS_passthrough_controllers
            └── Universal_Robots_ROS_scaled_controllers

Since Robotnik has tightly integrated the UR5e unit with their mobile base, the method of launching the ur driver is slightly different from the methods described in README.md. Here is the error we are getting in the console. The UR ros driver is launched using the following line

roslaunch summit_xl_bringup arm_complete.launch run_traj_control:=true

Then I follow the steps to turn on a program with the ExternalControl controller in UR5e`s computer via Polyscope. Then a console in RBKAIROS states Robot ready to receive control commands.

Steps to Reproduce

Unfortunately, the system is too complex for a simple example

Expected Behavior

Expected that speed_scaling_state_controller would load correctly and I will be then able to control the arm through MoveIT

Actual Behavior

MoveIT can see the current state of the arm. When any planning and execution is attempted it states failed due to relevant controllers not found.

How do I properly install scaled_pos_traj_controller and speed_scaling_state_controller so that I can control the arm?

Any help in solving this problem will be most appreciated.

Relevant log output

... logging to /home/robot/.ros/log/0602c616-42dd-11ef-83b5-3413e8cf97f7/roslaunch-SXLSK-210223AA-11804.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://SXLSK-210223AA:32797/

SUMMARY
========

PARAMETERS
 * /robot/arm/controller_stopper/consistent_controllers: ['joint_state_con...
 * /robot/arm/force_torque_sensor_controller/publish_rate: 125
 * /robot/arm/force_torque_sensor_controller/type: force_torque_sens...
 * /robot/arm/hardware_control_loop/loop_hz: 125
 * /robot/arm/joint_state_controller/publish_rate: 125
 * /robot/arm/joint_state_controller/type: joint_state_contr...
 * /robot/arm/pos_traj_controller/action_monitor_rate: 10
 * /robot/arm/pos_traj_controller/constraints/goal_time: 0.6
 * /robot/arm/pos_traj_controller/constraints/robot_arm_elbow_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_elbow_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/robot_arm_shoulder_lift_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_shoulder_lift_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/robot_arm_shoulder_pan_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_shoulder_pan_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_1_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_1_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_2_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_2_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_3_joint/goal: 0.1
 * /robot/arm/pos_traj_controller/constraints/robot_arm_wrist_3_joint/trajectory: 0.2
 * /robot/arm/pos_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /robot/arm/pos_traj_controller/joints: ['robot_arm_shoul...
 * /robot/arm/pos_traj_controller/state_publish_rate: 125
 * /robot/arm/pos_traj_controller/stop_trajectory_duration: 0.5
 * /robot/arm/pos_traj_controller/type: position_controll...
 * /robot/arm/scaled_pos_traj_controller/action_monitor_rate: 10
 * /robot/arm/scaled_pos_traj_controller/constraints/goal_time: 0.6
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_elbow_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_elbow_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_shoulder_lift_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_shoulder_lift_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_shoulder_pan_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_shoulder_pan_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_1_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_1_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_2_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_2_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_3_joint/goal: 0.1
 * /robot/arm/scaled_pos_traj_controller/constraints/robot_arm_wrist_3_joint/trajectory: 0.2
 * /robot/arm/scaled_pos_traj_controller/constraints/stopped_velocity_tolerance: 0.05
 * /robot/arm/scaled_pos_traj_controller/joints: ['robot_arm_shoul...
 * /robot/arm/scaled_pos_traj_controller/state_publish_rate: 125
 * /robot/arm/scaled_pos_traj_controller/stop_trajectory_duration: 0.5
 * /robot/arm/scaled_pos_traj_controller/type: position_controll...
 * /robot/arm/speed_scaling_state_controller/publish_rate: 125
 * /robot/arm/speed_scaling_state_controller/type: ur_controllers/Sp...
 * /robot/arm/ur_hardware_interface/headless_mode: False
 * /robot/arm/ur_hardware_interface/input_recipe_file: /home/robot/catki...
 * /robot/arm/ur_hardware_interface/joints: ['robot_arm_shoul...
 * /robot/arm/ur_hardware_interface/kinematics/forearm/pitch: -0.000582131310581
 * /robot/arm/ur_hardware_interface/kinematics/forearm/roll: 0.00105070338239
 * /robot/arm/ur_hardware_interface/kinematics/forearm/x: -0.425190756132
 * /robot/arm/ur_hardware_interface/kinematics/forearm/y: 0
 * /robot/arm/ur_hardware_interface/kinematics/forearm/yaw: -7.19055651207e-07
 * /robot/arm/ur_hardware_interface/kinematics/forearm/z: 0
 * /robot/arm/ur_hardware_interface/kinematics/hash: calib_17043176566...
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/pitch: 0
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/roll: 0
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/x: 0
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/y: 0
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/yaw: -4.02012865913e-08
 * /robot/arm/ur_hardware_interface/kinematics/shoulder/z: 0.162760406357
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/pitch: 0
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/roll: 1.57111058039
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/x: 0.000270038585262
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/y: 0
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/yaw: -4.05740805707e-06
 * /robot/arm/ur_hardware_interface/kinematics/upper_arm/z: 0
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/pitch: 0.000666877322099
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/roll: 0.00579767922874
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/x: -0.392373276527
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/y: -0.000774971902154
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/yaw: -4.18085587714e-06
 * /robot/arm/ur_hardware_interface/kinematics/wrist_1/z: 0.133667833023
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/pitch: 0
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/roll: 1.5697812866
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/x: 1.95486751335e-05
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/y: -0.0997006564869
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/yaw: -8.14211991287e-07
 * /robot/arm/ur_hardware_interface/kinematics/wrist_2/z: 0.000101200208252
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/pitch: 3.14159265359
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/roll: 1.57154621021
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/x: -4.00397444109e-05
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/y: 0.0995972297642
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/yaw: -3.14159228866
 * /robot/arm/ur_hardware_interface/kinematics/wrist_3/z: 7.46863249879e-05
 * /robot/arm/ur_hardware_interface/output_recipe_file: /home/robot/catki...
 * /robot/arm/ur_hardware_interface/reverse_port: 50001
 * /robot/arm/ur_hardware_interface/robot_ip: 192.168.0.210
 * /robot/arm/ur_hardware_interface/script_file: /home/robot/catki...
 * /robot/arm/ur_hardware_interface/script_sender_port: 50002
 * /robot/arm/ur_hardware_interface/tf_prefix: robot_
 * /robot/arm/ur_hardware_interface/tool_baud_rate: 115200
 * /robot/arm/ur_hardware_interface/tool_parity: 0
 * /robot/arm/ur_hardware_interface/tool_rx_idle_chars: 1.5
 * /robot/arm/ur_hardware_interface/tool_stop_bits: 1
 * /robot/arm/ur_hardware_interface/tool_tx_idle_chars: 3.5
 * /robot/arm/ur_hardware_interface/tool_voltage: 0
 * /robot/arm/ur_hardware_interface/use_tool_communication: False
 * /robot/joint_state_publisher_arm/source_list: ['joint_states', ...
 * /rosdistro: melodic
 * /rosversion: 1.14.13

NODES
  /robot/
    joint_state_publisher_arm (joint_state_publisher/joint_state_publisher)
  /robot/arm/
    controller_stopper (controller_stopper/node)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    ros_control_controller_spawner (controller_manager/spawner)
    ros_control_stopped_spawner (controller_manager/spawner)
    ur_hardware_interface (ur_robot_driver/ur_robot_driver_node)
  /robot/arm/ur_hardware_interface/
    ur_robot_state_helper (ur_robot_driver/robot_state_helper)

ROS_MASTER_URI=http://SXLSK-210223AA:11311

process[robot/arm/robot_state_publisher-1]: started with pid [11861]
process[robot/arm/ur_hardware_interface-2]: started with pid [11862]
process[robot/arm/ros_control_controller_spawner-3]: started with pid [11868]
process[robot/arm/ros_control_stopped_spawner-4]: started with pid [11879]
[ INFO] [1721070809.162121394]: Initializing dashboard client
[ INFO] [1721070809.169170535]: Connected: Universal Robots Dashboard Server

process[robot/arm/controller_stopper-5]: started with pid [11880]
[ INFO] [1721070809.186318956]: Initializing urdriver
[ WARN] [1721070809.187056121]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
process[robot/arm/ur_hardware_interface/ur_robot_state_helper-6]: started with pid [11881]
[ INFO] [1721070809.189918753]: Negotiated RTDE protocol version to 2.
[ INFO] [1721070809.190124257]: Setting up RTDE communication with frequency 500.000000
[ INFO] [1721070809.190132616]: Waiting for controller manager service to come up on /robot/arm/controller_manager/switch_controller
[ INFO] [1721070809.191384137]: waitForService: Service [/robot/arm/controller_manager/switch_controller] has not been advertised, waiting...
process[robot/joint_state_publisher_arm-7]: started with pid [11888]
[INFO] [1721070809.512470]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1721070809.526887]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1721070810.214562784]: Checking if calibration data matches connected robot.
[ INFO] [1721070811.244108827]: Calibration checked successfully.
[ WARN] [1721070811.278582720]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ INFO] [1721070811.278900083]: Loaded ur_robot_driver hardware_interface
[INFO] [1721070811.341275]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1721070811.343178]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1721070811.344949]: Loading controller: pos_traj_controller
[ INFO] [1721070811.353827859]: waitForService: Service [/robot/arm/controller_manager/switch_controller] is now available.
[ INFO] [1721070811.353852506]: Service available.
[ INFO] [1721070811.353866947]: Waiting for controller list service to come up on /robot/arm/controller_manager/list_controllers
[ INFO] [1721070811.354403369]: Service available.
[INFO] [1721070811.370978]: Controller Spawner: Loaded controllers: pos_traj_controller
[ INFO] [1721070811.474387669]: Robot's safety mode is now NORMAL
[ INFO] [1721070811.477090771]: Robot mode is now POWER_OFF
[INFO] [1721070811.627746]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1721070811.634498]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1721070811.640972]: Loading controller: joint_state_controller
[INFO] [1721070811.659403]: Loading controller: scaled_pos_traj_controller
[ERROR] [1721070811.674409834]: This controller requires a hardware interface of type 'ur_controllers::ScaledPositionJointInterface'. Make sure this is registered in the hardware_interface::RobotHW class.
[ERROR] [1721070811.674499442]: Initializing controller 'scaled_pos_traj_controller' failed
[ERROR] [1721070812.676216]: Failed to load scaled_pos_traj_controller
[INFO] [1721070812.680056]: Loading controller: speed_scaling_state_controller
[ERROR] [1721070812.690380665]: This controller requires a hardware interface of type 'ur_controllers::SpeedScalingInterface'. Make sure this is registered in the hardware_interface::RobotHW class.
[ERROR] [1721070812.690472386]: Initializing controller 'speed_scaling_state_controller' failed
[ERROR] [1721070813.692026]: Failed to load speed_scaling_state_controller
[INFO] [1721070813.699615]: Loading controller: force_torque_sensor_controller
[INFO] [1721070813.709140]: Controller Spawner: Loaded controllers: joint_state_controller, force_torque_sensor_controller
[INFO] [1721070813.714931]: Started controllers: joint_state_controller, force_torque_sensor_controller

Accept Public visibility

fmauch commented 1 month ago

Thank you for reporting this. We are sorry to hear that things don't work for you, as expected.

However, since your UR is tightly integrated into your system, as you wrote, there is not much we can provide in terms of debugging this without any further information.

As the error says:

[ERROR] [1721070811.674409834]: This controller requires a hardware interface of type 'ur_controllers::ScaledPositionJointInterface'. Make sure this is registered in the hardware_interface::RobotHW class.

Also, your parameters say:

/robot/arm/speed_scaling_state_controller/type: ur_controllers/Sp...

So, it seems you are loading the controller from the ur_controllers package which does not really exist anymore, as things have been migrated to its own package (which you seem to have checked out in your workspace, though).

Probably (and this is only guessing since I don't know your setup in detail), you'll need to update your controller.yaml file to make it similar to

https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/497af25ce530ae94a1af04556743e6d3df1eb014/ur_robot_driver/config/ur5e_controllers.yaml#L26-L28

Mechazo11 commented 1 month ago

Hi @fmauch

Thank you very much for pointing out the EOF of the ur_controllers. I will try to update the ur5e_controllers file to match the settings shown above.