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

What link move_group get current pose refers to?

asked 2023-04-21 00:55:47 -0500

TapleFlib gravatar image

I have a Techman robot arm and I write a python script to read the current pose (pos : xyz, quar:xyzw) but I don't know if it's the base or end effector link that the position corresponds to. Anyone know how to check the link it corresponds to ? how to set which link I want to read ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-04-21 10:20:33 -0500

pcoenen gravatar image

updated 2023-04-21 10:23:45 -0500

getCurrentPose (C++)/ get_current_pose (Python) reports the pose of the end effector link. The frame it is referenced to can be read from the header of PoseStamped.

For looking up arbitrary links you could just use tfs. If it's a link on your robots kinematic chain you could also reset the end effector link before getting the pose.

edit flag offensive delete link more

Comments

I tried to print the output of PointStamped with print(geometry_msgs.msg.PoseStamped()) and got the following output :

position: x: 2.891971438201711e-07 y: -0.24444999999999026 z: 0.8917000428590904 orientation: x: 0.7071065501076503 y: 1.1553940595954334e-07 z: 1.1553948151418447e-07 w: 0.7071070122653501 header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: '' pose: position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0

why is it blank below the header?

TapleFlib gravatar image TapleFlib  ( 2023-04-22 02:23:24 -0500 )edit

and do you know how to set which link I want to control with set pose target ? I'm quite new to ROS and moveit sorry.

TapleFlib gravatar image TapleFlib  ( 2023-04-22 02:47:48 -0500 )edit

is these position and orientation tool0's position or is it already being transformed relative to the base? should I publish a tf between tool0 to base? how? image description

(sorry to write it as answer to be able to send image, I'll change it once I got the real answer)

TapleFlib gravatar image TapleFlib  ( 2023-04-22 03:06:16 -0500 )edit

Did you print the return value of get_current_pose (which is of type PoseStamped) or print(geometry_msgs.msg.PoseStamped()), because the zeroed position looks like you did the latter.

  • and do you know how to set which link I want to control with set pose target ?

If you look through the move_group_commander code on github (linked above) you will also find a set_end_effector_link function.

  • is these position and orientation tool0's position or is it already being transformed relative to the base?

I believe the pose is relative to the global frame set in rviz. The tf from base to tool0 should already exist. You can use rosrun rqt_tf_tree rqt_tf_tree to check which frames are available.

pcoenen gravatar image pcoenen  ( 2023-04-24 03:23:31 -0500 )edit

Got it, thankyou so much ! this is enough and really helpful !

TapleFlib gravatar image TapleFlib  ( 2023-04-24 05:01:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-04-21 00:55:47 -0500

Seen: 59 times

Last updated: Apr 22 '23