SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
101 stars 84 forks source link

LMPoutputRange Problem #322

Closed CTech-dev0 closed 4 months ago

CTech-dev0 commented 5 months ago

Hi.

I'm running the driver for linux native (no ROS) and I'm having some issues with the Lidar.

I'm using a Tim561 (V2.51) The problem happens when sending STX>sWN LMPoutputRange | 0x00 0x01 | 0x00 0x00 0x0d 0x05 | 0x00 0x00 0xbb 0xa0 | 0x00 0x29 0x32 0xe0 | CRC:<0x9f

In the SOPAS ET the device is configured to output data in the 0° - 180° The launch file is written with the following parameters

But the values in the Telegram do not seem to match the defined parameters.

And then I receive

sFA\ x00\x04 = Sopas_Error_LOCALCONDITIONFAILED
rostest commented 5 months ago

Thanks for your feedback. There is probably a misunderstanding regarding the coordinate systems used.

sick_scan_xd uses ros coordinates for all lidars for both configuration (min_ang, max_ang) and exported point cloud data. I.e. the x-axis points forward, y to the left, z up. The default parameters in the launchfile sick_tim_5xx.launch are min_ang=-2.35619449 (-135 deg) and max_ang=2.35619449 (+135 deg), i.e. valid angles are within the range from -135 deg up to +135 deg. The parameter max_ang=3.141592654 resp. 180 deg is therefore invalid.

TiM5xx lidars use internal coordinates with an offset of 90 degrees to ros coordinates. Valid angles are between -45 deg up to +225 deg in lidar coordinates: image

Use min_ang=-1.178097245 (-90 deg) and max_ang=1.178097245 (+90 deg) in the launch file in ros coordinates. This corresponds to an angle range of 0 to 180 degree in lidar coordinates used by "sWN LMPoutputRange" (with a 90 degree offset between ros and lidar coordinates).

CTech-dev0 commented 5 months ago

Thanks ! Now I'm able to run the generic caller.

I'm having other issues with the library. Is okay to post them here instead of making a new issue ?

Regards.

rostest commented 5 months ago

Thanks for your feedback. Problems are often correlated, keep going.