Ask Your Question
1

What is the optimal way to filter laser scans that are taken when the robot is tilted (roll/pitch)

asked 2020-12-04 09:52:30 -0500

joekeo gravatar image

As the title says, I am wondering which is the best way to filter those scans. The reason for this is that my robot is using a slam package designed for 2D environments and my laser is an RP LiDAR S1. When the rboto is moving in the environments, there are moments that the ground has bumps or ditches that make the robot tilt an various directions. This sometimes makes the slam map the ground (and marking it as an obstacle).

I was thinking on transforming the laser scan to a pointcloud (using laser_filter) then filter out the points below (and above) certain threshold, then transforming those points back into a laser scan.

I feel this approach might be convoluted and maybe even computational expensive.

People that have had similar issues, how did you solved it?

Many Thanks!

edit retag flag offensive close merge delete

Comments

Seems rgb-d or stereo camera might be better suited for the task, in combination with imu. As I asume you have an imu as otherwise the pointcloud approach wouldnt work, you might just make a node that funnels the laserscans. Then subscribe to imu, and when the imu's tilt/pitch exceeds the threshold stop publishing the output scan and start publishing an empty/fake scan for the time being. Inputscan=outputscan if imu within limits of tilt/pitch, kind of idea. You might even want to filter the scan at this point, as to still publish very near points that are really obstacles inside a ditch. The big question is how mapping handles "missed"/empty scans no matter how you achieve them. Might require 3d mapping after all.

Dragonslayer gravatar image Dragonslayer  ( 2020-12-04 10:16:29 -0500 )edit

If you intend to operate in a 3D environment why use a 2D-Slam package? Remember, you can start with a 3D package and always get like a costmap (2D) but you cannot scale up (reliably). An imu will give you roll and pitch measurements which you can use to transform your data before adding it to the slam package

Akhil Kurup gravatar image Akhil Kurup  ( 2020-12-04 10:46:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-04 11:18:01 -0500

tryan gravatar image

updated 2020-12-04 11:21:15 -0500

I'm not sure of the "optimal" way, but there are several options for handling somewhat uneven terrain. Unfortunately, most of the approaches I know require more than just a single-layer lidar. Here are a couple in case it gives you ideas:

  • If you have an IMU, you can filter the lidar returns by setting z limits, much like you suggested. Basically, with the tilt angle from the IMU, you can calculate the height of each return point and kick out the ones that are too far from the 2D plane. The actual z limits would depend on your setup and environment. Some SLAM packages have this functionality built in.

  • Calculate surface normals based on lidar data. It's easiest with multi-layer lidars, but the idea is to throw out points that indicate a plane with a normal that's mostly in the z direction (floor or ceiling).

If you're stuck with just a single-layer lidar, you may be able to filter based on further assumptions about your environment/application, but that can be tricky. For example, how do you know (from lidar data alone) that you're looking at the ground and not a big box someone dropped right in front of your robot? One scenario:

  • If you know that your robot will never tilt more than a particular amount, and nothing in the environment moves, you may be able to calculate a safe lidar range limit. The lidar will never see ground closer than X m because that would require it to tilt more than is possible. Then, you can just filter out data beyond X m. Again, this is similar to your original suggestion, but it's important to note the inherent assumptions.

As far as computation, these approaches aren't very expensive and shouldn't be a problem--depending on your platform, obviously. Go with the simplest filter that makes sense. If you explain more of your scenario, maybe there's a more clever solution. I should add that if the terrain is too uneven, 2D just won't be enough.

edit flag offensive delete link more

Comments

I am also presented with a similar scenario with my robot lawn mower, which is outside and I would like it to drive up hills. Could @joekeo use mesh_navigation, I haven't tried it but looks like it's meant for outside and uneven terrain. Although its looks like it uses a full 3d point cloud. Why dont you actuate your lidar (tilt it) with an RC servo to create a point cloud?

Zonared gravatar image Zonared  ( 2020-12-05 14:53:18 -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

1 follower

Stats

Asked: 2020-12-04 09:52:30 -0500

Seen: 149 times

Last updated: Dec 04 '20