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.
I got to a point where I am ready for ros navigation. The hardware works, Gazebo works, and so does RViz:
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:
...
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:
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?
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