-
Notifications
You must be signed in to change notification settings - Fork 72
3D Underwater Lidar
This tutorial will launch a basic tank environment with a 3D lidar sensor mounted to a pedestal and a hovering cylindrical target.
- The sensor uses the GPURaySensor, configured to emulate the properties of 3D at Depth's SL3 underwater lidar.
- The sensor itself covers a fixed field of view but it attached to a stand that can pan and tilt.
This tutorial assumes you have previously [installed the DAVE repositories](roslaunch nps_uw_sensors_gazebo uw_lidar_standalone.launch).
- To launch the environment, run:
roslaunch nps_uw_sensors_gazebo uw_lidar_standalone.launch
- If all goes well Gazebo should launch into a simulation environment that looks like this:
- Note that by default, the simulation is paused and no lidar rays are displayed.
- Click the play icon to unpause.
- The lidar rays will display and the sensor will pan to face the target cylinder.
- The end result will look like this:
The 3D underwater Lidar sensor has the following properties by default:
- The lidar sensor covers a 30° x 30° sector.
- It uses 145 simulated rays in each horizontal and vertical axis.
- The resolution is set to 0.1 to produce 10 data points per ray, resulting in a point cloud of 1450 x 1450 points.
- The default range is set to a maximum of 20 meters
The sensor outputs point cloud data to the following ROS topic:
/nps_gazebo_ros_uw/pulse_lidar/points
The plugin also publishes the following topics which are used to control the sensor stand (see Controlling pan and tilt, below):
/nps_gazebo_ros_static_lidar_robot/lidar_pan_cmd
/nps_gazebo_ros_static_lidar_robot/lidar_tilt_cmd
A basic rviz configuration for visualizing the plugin point cloud data is saved under nps_uw_sensors_gazebo/rviz/uw_lidar.rviz
. To bring up rviz with this configuration:
- Navigate to the root of your catkin workspace. For example:
cd ~/uuv_ws/
- Launch the simulation in Gazebo:
roslaunch nps_uw_sensors_gazebo uw_lidar_standalone.launch
- Unpause the simulation to begin generating point cloud data.
- In a separate terminal, launch RViz using the uw_lidar.rviz configuration file. If you are running from the root of your catkin workspace, the command is:
rosrun rviz rviz -d src/nps_uw_sensors_gazebo/rviz/uw_lidar.rviz
If successful, RViz should launch a separate window that looks something like this:
rostopic pub /nps_gazebo_ros_static_lidar_robot/lidar_pan_cmd std_msgs/Float32 -- 3.14
rostopic pub /nps_gazebo_ros_static_lidar_robot/lidar_tilt_cmd std_msgs/Float32 -- 0.1