Velodyne VLP-16¶
🐳 Start Container¶
Make sure your system meets the system requirements and have followed the setup instructions before using this workspace.
Run the following commands in a Ubuntu desktop environment. If you are using a remote server, make sure you're using a terminal within a remote desktop session (e.g., VNC) instead of SSH (i.e., don't use ssh -X
or ssh -Y
).
cd ~/ros2-essentials/vlp_ws/docker
docker compose build
xhost +local:docker
docker compose up -d
# The initial build will take a while, please wait patiently.
If your user's UID is
1000
, you may replace thedocker compose build
command withdocker compose pull
.
The commands in the following sections assume that you are inside the Docker container:
If the initial build somehow failed, run:
Once you have finished testing, you can stop and remove the container with:
Simulation Setup¶
Add description in defined robot¶
-
Declared necessary argument and your own
robot_gazebo.urdf.xacro
-
Include the
velodyne_description
package -
Add LiDAR in the robot
- You could refer to more information from
veloyne_simulator/velodyne_description/urdf/template.urdf.xacro
Launch LiDAR driver with simulated LiDAR¶
- Launch example robot with LiDAR
- Launch the LiDAR data process without driver in another terminal
Sample Robot¶
- A given turtlebot waffle model with VLP-16 is provided in
velodyne_simulator/velodyne_simulator/urdf/sample_robot.urdf.xacro
- Launch the sample robot
LiDAR setup¶
Hardware Setup¶
- Connect the LiDAR to power.
- Connect the LiDAR to the computer or router using the provided ethernet cable.
Directly Using Computer¶
- Connect the LiDAR to the computer using the ethernet cable.
- Open the computer settings and navigate to Network > Wired.

- Set the IPv4 configuration to 'manual' and configure the settings as shown in the image below:

Launch the Driver¶
Pipeline¶
- Data process as following: raw data -> pointcloud -> laser scan -> slam method
- Velodyne driver:
velodyne_driver
get the raw data from LiDAR. - Transform the raw data to pointcloud:
velodyne_pointcloud
- Transform the pointcloud to laser scan:
velodyne_laserscan
Operating in a single launch file¶
- By the above command, the driver, pointcloud and laserscan will be launched.
Published topics¶
Topic | Type | Description |
---|---|---|
/velodyne_packets |
velodyne_msgs/VelodyneScan |
raw data |
/velodyne_points |
sensor_msgs/PointCloud2 |
Point cloud message |
/scan |
sensor_msgs/LaserScan |
laser scan message |
Test with cartographer¶
- In another terminal, launch the cartographer node:
Bringup¶
- Build the docker image and workspace
- LiDAR driver
- After launching the driver, launch the cartographer in another terminal