SICKAG / sick_scan_xd

A versatile driver for a wide range of SICK LiDAR and RADAR devices, providing support for both Linux (native, ROS 1, ROS 2) and Windows (native, ROS 2) platforms.
Apache License 2.0
110 stars 86 forks source link

CMD Buffer Issue #384

Closed EgeSaykan closed 2 months ago

EgeSaykan commented 3 months ago

Hello,

I am trying to connect to a LD-MRS 400001 through Ros2 Iron on Ubuntu 22.04 desktop. I have completed installation and build using sick_scan_xd build guide.

When I t tried to connect to the scanner on port 192.168.0.1, it didn't recognise the scanner as a scanner but just as an ethernet connection.

So I installed Sopas ET on my windows machine and realised the IP of the scanner is different to default value. I changed the hostname to that new ip (169.254.xxx.xxx), I believe this is a factory default value that is compatible with windows but not Linux, because the Linux driver still couldn't find a device with that IP. So instead I decided to change the IP of the sensor. Using the Sopas ET I changed the IP to 192.168.0.1. Also on Sopas ET I managed to get readings on GUI via the scanner, so I know that the scanner does work.

Then when I tried to connect to the device with ros2 on my ubuntu desktop, it managed to connect, but the buffer would get 0x8011 code rather than 0x0011.

This resulted was flagged as an error on libsick_ldmrs/src/devices/LuxBase.cpp on line 2421.

if (cmdInBuffer == 0x8000 + cmd)
{
    printWarning("LuxBase::receiveMrsReply: " + m_longName + " Received that an error occurred.");
    result = false;
    break;
}

I could not find any explanation why I am getting 0x8011 instead of 0x0011 and why is that an error. Any help would be greatly appreciated.

This issue was initially posted on libsick_ldmrs.

Thanks in advance, Ege

rostest commented 3 months ago

Thanks for your feedback. sick_scan_xd uses libsick_ldmrs to handle the lidar communication and configuration. My understanding is that value 0x8011 just means that the lidar failed to execute command id 0x0011 ("get parameter") for some reason. Can you find out which parameter was requested?

The previous ip address 169.254.x.x suggests that DHCP was used initially. Make sure that DHCP is disabled in the lidar settings and that both the lidar and PC are using static ip addresses on the same subnet.

Make sure that you are using the latest firmware version and the latest libsick_ldmrs and sick_scan_xd releases. Older firmware versions may not support all parameters. Use SOPAS ET to check for updates.

Please contact SICK support, if the problem persists and libsick_ldmrs does not have further information.