0
$\begingroup$

Rosanswers logo

I want write a certern link position(x,y,z) to a txt file.Which function do i need? Where does the date of link's position store?THX!!


Originally posted by Ddj on ROS Answers with karma: 1 on 2017-03-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you have joint state information being published, you have a URDF, and you have the robot_state_publisher running then you should be able to visualize the pose of the robot in rviz. If all of that is working, to obtain the position of a particular link, all you need to do is create a tf listener and lookup the transform between some inertial frame and a frame on the link that you are interested in. This can easily be done in Python (tutorial here) or C++ (tutorial here).

The robot_state_publisher subscribes to joint state information and looks at a robot's URDF on the parameter server. With those two pieces of information, it can publish the relevant /tf data so that the full pose of the robot can be known by any ROS node (including rviz and your own listener).


Originally posted by jarvisschultz with karma: 9031 on 2017-03-23

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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