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
107 stars 87 forks source link

How to get the r(ring) and t(time stamp) of MultiScan #175

Closed Jonny0816 closed 1 year ago

Jonny0816 commented 1 year ago

We can get the xyzi information with the cloud topic, but did not find any information about r and t, please kindly explant how to get it, Thanks.

michael1309 commented 1 year ago

Thank you for your inquiry. You can calculate the elevation from the Cartesian data as follows and then map it to an integer value corresponding to the ring position index.

$$ \text{elevation} = \text{atan}(z,\sqrt{(x^2+y^2)}$$

For debugging purposes you can also calculate the azimuth angle from the Cartesian data via

$$ \text{azimuth} = \text{atan}(y,x)$$

For the timestamp of a single shot, you can refer to the generation timestamp which corresponds to the first shot of a segment. From the rotation speed and the angle difference from shot to shot you can calculate the exact generation timestamp of each shot.

Jonny0816 commented 1 year ago

Thanks for the reply, you mean under current cloud topic cannot get the r and t information directly and need to calculate them with above formula you share, right? Thanks

michael1309 commented 1 year ago

Yes, that is correct. The information is currently not included in the pointcloud in order not to have to transfer too much data.