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

Is it possible to find the parent frame of a joint knowing the joint name?

asked 2021-03-31 04:13:50 -0500

dregel gravatar image

Hi. I am using the ros control JointStateController to publish the JointStates from gazebo. I get the messages and it is working well. Now that I have the joint state I would also like to find the transform from map frame to the joint location (parent frame of the joint). If I know the name of the parent frame of this joint I can always do it with tf. But since the we are using this code with different robot models, the parent frame of the joint is not always the same. But I do have the joint name from the JointState message and this joint will always have a parent in the robot description.

Is it possible to somehow lookup the parent frame of a joint using the joint name?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-14 03:12:00 -0500

dregel gravatar image

Ended up reading it from the urdf robot model (usually /robot_description in parameter server). You can use model::getJoint with the joint name and get the parent_link_name attribute from the return value.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-03-31 03:26:50 -0500

Seen: 194 times

Last updated: Apr 14 '21