Ask Your Question

Hokuyo laser turn up down gmapping issue

asked 2013-04-29 04:49:51 -0500

acp gravatar image

updated 2014-01-28 17:16:23 -0500

ngrennan gravatar image

Dear all

I have one question.

I placed a hokuyo laser up down, e.g. I rotated 180 degrees, the head is down and the base is up.

I have an issue, the gmapping map and the laser readings are now rotated. It means that the robot sees me from the left side instead from the right and vice versa.

How can I fix that problem.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-29 04:56:20 -0500

Ben_S gravatar image

Try using the current gmapping version from github. We just build a patch some days ago to make gmapping work under such conditions. I dont think, that this version is already getting distributed through binary updates.

How did you tell the robot, that the laser is upside down? By setting an apropriate transform? Is the visualization of the laser scan in rviz correct? If so, the new version should work. Otherwise it will be helpful, if you could post a bag file containing odom, tf and the laserscans.

edit flag offensive delete link more


Hi, well I have tried your patched slam_gmapping with an apropiate transform <node pkg="tf" type="static_transform_publisher" name="base_link_broadcaster" args="0 0 0 3.1416 3.1416 0 base_link laser 100" /> and the navigation stack works quite nice. Thank you very much :)

acp gravatar image acp  ( 2013-04-29 23:40:47 -0500 )edit

Glad that it works now. :) Please accept the answer then, to mark this question solved. Btw.: Do you really have no offset at all from your base_link to your laserscanner?

Ben_S gravatar image Ben_S  ( 2013-04-30 01:18:23 -0500 )edit

well, yea it might be an offset that i need to find out. The base_link must be in the CM, right? where shall accept the answer?

acp gravatar image acp  ( 2013-04-30 05:32:20 -0500 )edit

Its common practice to have the base link in the center of the robot (center of rotation for differential drive type robots). To accept an answer you have to click the little checkmark on the left directly beneath the up and down arrows for voting.

Ben_S gravatar image Ben_S  ( 2013-04-30 05:35:44 -0500 )edit

OK, I thought that the base_link was at the CM, and the odom frame must be also at the centre of rotation of the robot, right? because based on the dead reckoning algorithm, right?. I mean, at initial position, and when the robot moves, we have a odom translation.

acp gravatar image acp  ( 2013-04-30 05:46:40 -0500 )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


Asked: 2013-04-29 04:49:51 -0500

Seen: 482 times

Last updated: Apr 29 '13