ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Low scan rate using sicktoolbox_wrapper, warn: "A scan was probably missed. The last scan was n seconds ago"

asked 2012-03-22 06:35:19 -0500

updated 2012-04-05 05:38:30 -0500


Upon running the sicktoolbox_wrapper with a Sick LMS 291-S05, I repeatedly get the following warning:

[ WARN] [1332426748.056931683]: A scan was probably missed. The last scan was 0.0200344 seconds ago.
[ WARN] [1332426755.581470354]: A scan was probably missed. The last scan was 0.0222227 seconds ago.
[ WARN] [1332426761.766591705]: A scan was probably missed. The last scan was 0.0205155 seconds ago.

The time between the warnings range between 1 and 40 seconds. And the "last scan" is reported to be roughly 0.02 seconds ago.

EDIT: The above statement may give the impression that the warnings are not so frequent. The warnings range between 0 and 40 seconds, and more often at a rate > 1HZ. They are quite frequent.

Upon running "rostopic hz /scan" , I get a rate of between 70 and 74 Hz.

Other symptoms that I think might be related are:

  1. When I run the navigation stack, it appears that the laser scans are too slow and hence cannot be registered accurately. Upon sending a simple goal, in a few seconds, my navigation map in Rviz looks like this: I have run navigation stack before while using the same robot and a different laser and am certain that my navigation parameters are okay. I also reduced the maximum angular and linear velocity in navstack params to 0.7 and 0.2 respectively.

  2. When I run rviz, I notice the laser topic turning red from time to time, and the status going from OK to error. The error message under the laser topic indicates that there were no messages received. This message appears and then disappears in less than a second, however the messages are quite frequent (more frequent than the warnings). I also notice a fluctuation in the number of points (between 181 and 180 and sometimes even 179). Some posts indicated that this should have been resolved by changing the parameter 'resolution' to 1.0, which I have included in my launch file (see below), but to no avail.

  3. If I control the robot via a joystick, I am able to build a good map as long as I keep the speed really slow (a linear velocity of about 0.14 and an angular velocity of about 0.1).


I am using a ActivMedia PeopleBot robot base with a Sick LMS 291-S05 laser. The laser transmits data to a FitPC3 via a RS232-USB adaptor. (EDIT: This is actually a RS422-USB adaptor, sorry for any confusion caused). The ports/devices are mapped correctly, the device permissions are set.

UPDATE: I run rviz from a remote pc through a wireless connection. ROSCORE runs on the fitpc3 that moves with the robot.


I ran the SickLMS config file (laser_drivers/sicktoolbox/sicktoolbox/bin/lmsconfig) which produced the following output.

    ./lms_config /dev/laser 500000

    The Sick LIDAR C++/Matlab Toolbox    
    Sick LMS 2xx Config Utility          

*** Attempting to initialize the Sick LMS...
Attempting to open device @ /dev/laser
    Device opened!
Attempting to ...
edit retag flag offensive close merge delete


Just to verify - is that USB-RS232 adapter RS-422 compatible? If I recall correctly, the SICK has to be at 500Kbaud and RS-422 in order to send data at 75Hz properly.

Eric Perko gravatar image Eric Perko  ( 2012-03-22 08:23:15 -0500 )edit

I will have to check the cable specifications. There is a RS422-RS232 adapter built into the SICK laser's mounting box, which came with the laser.

Shanker gravatar image Shanker  ( 2012-03-23 04:49:26 -0500 )edit

I noticed on another post that you reccommend setting the resolution parameter to 1.0 to correct there being a variation of the number of points received. However with resolution=1.0, I still do not notice in RVIZ that I get a variation between 179 and 181 points from time to time. I mention this.

Shanker gravatar image Shanker  ( 2012-03-23 04:51:52 -0500 )edit

I should note that rviz is showing the number of points displayed on the screen, not necessarily the number of points in the laser scan message (it could be fewer if some are not displayed at all). Can you record and post a short bagfile? Fluctuating number of points does seem bad.

Eric Perko gravatar image Eric Perko  ( 2012-03-23 05:03:07 -0500 )edit

