Ask Your Question

Revision history [back]

The recommended way would be adding the LIDAR setup to the URDF model of your robot. You can find the URDF tutorials here. You then just need to publish the required joint state for the rotating joint of your setup and you should be all set.

A (perhaps relatively complex) real-world example is the rotating LIDAR macro we use for our Tracker robot. See tracker_spinning_lidar_mount.urdf.xacro.xml. The macro is instantiated (i.e. used for actually adding the rotating LIDAR to the robot model) here in tracker_structure_addons.urdf.xacro.xml. Note this setup is relatively complex because it also provides ability to define calibration of the LIDAR on the spindle as well as full Gazebo simulation capability.