Ask Your Question
0

Can I use a vertical laser on my robot?

asked 2020-03-12 11:50:18 -0500

updated 2020-03-13 09:18:56 -0500

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/MapBu...) 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 ...

(more)
edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-12 12:44:17 -0500 )edit

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

samarth gravatar image samarth  ( 2022-07-08 11:06:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-03-12 14:40:34 -0500

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
edit flag offensive delete link more

Comments

There is a 3D variant of amcl: wiki/amcl3d. So if you could somehow make a 3D map of the environment, localisation could work.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-13 02:32:19 -0500 )edit

@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.

BuilderMike gravatar image BuilderMike  ( 2020-03-13 09:16:33 -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

2 followers

Stats

Asked: 2020-03-12 11:50:18 -0500

Seen: 600 times

Last updated: Mar 13 '20