0
$\begingroup$

Rosanswers logo

I think I am in big robot doo-doo. Here is my "situation":

I have been building a robot for the past 5 years or so, and one of the design decisions I made at the onset of the project was to use a vertical laser placement. I am using slip rings to be able to rotate infinity, and up to now I thought this was a good idea.

image description

I got to a point where I am ready for ros navigation. The hardware works, Gazebo works, and so does RViz: image description image description

At this point I am using using Gazebo to figure out Navigation (gmapping, acml, etc..). I am no expert in robotics, and I am limited to having to use only well documented tutorials. I would say everything I rely on right now is based on the Turtlebot.

Here is the issue, I am getting this error from gmapping: ...Laser has to be mounted planar! Z-coordinate has to be 1 or -1, but gave:...

image description

I looked into this error, and it means that for gmapping to work the laser has to be horizontal (where my setup is vertical). I have so much effort in this robot, I really, really don't want to do a mechanical redesign. Can you please help by weighing in along these lines:

  • Does having a vertical laser mean I can't use gmapping? Can this situation be "easily" fixed somehow?
  • If I cannot use gmapping, what can I use to build a map?
  • any advice, or suggestions are very, very appreciated!!

As the wiki states (https://wiki.ros.org/navigation/MapBuilding) the navigation stack uses gmapping. I am very, very worried about this.

I am using Gazebo 7.16, Ubuntu 16.04, ROS Kinetic.

Thank you very much!

Mike

_EDIT #1___

Thank you for your answer Steven, and your comments gvdhoorn. I appreciate your time and your expertise. Could you kindly help with these two follow up questions:

  1. Lets say I follow your answer, and build a 2d map using gmapping by assembling a horizontal scan from a moving vertical sweep. Let's also imagine I use the same scan for AMCL to localize in the map. What about detecting obstacles during robot motion (so that we can recompute the path to the goal)? Can the internal ROS Navigation code use the full vertical data from the lidar, or am I still stuck having to rely on the assembled horizontal scan for obstacle avoidance as well?

  2. Lets say I modify my hardware to be horizontal and to nod like the PR2 (as is shown on the video on the navigation stack wiki page: https://wiki.ros.org/navigation). How would I approach navigation at that time? are the statements below true (similar idea as question #1)?

During the nodding motion, when the lidar is at a position that is parallel to the ground (let's call it "Position Level" or "PL") that "PL" scan can be used to build a map using gmapping. True/False?

The very same "PL" scan can also be used for AMCL for localizing on the map. True/False?

To avoid the issues demonstrated in the first half of this very short video (https://www.youtube.com/watch?v=YSu5yqblgck) the scans of the entire nod (full lidar generated data) are taken into account (i am guessing by the inner code of the navigation stack). true/false?

As for the Cargographer, LOAM, and OctoMap I will do more research and ask a more focused 3D navigation question later once I learn a bit more about these systems.

Thank you two for saving my rear on this problem!


Originally posted by BuilderMike on ROS Answers with karma: 247 on 2020-03-12

Post score: 0


Original comments

Comment by gvdhoorn on 2020-03-12:
It doesn't help, but wiki/gmapping does list this "horizontal laser" requirement quite explicitly (in the Hardware Requirements section):

To use slam_gmapping, you need a mobile robot that provides odometry data and is equipped with a horizontally-mounted, fixed, laser range-finder

I'm not really into navigation and mapping, but perhaps a 3D slam component could help here. Like Google Cartographer, or perhaps some other alternative.

@stevemacenski may know something.

Comment by samarth on 2022-07-08:
Hi,did you find a solution?I am also looking to make such project as I want to map roof or make a digital terrain map

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yeah, you're in some trouble, but there may be ways to get around it. It's going to degrade your localization and map quality, however. Which sticks because you have an expensive lidar.

All of the commonly used ROS SLAM libraries are going to require horizontal scanners. Karto, Gmapping, Slam Toolbox, Hector. What you can do though is:

  • Find the beam that is closest to horizontal from your measurements
  • As the lidar sweeps, storing the encoder information about its angle and range
  • Assemble a pseudo-laser-scan from that information.

You're going to incur error from at least your encoder and mounting mechanisms, and any vibration. As long as the sweeping is sufficiently fast (which, from looking at it, I can't tell) and you move very, very slow, you should be OK. This is obviously suboptimal.

Your other options are 3D SLAM, but you're hitting the edges of open source and entering the land of research and questionable documentation. Options there that may be worth considering:

  • Cartographer, but I have no idea if it'll accept this. It usually expects a 3D lidar or a tilting lidar not a sweep.
  • A variant on LOAM

Originally posted by stevemacenski with karma: 8272 on 2020-03-12

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2020-03-13:
There is a 3D variant of amcl: wiki/amcl3d. So if you could somehow make a 3D map of the environment, localisation could work.

Comment by BuilderMike on 2020-03-13:
@stevemacenski @gvdhoorn Thank you very much Gents! could you please see edit #1 in the question to help guide my next task on the project? Depending on your answer I will either do a hardware mod or do the software fudge initially suggested.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.