fzi-forschungszentrum-informatik / cartesian_controllers

A set of Cartesian controllers for the ROS1 and ROS2-control framework.
BSD 3-Clause "New" or "Revised" License
351 stars 100 forks source link

difference in /current_pose published by the three controllers #191

Closed shrutic12 closed 1 month ago

shrutic12 commented 2 months ago

Hi! I am using the cartesian controllers with ros2 humble and ur10e robot. I was going to remap the cartesian_motion_controller/current_pose, cartesian_compliance_controller/current_pose and cartesian_force_controller/current_pose topics to the same topic /current_pose to make subscription easier. But I noticed on doing an echo on the three topics that the current pose is different for the three topics for the same robot position without moving it at all.

Screenshot from 2024-04-15 17-11-12

The The real values from the teach pendant are : x: -375.27 (mm) y: 168.96 z: 397.74 RX : 2.224 (rad) RY : 2.219 (rad) RZ : 0.0 (rad)

Any ideas why this could be happening?

stefanscherzinger commented 2 months ago

Thanks @shrutic12 for pointing this out.

I think there might be three things happening that cause your observation:

  1. Each UR robot should use a specific calibration file. I'm not sure how that works today, but there were differences between what the teach pendant says and what the ROS2 side publishes if this calibration is not used. Unfortunately, I can't test at the moment if the driver reports its current pose. At least, this issue is still open. It would be interesting to check what the ROS2 UR driver says where it is.
  2. The cartesian_controllers IK solver uses the joint positions that it gets from the robot. However, it also runs an internal control loop to consider external inputs, such as measured force-torque values from the sensor. Depending on sensor noise, there might be small numeric differences in the sub millimeter range. The cartesian_motion_controller should be closest to what the ROS2 driver says, because it does not consider forces.
  3. The current_pose depends on each controller's configuration of the end_effector_link. I assume that the controller from your second image has a different link specified. That's why its orientation is different than the other two.
stefanscherzinger commented 1 month ago

Please reopen if still unclear