Low scan rate using sicktoolbox_wrapper, warn: "A scan was probably missed. The last scan was n seconds ago"
Hi
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:
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: http://tinypic.com/r/akzi86/5. 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.
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.
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).
Setup
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.
Debug
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 ...
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.
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.
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.
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.
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.
I have set the resolution to 1.0, this does not seem to fix the problem.
Yes, you are right. With the update that came with that ticket (4 weeks back), I do not get the warnings anymore.
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.