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

[gmapping] get current robot-position?

asked 2011-06-19 03:38:38 -0500

G_Threepwood gravatar image

updated 2011-06-19 07:08:48 -0500

dornhege gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-06-19 07:07:45 -0500

dornhege gravatar image

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.

edit flag offensive delete link more

Comments

@dornhege how can i acomplish to make this tranfsormlistener?? Can you give some details? Because ive been unable to mak eit work, thanks

ctguell gravatar image ctguell  ( 2013-12-19 15:33:59 -0500 )edit
dornhege gravatar image dornhege  ( 2013-12-20 00:05:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2011-06-19 03:38:38 -0500

Seen: 4,096 times

Last updated: Jun 19 '11