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

G_Threepwood's profile - activity

2012-08-19 20:32:12 -0500 received badge  Notable Question (source)
2012-08-19 20:32:12 -0500 received badge  Famous Question (source)
2012-05-02 19:53:33 -0500 received badge  Popular Question (source)
2012-03-08 05:02:13 -0500 received badge  Student (source)
2011-06-26 05:13:16 -0500 marked best answer [gmapping] get current robot-position?

You just need one TransformListener and listen for the /map -> /base_link transform.

The transform listener will take the gmapping and odometry transforms and build the correct one from that automatically.

2011-06-26 05:13:16 -0500 received badge  Scholar (source)
2011-06-19 03:38:38 -0500 asked a question [gmapping] get current robot-position?

Hi folks!

Rosaria provides me with odometry, which is then given to gmapping and (along with some laser-sensordata) processed. As the robot moves in the world this creates a map of its environment. Now I wish to get the current position of my robot but can't quite figure out how. My understanding is as follows:

I need - a TransformListener from gmapping to be able to transform odometry into world-coordinates. - a Subscriber to get the odometry in the first place.

Since both need to be handled with callbacks I need to use gobal variables to get information from one to the other. This in turn makes it necessary to think about synchronization and race-conditions.

Is this really the proper way to do it / do I have an error in my understanding? If so, how do i go about solving the race-condition problem?