ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Finding a frame pose given pose (calculated) of another frame

asked 2013-04-16 16:07:28 -0600

updated 2014-01-28 17:16:13 -0600

ngrennan gravatar image

Hello everyone,

I am publishing r_gripper_pick_pose as, say, :

 <node name="btw_bl_rpp" pkg="tf" type="static_transform_publisher" args=
  "3  1   8     0 0 0 1     base_link        r_gripper_pick_pose 10" 
  respawn="false" output="screen" />

I calculate the pose (with direction) for this frame (r_gripper_pick_pose) (say to pick up sth). Lets call it Calc_grasp_pose.

How can I find the base_link (i.e, robot pose) pose wrt the Calc_grasp_pose?

I guess I can not use TF for this as there is no frame being published which is b/w existing farmes and r_gripper_pick_pose. i.e, how can I use TF, if at all, to get new pose with transformation between two poses instead of two frames?

I am using ros electric.

Update:-

For clarification consider the following figure : image description

Consider a) I am considering base_link to be at origin. And all poses are described wrt it.

And for this case consider that robot is at orientation of 0 degrees if it is facing in +y direction (unlike +x in usual case of PR2 (i realized this after drawing the figure :-) ))

I need to move the robot (described by the big circle, with its gripper pose frame described by a small circle) such that its gripper is at the desired pose of (-5,3,8) and orientation (w,x,y,z) : (0,0,0,1), which is my calc_grasp_pose

So my desired situation is b). So I need the pose : (-4,1,0) and (w,x,y,z) : (0.7071, 0, 0, 0.7071) as output.

if I simply define the desired pose in r_gripper_pick_pose and use transformPose to get it into the base_link frame I will get back the desired pose of the r_gripper_pick_pose only or calc_grasp_pose. (Correct me if I am wrong)

The reason why I think I can't use TF is : the transformation between calc_grasp_pose and poses of other frames (like r_gripper_pick_pose, base_link) is dynamic and is not in tf.

calc_grasp_pose is not a frame, it is not published.

So one way for me could be to find the rotation and translation matrix which when applied to current r_gripper_pick_pose translates it to calc_grasp_pose, and then apply the same to base_link (in the picture base_link is at origin, but it could be anywhere). As described at : http://web.iitd.ac.in/~hegde/cad/lecture/L6_3dtrans.pdf

Is there any existing function which I can use in tf or some other place which I can use?

Thnks.

edit retag flag offensive close merge delete

Comments

I was wondering. Did you find anything to help you with this in the meantime?

mathijsdelangen gravatar image mathijsdelangen  ( 2014-12-11 07:48:30 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-17 00:16:06 -0600

dornhege gravatar image

updated 2013-04-18 00:20:19 -0600

If I understand correctly what you want to do then this is exactly a use case of TF.

Define the calc_grasp_pose as a pose in the r_gripper_pick_pose frame and use transformPose to get it into the base_link frame.

Edit: Not sure if what you want can be solved directly with tf methods. Maybe someone will come up. However, you can do that manually. Retrieve the base_link -> gripper transfrom from tf as lets say tfGrp and if your desired pose is target, you'll have this chain:

result * tfGrp = target
-> result = target * tfGrp^-1
edit flag offensive delete link more

Comments

Thanks for your answer dornhege,. I guess I need sth else. I have updated the post, clarifying it. Please correct me if I am wrong, and if the above method works can I get the exact synatx (with arguments) of the function I need to call?

aknirala gravatar image aknirala  ( 2013-04-17 16:37:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-16 16:07:28 -0600

Seen: 2,625 times

Last updated: Apr 18 '13