ros-perception / pointcloud_to_laserscan

Converts a 3D Point Cloud into a 2D laser scan.
http://wiki.ros.org/pointcloud_to_laserscan
BSD 3-Clause "New" or "Revised" License
424 stars 285 forks source link

Increase the range of available min & max angle. #90

Open 0RayZhang0 opened 7 months ago

0RayZhang0 commented 7 months ago

Thank you for this very convenient and helpful plugin. However, there is a problem of data loss when the output.max and output.min are out of the range -π to π because the result of function std::atan2 is between -π to π. I have made some simple modifications to make it suitable for any desired angle.

This code has been tested under the PX4 Collision Prevention module where (0,2π) is needed.