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

How to change fake laser scan direction of rotation

asked 2011-03-12 09:47:59 -0500

updated 2016-10-24 09:01:17 -0500

ngrennan gravatar image

So I've generated my fake laser scan from the Kinect sensor point cloud using laserscan_to_pointcloud and am doing 2D SLAM using gmapping in a manner similar to the Turtlebot, but it looks as if the occupancy grid is being updated as if the laser were rotating in the opposite direction (anticlockwise instead of clockwise). What's the best way to change the laser scan direction within gmapping/slam_gmapping ? Displaying the fake laser scan I can see that it's in the correct orientation, it's just the gmapping node which is mirroring it.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2011-03-12 19:54:30 -0500

Within the URDF the rpy orientation of the fake laser can be altered such that it's equivalent to turning it upside down. This brings both the laser scan display and also the occupancy grid update into agreement.

edit flag offensive delete link more
0

answered 2011-07-19 21:40:43 -0500

felix k gravatar image

updated 2011-07-19 21:42:01 -0500

If still topical or not: gmapping is indeed re-inverting the laser scan direction, but there is a bug which I wrote about in https://code.ros.org/trac/ros-pkg/ticket/4984">ros-pkg ticket #4984. without my given patch it had not worked for me neither, I'm using the rod4_node package which gives an inverted scan.

edit flag offensive delete link more
0

answered 2011-03-12 16:16:34 -0500

Chad Rockey gravatar image

Is your kinect mounted upside down? You say that you see that the scan is in the correct orientation, so I assume that this is in RVIZ and relative to base_link?

If that's the case, what are min_angle and max_angle set to? Is should be that min_angle is something like -pi/2 and max_angle is pi/2? And then the angle_increment is positive?

If all of those are the case, what version of gmapping are you using? The newest ones use the TF data to reverse upside down scans. You may want to try running with inverted_laser being set to true, but this was been removed/deprecated as of 1.1.1. You can see more at the gmapping docs.

These are good first debugging steps. Let everyone know what the results from these are.

edit flag offensive delete link more

Comments

No. The Kinect point cloud and also the fake laser appear in the correct orientation within Rviz.
JediHamster gravatar image JediHamster  ( 2011-03-12 19:35:45 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2011-03-12 09:47:59 -0500

Seen: 3,446 times

Last updated: Jul 19 '11