Open nickjrz opened 4 years ago
Hello,
Your issue seems similar to #2, maybe changing the Timeout
parameter to 2500
in your RPLIDAR0.txt
configuration file might solve the problem, however I would strongly recommend that you try the latest release as it was improved to support better the RPLIDAR A3 and S1...
Thanks for your quick reply.
I just tried switching the Timeout
parameter to 2500
in the configuration file but did not have any effect and same behavior was still present. I will try updating to the latest release but I want to figure out why it is not working on 18.04 but used to work fine with 16.04, I am guessing it could be some OS configuration for the serial ports.
It seems also that your configuration file might not have the right parameters inside, e.g. motorPWM
was added only in the latest release while the C++ code cited seems to correspond to an older release, or maybe you added it yourself? Note that the order of the parameters is important, I wonder if while reading the configuration file the program interprets that it should start in normal SCAN
mode while later you try to get data as if it was EXPRESS_SCAN
, which would probably give the errors you mention...
The configuration file is the same way as when we used it on 16.04, only thing we changed was the ubuntu release. Program seems to be starting in EXPRESS_SCAN
as I was stepping through the code and it detects the scan mode from the RPLIDAR0.txt
file, correctly.
Another idea : maybe the Ubuntu 18.04 USB driver is different than in 16.04, maybe you could try a version from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers or try to extract the one from 16.04, this Release_Notes.txt suggests that there were changes in Ubuntu 17.04...
That is a good point, I will try using the USB driver from 16.04 as I have also read that people are running into serial ports issues with newer releases of Ubuntu. Did you experience any similar issues yourself when testing the library on 18.04?
I will keep you updated, thanks for the help.
Indeed, I found back the virtual machine I used to test the latest release and noticed in its Downloads
folder that there was the new USB driver Linux_3.x.x_4.x.x_VCP_Driver_Source.zip
inside. dmesg
command says cp210x 3-2:1.0
after plugging the LIDAR. I noticed also the C++ code gives some warnings in the beginning when using EXPRESS_SCAN
mode but it still displays correct data, however it's possible that those warnings were displayed as errors in older versions of the code...
dmesg
gives me cp210x 1-8.4:1.0: cp210x converter detected
after plugging the lidar. I tried using the latest release and I can get them to start but when I try to do this [result, distances, angles, bNewScan] = GetOtherScanDataResponseRPLIDAR(pRPLIDAR{i});
I get the following warning messages:
Warning : RPLIDAR bad check bit.
Warning : RPLIDAR bad inversed start bit.
When the lidars initialize it also gives the warning Warning : RPLIDAR bad start flag
Yes, I have also those warnings sometimes but normally you should still get valid data and you can safely ignore the warnings. Also, if you have problems you can try the "with_3rd_support" version of the release, which should use internally the Slamtec SDK, which should not produce those warnings... I confirm that it should work also with Ubuntu 20.04.
I just saw that you added a 's' to RPLIDAR, note that at the moment I only have 1 A3...
Thanks for confirming that. I was able to get them all to work, it seems that using ReadAllRS232Port
to receive data has some conflicts on 18.04, it works on 16.04 though. It could possible be something related to the UART USB driver difference. I modified the way we receive data to use GetRawExpressScanDataResponseRPLIDAR
for the latest version of library and that seems to have solved the problem of receiving data and communicating to the lidars.
Hi,
Previously I was using ubuntu 16.04 and using this library with the RPLIDARs A3, when I tried upgrading to 18.04 LTS the lidars start but I receive the following error messages on console. It seems that I am able to communicate to the lidars and I am able to see them on my serial ports but there is some issue with the communication somehow. The ubuntu installation has LVM setup and I also did a minimal installation of the OS.
The following file contains our settings, scan mode, etc.
Any help is much appreciated.