Closed SimoneMic closed 4 months ago
After debugging the code yarp-device-rplidar and the Slamtech SDK, I found that the core dump happens in this line of code from the manufacturer's SDK.
When the code tries to get the device info and to communicate with the lidar, it seems that the channel is not able to properly get the data and has a buffer overflow, crashing everything.
Since the SDK code is the same used on ergoCubSN000
, it is likely an hardware problem. It could be both the lidar or the Serial to USB device converter.
Has any of these devices already been tested separately?
I have also tried to check the serial communication on the port /dev/ttyUSB0
using screen
or cutecom
but both weren't able to open the port.
Also using the slamtech frame_grabber
for debugging the lidar via terminal gives this error:
ergocub@ergocub-head:/usr/local/src/robot/tmp/rplidar_sdk/output/Linux/Release$ sudo ./ultra_simple --channel --serial /dev/ttyUSB0 1000000
[sudo] password for ergocub:
Ultra simple LIDAR data grabber for SLAMTEC LIDAR.
Version: 2.1.0
Error, cannot bind to the specified serial port /dev/ttyUSB0.
It would be helpful to have access directly to the lidar to further debug it with another PC
cc @randaz81
Has any of these devices already been tested separately?
Hi @SimoneMic,
The Lidar was not tested before the delivery. AMI Research Line was already aware of this and honestly, I don't remember if HSP has been informed or not by @AntonioConsilvio and/or @AntonioAzocar.
Anyway, thank you for your feedback. Once we get the robot back to proto we'll fix/test the Lidar.
cc @Nicogene @mfussi66 @martinaxgloria @Gandoo
Hi @SimoneMic,
Is there any news on the RPLIDAR S2? @AntonioConsilvio said to me that yesterday you tested the sensor and it works correctly, right?
Hi,
Yes, yesterday I've launched it more times to see if it was working and the device was loading properly. I was also able to see it on ros2.
Honestly I don't know what changed from last year, but luckily it works now.
I close this issue for now (hopefully forever) if anything else arises I will eventually reopen it
Re-opening this issue since today with @AntonioConsilvio this issue re-emerged.
We also tried to attach a new lidar (the one destined to SN002) to the board and the same behavior occured.
For completeness, we tested the second lidar (the one for SN002) on the laptop and it worked fine.
We used the same yarprobotinterface config file
. The only difference was that, while compiling the yarp-device-rplidar
on the laptop, we had two errors on the lidar vendor sdk at this line and this line. After fixing the compile error it was running fine on the laptop.
We also tried to port this change to the head, but to no avail.
Actually I don't know what could it be, the lidar and the connections (cables, UART and USB converter) seem fine. The only further test that I can think of is to test the lidar on a new board (maybe we could use the SN002 one, on the bench)
Closing this issue (hopefully forever) since I have found the solution to this.
There was a problem with permissions on the port /dev/ttyUSB0
.
I think that the coredump is due to the code (from vendor or linux library) is trying to read the pointer to the serial buffer, which wasn't having the permission to read the stream, thus returning a null pointer. When trying to access this null pointer, the coredump happens.
I'll post the sequence that I have done for completion, although only the last step is relevant.
dialout
groupsudo chmod 777 /dev/ttyusb0
As general rule, if the user loses the permissions to read/write ports, the second command solves the issue.
Robot Name 🤖
ergoCub 1.1 S/N:001
Request/Failure description
When launching the yarprobotinterface that starts the lidar, it core dumps at startup suddenly without any errors. The file used is the same one used for
ergocubSN000
Detailed context
For additional information see the following issue opened on yarp-device-rplidar issue: https://github.com/robotology/yarp-device-rplidar/issues/3
The error print on the terminal when launching the YRI is:
Additional context
The communication seems to ok (on
/dev/ttyUSB0
), I can see the port used for the bridge USB to UART used by the lidar (if I am not mistaken) using the commandusb-devices
:And also from the following command the port of the lidar seems to be present:
Could it be a faulty lidar, power supply issue or firmware version? cc @randaz81
How does it affect you?
Unable to navigate