FOV cut functionality fix #555
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous version allowed only to set the
cut_angleparameter cropping the FOV from 0 to n, which I find barely useful. Moreover, its implementation wasn't correct (it actually didn't cut the FOV at all). However, the Velodyne web interface allows for cutting FOV from MIN to MAX angle. This caused disproportion and reduction of publishing frequency.In my case, I needed to cut the FOV of LiDAR from 270 to 90 degrees. Doing so only in the web interface caused the LiDAR to send half number of packets. However, the ROS driver implementation computed
npackets- expected number of packets in one scan assuming 0-360 deg. FOV - based on rotation frequency, then reads the packets from LiDAR in a for loop counting up tonpacketsvalue and only then sending out. As the LiDAR was sending only half of the FOV, the ROS driver would mix up packets from two revolutions together reducing the output frequency by half.In this version, the FOV cut can by set either by
cut_angleparameter cutting from 0 to n radians or by settingfov_start_angleandfov_end_angleparameters defining exact scan sector in degrees.