Universal Robots Forum

About the Cartesian trajectory controllers and Movegroup

[Cartesian Trajectory Controllers]
Hi, I have 2 questions. I’m using UR10 CB3 and CARTESIAN_TRAJECTORY_CONTROLLERS =[“pose_based_cartesian_traj_controller”] with ros actionlib. It works well.

I wrote a python program referring to “Universal_Robots_ROS_Driver/ur_robot_driver/scripts/test_move.py” below.
https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/scripts/test_move

I believe “base_link” of the UR10 arm is origin of the coordinate system. So, when I commanded to go x=0.5, y=0.0, z=0.6, ee_link goes +0.5m along the X axis and +0.6m along the Z axis from the origin of base_link(0,0,0). At this point, the origin of ee_link moves certain distance from the origin of base_link.

1. However, I wanna make ee_link move based on its own origin of ee_link. Is there any way or controller to do this?
(Because the xyz axis direction of base_link is not the same as ee_link)

[MoveGroup]
Here’s the another question about MoveGroup. When I commanded CARTESIAN_TRAJECTORY_CONTROLLERS =[“pose_based_cartesian_traj_controller”], the results of get_current_pose function are not matched.
position.z are the same, but position.x y and orientation are different each other as you see below

(Command pose and Robot moved)
Screenshot from 2022-01-12 16-04-07

(get_current_pose(“ee_link”) after Robot stoped)
Screenshot from 2022-01-12 16-06-02

2. To match them, Which part should check first?

Thank you.

Regarding your first question: Poses are currently expected to be in base. You can transform a pose from ee_link to base using ROS tf system and then send that to the controller. However, I think that this should be handled by the controller, please see my corresponding issue.

Regarding your second question: Keep in mind, that base and base_link are not the same. While the controller “thinks” in base, the move group might have base_link as reference system. As the transformation between them is a rotation by 180 degree, x and y values are negated.

1 Like

Thanks for the reply in detail.
I’m still understanding and googling in regard to what you mentioned and your corresponding issue.

To sum up

  • Can transform from ‘ee_link’ to ‘base’
  • Changing the frame of the poses in cartesian trajectory controller hasn’t implemented yet, as seen the issue
  • Yes u’r right. I commanded cartesian trajectory controller and read the ee_link pose using movegroup

And I’m still trying to understand the issue and your mention below. Could you give a little move detail?

[New questions]
3. If possible, how can I to get the robot current pose based on ‘base’ reference frame using movegroup?
I actually tried this using ‘setPoseReferenceFrame’ and ‘getCurrentPose’, but I think movegroup always read from ‘base_link’ frame. Did I miss something? :sweat_smile:
4. Is is possible to use ‘Universal_Robots_ROS_controllers_cartesian’ with movegroup?

It would be really grateful if you could share the source code link you know.
Thank you.

There is no need to use movegroup to get the current tcp_pose. You can simply use standard tf calls as explained in the docs.

1 Like