0
$\begingroup$

Rosanswers logo

Hello:

I use moveit_commander to make a cartesian move on the X axis, but the camera on the gripper sees that not only the X axis is moved.

I checked and found that the moveit preset uses the 'world' frame, the world frame and Link6 frame poses are not the same, and I should be doing cartesian movement on the Link6(End Effector) frame.

I checked using rosrun tf tf_echo Link6 world and sure this is what I need, but I don't know how to replace the frame that moveit uses, any pointers or instructions?

I found this discussion and it seems to be what I want to do.But using C++, is it possible to do the same thing with Python?

https://answers.ros.org/question/228190/moveit-end-effector-positioning/

Thanks in advance

image description


Originally posted by Gojigu on ROS Answers with karma: 23 on 2022-10-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes, you can do this in moveit_commander. Here are two possible approaches:

  1. Determine the new pose within in the eef frame, then transform that pose into the world frame, then use it as the cartesian goal. See the answer to #q323075 for python code to transform a pose. One thing that answer gets wrong is that in a real app the tfbuffer and listener objects should be created only once (and not be destroyed at the end of their transform_pose() function.)

  2. Use the moveit_commander set_pose_reference_frame() method to select the eef frame, then use a goal pose within that frame. I suspect this method is rarely used, so you may discover bugs with it. Disclosure: I've never actually tried to do it this way.


Originally posted by Mike Scheutzow with karma: 4903 on 2022-10-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Gojigu on 2022-10-09:
Thanks for your reply.

Method 1 is what I need!

Method 2 seems easier to use, but I can't get it to work, there's not much information on the web about this command.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.