Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[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?

click to hide/show revision 2
retagged

[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?