Robot doesn't move due to actual.positions being the same as desired.positions in the controller feedback.
Affected ROS2 Driver version(s)
2.9.0
Used ROS distribution.
Humble
Which combination of platform is the ROS driver running on.
Linux in a virtual machine
How is the UR ROS2 Driver installed.
Build the driver from source and using the UR Client Library from binary
Which robot platform is the driver connected to.
UR CB3 robot
Robot SW / URSim version(s)
3.14
How is the ROS driver used.
Through the robot teach pendant using External Control URCap
Issue details
Summary
We encountered an issue where the robot does not move after sending trajectory commands using scaled_joint_trajectory_controller. The core problem lies in the feedback from the action server /scaled_joint_trajectory_controller/follow_joint_trajectory. Specifically, the actual.positions in the feedback is always the same as the desired.positions, even though the robot's current position is different.
This behavior causes the robot to remain stationary, as the controller incorrectly assumes that the robot has already reached its target position.
Issue details
-
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10 robot_ip:=192.168.1.1
-
ros2 action send_goal /scaled_joint_trajectory_controller/follow_joint_trajectory control_msgs/action/FollowJointTrajectory "{ trajectory: { joint_names: [shoulder_pan_joint, shoulder_lift_joint, elbow_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint], points: [ { positions: [1.57, -1.57, 1.57, -1.57, -1.57, 0], time_from_start: { sec: 10 } } ] } }" --feedback
-
output log as follow, we can see desired: positions: are the same as actual:positions: , desired: positions:
- 1.4702648083500873
- -1.5016473084382875
- 1.4578857600697241
- -1.509482695372137
- -1.5652979063487598
- -0.10027437199636823 velocities:
- 0.009973520755767828
- -0.006835270246396852
- 0.011211425781250006
- -0.006051731428037476
- -0.0004702094401224377
- 0.01002743879901331 accelerations:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0 effort: [] time_from_start: sec: 0 nanosec: 0 actual: positions:
- 1.470228910446167
- -1.5016472975360315
- 1.457897663116455
- -1.5094226042376917
- -1.5652979055987757
- -0.10032254854311162 velocities:
- 0.0
- 0.0
- -0.0
- 0.0
- 0.0
- 0.0 accelerations: [] effort: [] time_from_start: sec: 0 nanosec: 0 error: positions:
- 3.589790392033443e-05
- -1.0902255986877663e-08
- -1.1903046730932232e-05
- -6.009113444527259e-05
- -7.499840748437236e-10
- 4.817654674339755e-05 velocities:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0 accelerations: [] effort: [] time_from_start: sec: 0 nanosec: 0 multi_dof_joint_names: [] multi_dof_desired: transforms: [] velocities: [] accelerations: [] time_from_start: sec: 0 nanosec: 0 multi_dof_actual: transforms: [] velocities: [] accelerations: [] time_from_start: sec: 0 nanosec: 0 multi_dof_error: transforms: [] velocities: [] accelerations: [] time_from_start: sec: 0 nanosec: 0
- ros2 topic echo /joint_states, we see actual positions are different with desired. header: stamp: sec: 1758786504 nanosec: 827778549 frame_id: base_link name:
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
- shoulder_pan_joint position:
- -1.5016472975360315
- 1.4578742980957031
- -1.5094588438617151
- -1.5653217474566858
- -0.1003344694720667
- 1.4702528715133667 velocity:
- 0.0
- -0.0
- 0.0
- 0.0
- 0.0
- 0.0 effort:
- -3.630066394805908
- -3.5824131965637207
- -0.2355194389820099
- -0.004486084450036287
- -0.0605621412396431
- 0.0732421949505806
Expected Behavior: actual.positions in the feedback from scaled_joint_trajectory_controller should reflect the robot's actual physical joint positions, matching the data published by /joint_states. The robot should move to the target position specified in the sent trajectory command. Actual Behavior: actual.positions in the feedback is always equal to desired.positions, making the controller think the robot is already at the target position. As a result, the robot does not move.
Additional Debugging Steps Taken: Verified that /joint_states publishes correct values, reflecting the physical positions of the robot. Verified that the hardware interfaces are correctly claimed: Example ros2 control list_hardware_interfaces output: <TEXT> command interfaces shoulder_pan_joint/position [available] [claimed] ... state interfaces shoulder_pan_joint/position [available] ... Verified that scaled_joint_trajectory_controller is active: <TEXT> scaled_joint_trajectory_controller [active] joint_state_broadcaster [active]
URCap Version: (externalcontrol-1.0.5.urcap) robot: UR10
Relevant log output
robot is running state, not hardware question.
Accept Public visibility
- [x] I agree to make this context public
You didn't include the joint names in your feedback output. The order of the joint array doesn't necessarily have to be the same.
Your joint state says:
-1.5016472975360315 shoulder_lift_joint
1.4578742980957031 elbow_joint
-1.5094588438617151 wrist_1_joint
-1.5653217474566858 wrist_2_joint
-0.1003344694720667 wrist_3_joint
1.4702528715133667 shoulder_pan_joint
If I print your actual values from the feedback with the joint names that I get from a feedback that would be
1.470228910446167 - shoulder_pan_joint
-1.5016472975360315 - shoulder_lift_joint
1.457897663116455 - elbow_joint
-1.5094226042376917 - wrist_1_joint
-1.5652979055987757 - wrist_2_joint
-0.10032254854311162 - wrist_3_joint
Those look (almost) the same to me.
Also, the example command you provided works for me (to be honest, tested on Software 5.23 with ROS Rolling at the moment).