Closed ajsampathk closed 9 months ago
Hi @ajsampathk, thank you for this investigation and your work! I must say that I would have to put some more time into an investigation of gazebo laser plugin to determine how does it exactly work.
Nonetheless, your proposition sounds reasonable, in terms of compatibility and added value. We would be really grateful if you will make a PR with your proposed changes. Now, in December, we have a lot of work closing ongoing topics, but we would surely dedicate time to make a review and merge this PR in the first half of January.
Thank you for your contribution!
Feature request
The plugin only supports publishes
PointCloudPacked
messages, this is fine for most cases, however, for a 2D lidar (vertical samples =1), it would make sense to haveLaserScan
being published instead of a point cloud. The gazebo_plugin takes care of this somehow and publishes laser scan for 2D lidars. At this point I am not entirely sure how or where the decision is made in that plugin.And trying to use pointcloud_to_laserscan to get around this also has its own draw backs, namely, it does not copy intensity values refer here and adds overhead.
I have a suggestion here and a branch with these changes that have been tested,
publish_laserscan
param to the sdf parserpublish_laserscan
param set to true, AND the number of vertical samples is 1, thenresultDistances
API to get the rangesLaserScan
msg instead of aPointCloudPacked
msg.PointCloudPacked
msgPlease let me know if this is a useful addition and I would be happy to create a PR with these changes or add any other modifications.
Thanks!