I recommended setting the resolution to 1.0, since that's what corrected the problem for me with the missed scan warnings. However, you should note the resolution of the ticket: the missed scan warnings were removed due to not actually being a good indicator that a scan was missed.

Eric Perko gravatar image Eric Perko  ( 2012-03-23 05:05:08 -0500 )edit

I have set the resolution to 1.0, this does not seem to fix the problem.

Shanker gravatar image Shanker  ( 2012-04-04 03:31:07 -0500 )edit

Yes, you are right. With the update that came with that ticket (4 weeks back), I do not get the warnings anymore.

Shanker gravatar image Shanker  ( 2012-04-05 04:44:11 -0500 )edit

Eric, you were right about the cable. I checked the specifications, and it is infact a RS 422-USB cable and not RS232 I have posted further details of my tests in an update today.

Shanker gravatar image Shanker  ( 2012-04-05 05:34:25 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-04-12 23:58:01 -0500

updated 2012-04-12 23:59:47 -0500

To conclude, the warnings associated with the scans stopped appearing upon update to the latest version of sicklms_wrapper associated with this ticket. It was likely to be not associated with the errors obtained in Rviz as Rviz was running on a remote system via wireless, so it is likely a connection problem. The problems with navigation should be handled separately from this question.

edit flag offensive delete link more

answered 2012-03-22 07:26:57 -0500

dornhege gravatar image

updated 2012-03-22 07:27:33 -0500

Did you try the late_scan_tolerance_factor in the link you pasted? For the 75Hz laser, your warnings come to about 50Hz, so I guess 1.5 or so should remove those warnings.

Besides that the warnings you are getting do not seem that bad. Every couple of seconds a single scan is slightly late (0.02s). That would still come down to 50Hz if the warning would appear all the time and you also report that you usually get 70Hz.

rviz, localization, mapping, etc. should work absolutely fine with those data rates, actually with a lot less. My suspicion is thus, that you are computing too much or scans or lost somewhere else (but not from the driver). Can you check the system load? If that is a problem it might actually help to try to throttle the laser rate down.

edit flag offensive delete link more


Perhaps I have to clarify. There is a 0.02 s scan delay now and then, but sometimes I get a flood of these warning messages which means that they are much more frequent. I am correcting my original message to say this.

Shanker gravatar image Shanker  ( 2012-03-23 04:42:08 -0500 )edit

But you are right that the scan rate reported by rostopic is more than 70hz. top tells me that the cpu is running at 6%.

Shanker gravatar image Shanker  ( 2012-03-23 04:47:18 -0500 )edit

If there are a lot missing that is obviously not good. Also the 179/181 problem should result in slightly wrong scans that might have up an angular error build in.

dornhege gravatar image dornhege  ( 2012-03-23 05:45:49 -0500 )edit

Although these should be correct I'd still say that results should be way better than the screenshot. Can you a) look that the scans are correct and somehow look like at least 10 Hz, b) Verify the tests here under 1)

dornhege gravatar image dornhege  ( 2012-03-23 05:52:29 -0500 )edit

Depending on what you want to achieve it might be a good idea to split that into a different question. This should be about the laser driver behaving correctly independent of navigation.

dornhege gravatar image dornhege  ( 2012-03-23 05:53:48 -0500 )edit

The reason I included the navigation aspect was to indicate a symptom of the problem that I am facing. I agree with the principle of splitting the question if I find out that, the laser throwing up these warnings and rviz noting that scans are very occasionally missed, are normal behavior.

Shanker gravatar image Shanker  ( 2012-04-04 03:27:55 -0500 )edit

In order to verify this, I will post a bag of the laser scans, and print the error output of the laser scanner for about a minute.

Shanker gravatar image Shanker  ( 2012-04-04 03:29:16 -0500 )edit

Please note an update regarding further tests performed and also finding out that the cable I was using is RS422-USB and not RS232-USB.

Shanker gravatar image Shanker  ( 2012-04-05 05:37:04 -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


Asked: 2012-03-22 06:35:19 -0500

Seen: 1,060 times

Last updated: Apr 12 '12