Gazebo | Ignition | Community
Ask Your Question

Block Laser plugin for Pointcloud2

asked 2019-10-09 07:26:36 -0500

NTkot gravatar image

I am using the block laser plugin from gazebo_ros_pkgs (currently running ROS Melodic and Gazebo9) but I want the output to be a PointCloud2 topic and not PointCloud. I am aware of the fact that there is a convertPointCloudToPointCloud2 in sensor_msgs, but feeding it with a large scale scan causes pretty serious delay issues. There is a fork of the gazebo_ros_pkgs in github (in indigo and jade devel branches) but it's for an older version of ROS (indigo and jade). I was wondering if anyone has found a block laser plugin to work for ros melodic and gazebo9.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-10-19 20:28:14 -0500

wongrufus gravatar image

updated 2020-10-19 20:36:26 -0500

You can consider velodyne's implementation which extends the default gazebo_ros_block_laser to publish PointCloud2

Just run

sudo apt install ros-melodic-velodyne-gazebo-plugins

and replace, in your model.sdf, with

edit flag offensive delete link more


Just some feedback. This solution works fine for me!

Nobel gravatar imageNobel ( 2022-06-02 15:26:39 -0500 )edit

answered 2019-10-14 08:04:06 -0500

chapulina gravatar image

There's an open pull request implementing this for Melodic.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-10-09 07:26:36 -0500

Seen: 1,341 times

Last updated: Oct 19 '20