Ask Your Question
1

[gmapping] get current robot-position?

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

G_Threepwood gravatar image

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

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 -0600

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 imagectguell ( 2013-12-19 15:33:59 -0600 )edit
dornhege gravatar imagedornhege ( 2013-12-20 00:05:29 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 3,039 times

Last updated: Jun 19 '11