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

save position of robot online slam?

asked 2012-03-23 01:17:59 -0600

Alireza gravatar image


I want to save the current position of robot while the navigation with online slam is running and then i can set those saved position as 2d goals in navigation with static map!

i can get current position of the robot in map frame when i am running navigation stack with static map by subscribing to amcl/pose topic. but in navigation with online slam amcl does not publishes any point. So how can i get robots current position in online slam?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-23 01:44:52 -0600

Stephan gravatar image

updated 2012-03-23 23:38:13 -0600

If you use gmapping, the robot's pose is published via a tf. You can use tf_echo to display this transformation:

rosrun tf tf_echo /map /base_link

You may also try out hector_trajectory_server for saving and retrieving the traveled trajectory.

edit flag offensive delete link more


Here the link to the TF tutorials:

Lorenz gravatar image Lorenz  ( 2012-03-23 02:15:09 -0600 )edit

I tried out rosrun tf tf_echo /map /base_link and its result was very good! but i will test hector_trajectory_server too! thanks for your answer!

Alireza gravatar image Alireza  ( 2012-03-23 23:16:14 -0600 )edit

Question Tools


Asked: 2012-03-23 01:17:59 -0600

Seen: 889 times

Last updated: Mar 23 '12