Rplidar does not support A1M8-R6 firmware version

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
tciii
 
Posts: 21
Joined: Mon Apr 08, 2013 1:23 pm

Rplidar does not support A1M8-R6 firmware version

Post by tciii »

SBC: Rpi 3B+
OS: Latest Buster Desktop

I have both a Slamtec A1M8-R5 and a A1M8-R6 which is the latest hardware and firmware (v 1.29)

When I run "display_lidar_pi" using my A1M8-R5, I get the expected Lidar display on my LCD display.

When I run "display_lidar_pi.py" using my A1M8-R6, I get the following error message: "adafruit_rplidar .rplidar exception: wrong body size"

I have searched the IoT for a possible solution to the "adafruit_rplidar .rplidar exception: wrong body size" error, but have experienced no joy.

The A1M8-R5 is two years old and is running an early version of the A1M8 firmware. The A1M8-R6 is running the latest firmware.

Obviously the Adafruit RPLidar module is taking an exception to the latest A1M8-R6 firmware, but has no issue with the A1M8-R5 firmware.

I am using the Adafruit RPLidar module with both the A1M8-R5 and R6 on my Donkey Car platform and have no issues connecting with either A1M8 and collecting data.

Is there a line of code in the "display_lidar_pi.py" program that can be adjusted to overcome the dreaded "adafruit_rplidar .rplidar exception: wrong body size" error?

Here is the complete error message"

pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
{'model': 24, 'firmware': (1, 29), 'hardware': 7, 'serialnumber': '14342370f79ce5c5d49ae5c9f699f18c'}
Traceback (most recent call last):
File "display_lidar_pi.py", line 55, in <module>
for scan in lidar.iter_scans():
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_rplidar.py", line 508, in iter_scans
for new_scan, quality, angle, distance in iterator:
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_rplidar.py", line 433, in iter_measurements
raw = self._read_response(dsize)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_rplidar.py", line 261, in _read_response
raise RPLidarException("Wrong body size")
adafruit_rplidar.RPLidarException: Wrong body size

User avatar
tciii
 
Posts: 21
Joined: Mon Apr 08, 2013 1:23 pm

Re: Rplidar does not support A1M8-R6 firmware version

Post by tciii »

Update:

I have found that if I run the "Usage Example" Python programhttps://github.com/adafruit/Adafruit_Ci ... on_RPLIDAR I can get the RPLidar range data displayed as sequential millimeter readings on my LCD display for both the A1M8-R5 and the A1M8-R6, but still cannot display the A1M8-R6 range data as dots scaled to fit my LCD display as I can with the A1M8-R5 when running "display_lidar_pi.py".

There is obviously an issue with "display_lidar_pi.py"https://learn.adafruit.com/slamtec-rpli ... spberry-pi that is occurring with the A1M8-R6 that is not occurring with the A1M8-R5 which will display the range data as dots scaled to fit my LCD display.

User avatar
adafruit2
 
Posts: 22111
Joined: Fri Mar 11, 2005 7:36 pm

Re: Rplidar does not support A1M8-R6 firmware version

Post by adafruit2 »

hiya where did you buy the A1M8-R6?

User avatar
tciii
 
Posts: 21
Joined: Mon Apr 08, 2013 1:23 pm

Re: Rplidar does not support A1M8-R6 firmware version

Post by tciii »

adafruit2 wrote:hiya where did you buy the A1M8-R6?
I bought it from the same place that I bought my A1M8-R5 from.

It doesn't matter where I bought the A1M8-R6 from as there is a missing "timeout" value in the Adafruit "display_lidar_pi.py" Python program.

Once I added the missing "timeout" value the A1M8-R6 correctly displayed the expected dot pattern on my LCD display.

No further assistance is required.

User avatar
adafruit2
 
Posts: 22111
Joined: Fri Mar 11, 2005 7:36 pm

Re: Rplidar does not support A1M8-R6 firmware version

Post by adafruit2 »

ok it sounds like you did not get the sensor from adafruit? in which case we cannot replicate your issue

please submit a PR with the changes to the example program so others can benefit

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”