You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently facing an issue where my UR10 robot is not moving as expected when using ROS2 Humble with the forward_velocity_controller. Below is a detailed description of the problem, setup, and troubleshooting steps I have taken.
Setup Details:
Robot Model: UR10
ROS2 Version: Humble
UR ROS2 Driver Package: ur_robot_driver
Operating System: Ubuntu 22.04
URCap installed on robot: Yes (Verified working)
Steps Performed:
Successfully connected the UR10 robot to my ROS2 system using the command: ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10 robot_ip:=192.168.0.100
[INFO] [launch]: All log files can be found below /home/ur10/.ros/log/2024-10-11-10-53-16-247202-ur10-4964
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [dashboard_client-2]: process started with pid [4968]
[INFO] [controller_stopper_node-3]: process started with pid [4970]
[INFO] [ur_ros2_control_node-1]: process started with pid [4966]
[INFO] [urscript_interface-4]: process started with pid [4972]
[INFO] [robot_state_publisher-5]: process started with pid [4974]
[INFO] [rviz2-6]: process started with pid [4976]
[INFO] [spawner-7]: process started with pid [4978]
[INFO] [spawner-8]: process started with pid [4980]
[INFO] [spawner-9]: process started with pid [4982]
[dashboard_client-2] [INFO] [1728611596.687380269] [UR_Client_Library:]: Connected: Universal Robots Dashboard Server
[dashboard_client-2]
[controller_stopper_node-3] [INFO] [1728611596.688876008] [Controller stopper]: Waiting for switch controller service to come up on controller_manager/switch_controller
[rviz2-6] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[robot_state_publisher-5] [INFO] [1728611596.697821643] [robot_state_publisher]: got segment base
[robot_state_publisher-5] [INFO] [1728611596.697928392] [robot_state_publisher]: got segment base_link
[robot_state_publisher-5] [INFO] [1728611596.697942278] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-5] [INFO] [1728611596.697949649] [robot_state_publisher]: got segment flange
[robot_state_publisher-5] [INFO] [1728611596.697956204] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-5] [INFO] [1728611596.697962814] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-5] [INFO] [1728611596.697969474] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-5] [INFO] [1728611596.697975955] [robot_state_publisher]: got segment tool0
[robot_state_publisher-5] [INFO] [1728611596.697982446] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-5] [INFO] [1728611596.698004825] [robot_state_publisher]: got segment world
[robot_state_publisher-5] [INFO] [1728611596.698051793] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-5] [INFO] [1728611596.698059689] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-5] [INFO] [1728611596.698065915] [robot_state_publisher]: got segment wrist_3_link
[ur_ros2_control_node-1] [WARN] [1728611596.700538345] [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] [1728611596.700965663] [resource_manager]: Loading hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611596.704154838] [resource_manager]: Initialize hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611596.704221002] [resource_manager]: Successful initialization of hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611596.704360965] [resource_manager]: 'configure' hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611596.704372179] [URPositionHardwareInterface]: Starting ...please wait...
[ur_ros2_control_node-1] [INFO] [1728611596.704382914] [URPositionHardwareInterface]: Initializing driver...
[ur_ros2_control_node-1] [WARN] [1728611596.704986498] [UR_Client_Library:]: 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.
[ur_ros2_control_node-1] [INFO] [1728611596.814544266] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1728611596.814806592] [UR_Client_Library:]: Setting up RTDE communication with frequency 125.000000
[spawner-7] [INFO] [1728611596.935520567] [spawner_scaled_joint_trajectory_controller]: waiting for service /controller_manager/list_controllers to become available...
[spawner-9] [INFO] [1728611596.935605627] [spawner_forward_position_controller]: waiting for service /controller_manager/list_controllers to become available...
[spawner-8] [INFO] [1728611596.945182652] [spawner_joint_state_broadcaster]: waiting for service /controller_manager/list_controllers to become available...
[rviz2-6] [INFO] [1728611597.187779596] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-6] [INFO] [1728611597.187974736] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-6] [INFO] [1728611597.202802918] [rviz2]: Stereo is NOT SUPPORTED
[ur_ros2_control_node-1] [INFO] [1728611597.890879505] [URPositionHardwareInterface]: Calibration checksum: 'calib_17227329492635474227'.
[ur_ros2_control_node-1] [ERROR] [1728611598.966232571] [URPositionHardwareInterface]: The calibration parameters of the connected robot don't match the ones from the given kinematics config file. Please be aware that this can lead to critical inaccuracies of tcp positions. Use the ur_calibration tool to extract the correct calibration from the robot and pass that into the description. See [https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/main/ur_calibration/README.md] for details.
[ur_ros2_control_node-1] [INFO] [1728611598.966394492] [URPositionHardwareInterface]: System successfully started!
[ur_ros2_control_node-1] [INFO] [1728611598.966446370] [resource_manager]: Successful 'configure' of hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611598.966580039] [resource_manager]: 'activate' hardware 'ur10'
[ur_ros2_control_node-1] [INFO] [1728611598.966603135] [URPositionHardwareInterface]: Activating HW interface
[ur_ros2_control_node-1] [INFO] [1728611598.966621277] [resource_manager]: Successful 'activate' of hardware 'ur10'
[controller_stopper_node-3] [INFO] [1728611598.973696535] [Controller stopper]: Service available
[controller_stopper_node-3] [INFO] [1728611598.973717278] [Controller stopper]: Waiting for list controllers service to come up on controller_manager/list_controllers
[controller_stopper_node-3] [INFO] [1728611598.973733916] [Controller stopper]: Service available
[ur_ros2_control_node-1] [WARN] [1728611598.975350499] [controller_manager]: Could not enable FIFO RT scheduling policy
[ur_ros2_control_node-1] [WARN] [1728611598.975435969] [UR_Client_Library:]: 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.
[ur_ros2_control_node-1] [INFO] [1728611599.196284873] [controller_manager]: Loading controller 'scaled_joint_trajectory_controller'
[ur_ros2_control_node-1] [WARN] [1728611599.213328905] [scaled_joint_trajectory_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[ur_ros2_control_node-1] [INFO] [1728611599.215854672] [controller_manager]: Loading controller 'forward_position_controller'
[spawner-7] [INFO] [1728611599.216400565] [spawner_scaled_joint_trajectory_controller]: Loaded scaled_joint_trajectory_controller
[ur_ros2_control_node-1] [INFO] [1728611599.223870344] [controller_manager]: Loading controller 'joint_state_broadcaster'
[spawner-9] [INFO] [1728611599.224462822] [spawner_forward_position_controller]: Loaded forward_position_controller
[ur_ros2_control_node-1] [INFO] [1728611599.231636190] [controller_manager]: Configuring controller 'scaled_joint_trajectory_controller'
[ur_ros2_control_node-1] [INFO] [1728611599.231791066] [scaled_joint_trajectory_controller]: No specific joint names are used for command interfaces. Using 'joints' parameter.
[ur_ros2_control_node-1] [INFO] [1728611599.231810116] [scaled_joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[ur_ros2_control_node-1] [INFO] [1728611599.231831840] [scaled_joint_trajectory_controller]: Using 'splines' interpolation method.
[spawner-8] [INFO] [1728611599.232221564] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1728611599.233382031] [scaled_joint_trajectory_controller]: Controller state will be published at 100.00 Hz.
[ur_ros2_control_node-1] [INFO] [1728611599.235909350] [scaled_joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[ur_ros2_control_node-1] [INFO] [1728611599.239651124] [controller_manager]: Configuring controller 'forward_position_controller'
[ur_ros2_control_node-1] [INFO] [1728611599.240111548] [forward_position_controller]: configure successful
[ur_ros2_control_node-1] [INFO] [1728611599.247630163] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[ur_ros2_control_node-1] [INFO] [1728611599.247705077] [joint_state_broadcaster]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[spawner-7] [INFO] [1728611599.272119034] [spawner_scaled_joint_trajectory_controller]: Configured and activated scaled_joint_trajectory_controller
[spawner-8] [INFO] [1728611599.288095478] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1728611599.289594783] [controller_manager]: Loading controller 'io_and_status_controller'
[spawner-8] [INFO] [1728611599.296139415] [spawner_joint_state_broadcaster]: Loaded io_and_status_controller
[ur_ros2_control_node-1] [INFO] [1728611599.296731289] [controller_manager]: Configuring controller 'io_and_status_controller'
[spawner-8] [INFO] [1728611599.320112563] [spawner_joint_state_broadcaster]: Configured and activated io_and_status_controller
[ur_ros2_control_node-1] [INFO] [1728611599.322040180] [controller_manager]: Loading controller 'speed_scaling_state_broadcaster'
[ur_ros2_control_node-1] [INFO] [1728611599.326240025] [speed_scaling_state_broadcaster]: Loading UR SpeedScalingStateBroadcaster with tf_prefix:
[spawner-8] [INFO] [1728611599.328036609] [spawner_joint_state_broadcaster]: Loaded speed_scaling_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1728611599.328489988] [controller_manager]: Configuring controller 'speed_scaling_state_broadcaster'
[ur_ros2_control_node-1] [INFO] [1728611599.328533749] [speed_scaling_state_broadcaster]: Publisher rate set to : 100.0 Hz
[spawner-8] [INFO] [1728611599.352194061] [spawner_joint_state_broadcaster]: Configured and activated speed_scaling_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1728611599.354432797] [controller_manager]: Loading controller 'force_torque_sensor_broadcaster'
[spawner-8] [INFO] [1728611599.368320323] [spawner_joint_state_broadcaster]: Loaded force_torque_sensor_broadcaster
[ur_ros2_control_node-1] [INFO] [1728611599.368877717] [controller_manager]: Configuring controller 'force_torque_sensor_broadcaster'
[INFO] [spawner-9]: process has finished cleanly [pid 4982]
[ur_ros2_control_node-1] [INFO] [1728611599.391897885] [controller_manager]: Switch controller timeout is set to 0, using default 1s!
[spawner-8] [INFO] [1728611599.392398430] [spawner_joint_state_broadcaster]: Configured and activated force_torque_sensor_broadcaster
[INFO] [spawner-7]: process has finished cleanly [pid 4978]
[INFO] [spawner-8]: process has finished cleanly [pid 4980]
[ur_ros2_control_node-1] [INFO] [1728611620.215484884] [UR_Client_Library:]: Robot requested program
[ur_ros2_control_node-1] [INFO] [1728611620.215556440] [UR_Client_Library:]: Sent program to robot
[ur_ros2_control_node-1] [INFO] [1728623219.199524872] [forward_position_controller]: activate successful
[ur_ros2_control_node-1] [ERROR] [1728623220.119495571] [controller_manager]: Resource conflict for controller 'scaled_joint_trajectory_controller'. Command interface 'shoulder_pan_joint/position' is already claimed.
The connection was successful, and I am able to visualize the robot in RViz and manually move the robot.
Tried using custom Python code to publish joint positions:
#!/usr/bin/env python3
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import JointState
class UR10ROS2Client(Node):
def __init__(self):
super().__init__('ur10_ros2_client')
self.publisher_ = self.create_publisher(JointState, '/joint_states', 10)
# Timer to publish joint states every second
self.timer = self.create_timer(1.0, self.publish_joint_states)
def publish_joint_states(self):
joint_msg = JointState()
# Set the time of the message
joint_msg.header.stamp = self.get_clock().now().to_msg()
# Joint names for the UR10 robot
joint_msg.name = ['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint',
'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']
# Desired joint positions (in radians)
joint_msg.position = [0.0, -1.5, -0.95, -1.7, 1.2, 0.8] # Example joint positions
self.publisher_.publish(joint_msg)
self.get_logger().info(f'Published joint states: {joint_msg.position}')
def main(args=None):
rclpy.init(args=args)
ur10_client = UR10ROS2Client()
try:
rclpy.spin(ur10_client)
except KeyboardInterrupt:
pass
finally:
ur10_client.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()
This code publishes joint positions to the robot, and I see the following in the terminal:
[INFO] [ur10_ros2_client]: Published joint states: array('d', [0.0, -1.5, -0.95, -1.7, 1.2, 0.8])
[INFO] [ur10_ros2_client]: Published joint states: array('d', [0.0, -1.5, -0.95, -1.7, 1.2, 0.8])
[INFO] [ur10_ros2_client]: Published joint states: array('d', [0.0, -1.5, -0.95, -1.7, 1.2, 0.8])
[INFO] [ur10_ros2_client]: Published joint states: array('d', [0.0, -1.5, -0.95, -1.7, 1.2, 0.8]) ... and the loop continues
However, the real robot does not move. I can see the robot on RVIZ trying to reach the position but it goes back to the original position in less than a second
Controller Launch Attempt: I also tried moving the robot using the forward_velocity_controller via:
the robot remains stationary. I see periodic messages like:
[INFO] [launch]: All log files can be found below /home/ur10/.ros/log/2024-10-11-13-58-16-511235-ur10-8774
[INFO] [launch]: Default logging verbosity is set to INFO
DEPRECATION WARNING: Launch files from the ur_bringup package are deprecated and will be removed from Iron Irwini on. Please use the same launch files from the ur_robot_driver package.
[INFO] [publisher_forward_position_controller-1]: process started with pid [8775]
[publisher_forward_position_controller-1] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py:441: UserWarning: when declaring parameter named 'pos1', declaring a parameter only providing its name is deprecated. You have to either:
[publisher_forward_position_controller-1] - Pass a name and a default value different to "PARAMETER NOT SET" (and optionally a descriptor).
[publisher_forward_position_controller-1] - Pass a name and a parameter type.
[publisher_forward_position_controller-1] - Pass a name and a descriptor with dynamic_typing=True [publisher_forward_position_controller-1] warnings.warn( [publisher_forward_position_controller-1] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py:441: UserWarning: when declaring parameter named 'pos2', declaring a parameter only providing its name is deprecated. You have to either: [publisher_forward_position_controller-1] - Pass a name and a default value different to "PARAMETER NOT SET" (and optionally a descriptor). [publisher_forward_position_controller-1] - Pass a name and a parameter type. [publisher_forward_position_controller-1] - Pass a name and a descriptor with dynamic_typing=True
[publisher_forward_position_controller-1] warnings.warn(
[publisher_forward_position_controller-1] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/node.py:441: UserWarning: when declaring parameter named 'pos3', declaring a parameter only providing its name is deprecated. You have to either:
[publisher_forward_position_controller-1] - Pass a name and a default value different to "PARAMETER NOT SET" (and optionally a descriptor).
[publisher_forward_position_controller-1] - Pass a name and a parameter type.
[publisher_forward_position_controller-1] - Pass a name and a descriptor with `dynamic_typing=True
[publisher_forward_position_controller-1] warnings.warn(
[publisher_forward_position_controller-1] [INFO] [1728622696.705131497] [publisher_forward_velocity_controller]: Publishing 3 goals on topic "/forward_velocity_controller/commands" every 5 s
[publisher_forward_position_controller-1] [INFO] [1728622701.706771140] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622706.706748317] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, -0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622711.706739586] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])"
[publisher_forward_position_controller-1] [INFO] [1728622716.706738874] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622721.706733155] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, -0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622726.706750165] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])"
[publisher_forward_position_controller-1] [INFO] [1728622731.706740598] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622736.706745651] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, -0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622741.706726612] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])"
[publisher_forward_position_controller-1] [INFO] [1728622746.706720956] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, 0.05])"
[publisher_forward_position_controller-1] [INFO] [1728622751.706707306] [publisher_forward_velocity_controller]: Publishing: "array('d', [0.0, 0.0, 0.0, 0.0, 0.0, -0.05])"
ROS2 Controller Status:
I checked the controller status using:
ros2 control list_controllers
[INFO] [1728624143.633446703] [_ros2cli_9633]: waiting for service /controller_manager/list_controllers to become available...
scaled_joint_trajectory_controller ur_controllers/ScaledJointTrajectoryController inactive
forward_position_controller position_controllers/JointGroupPositionController active
joint_state_broadcaster joint_state_broadcaster/JointStateBroadcaster active
io_and_status_controller ur_controllers/GPIOController active
speed_scaling_state_broadcaster ur_controllers/SpeedScalingStateBroadcaster active
force_torque_sensor_broadcaster force_torque_sensor_broadcaster/ForceTorqueSensorBroadcaster active
I attempted to activate the scaled_joint_trajectory_controller using: ros2 control switch_controllers --start scaled_joint_trajectory_controller
But even after activation, the robot does not move.
Is there anything I am missing in activating and utilizing the controllers in ROS2?
Any help or insights would be greatly appreciated!
Thank you for your time.
The text was updated successfully, but these errors were encountered:
Hello Universal Robots Team/Community,
I am currently facing an issue where my UR10 robot is not moving as expected when using ROS2 Humble with the
forward_velocity_controller
. Below is a detailed description of the problem, setup, and troubleshooting steps I have taken.Setup Details:
Steps Performed:
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10 robot_ip:=192.168.0.100
This code publishes joint positions to the robot, and I see the following in the terminal:
However, the real robot does not move. I can see the robot on RVIZ trying to reach the position but it goes back to the original position in less than a second
forward_velocity_controller
via:ros2 launch ur_bringup test_forward_velocity_controller.launch.py
the robot remains stationary. I see periodic messages like:
ROS2 Controller Status:
I checked the controller status using:
ros2 control list_controllers
I attempted to activate the scaled_joint_trajectory_controller using:
ros2 control switch_controllers --start scaled_joint_trajectory_controller
But even after activation, the robot does not move.
Is there anything I am missing in activating and utilizing the controllers in ROS2?
Any help or insights would be greatly appreciated!
Thank you for your time.
The text was updated successfully, but these errors were encountered: