laser_scan_matcher giving error when robot in a large open place

asked 2018-01-22 06:45:33 -0500

HM Mehrab gravatar image

updated 2018-01-22 15:33:56 -0500

Hello, I have a robot with a RPLIDAR A2, a IMU and not so accurate wheel encoders. The robot works well in corridors, but when it is in large open room, the laser_scan_matcher node keep producing the following error.

laser_scan_matcher_error

Why is this happening and how to fix it?

edit retag flag offensive close merge delete

Comments

Can you please update your question with a copy and paste of the error instead of a screenshot? Text is searchable, images are not.

jayess gravatar image jayess  ( 2018-01-22 11:15:07 -0500 )edit

Added text of the error. Could not copy and paste since I do not have access to the machine now. So manually typed it in.

HM Mehrab gravatar image HM Mehrab  ( 2018-01-22 15:30:09 -0500 )edit

I appreciate the effort but please copy and paste the error when you have access to the machine vs manually typing it in. Manually typing it is prone to error. It's best just to wait until you have access.

jayess gravatar image jayess  ( 2018-01-22 15:31:22 -0500 )edit

Sure. I'll remove it and add it again by copy pasting.

HM Mehrab gravatar image HM Mehrab  ( 2018-01-22 15:33:10 -0500 )edit

Depending on the range of your laser, it might be that the laser scan matcher simply can't get any significant information due to seeing the same thing (or nothing) on all sides of the robot. In that case he won't know where he is compared to where he was last scan if nothing changed (for him).

JamesDoe gravatar image JamesDoe  ( 2018-01-23 08:56:53 -0500 )edit

Yeah, I dug into the source code and found out that the CSM library that laser_scan_matcher uses produces this error if less than 10% of points of a scan are valid (value is between range_min and range_max).

HM Mehrab gravatar image HM Mehrab  ( 2018-01-23 09:05:52 -0500 )edit

Sounds like HM Mehrab got the answer up there. That explains why it's happening at least. I'm not actually sure if there's a fix in this case. Only things I can think of to fix it are: Change the range_min and range_max values (within what your laser_scanner can handle) or get another form of odom.

JamesDoe gravatar image JamesDoe  ( 2018-01-23 09:21:50 -0500 )edit