Skip to content

VP100L LiDAR Usage Instructions

Hint

The operating environment and hardware/software configuration are as follows:

  • LiDAR model: VP100L
  • Communication mode: USB to serial port
  • Recommended system: Ubuntu 22.04 + ROS2 Humble
  • ROS2 package: vp100_ros2
  • LiDAR output topic: /scan
  • Message type: sensor_msgs/msg/LaserScan
Attention

The serial port baud rate of the VP100L should be set to 230400. If the baud rate is set incorrectly, the node may start, but it cannot output /scan data normally.

Package/resource package download link: (you can refer to Kit Resources/Resource Links to download)

1. Scenario Description

The VP100L LiDAR can be used in scenarios such as robot obstacle avoidance, mapping, navigation, and area detection. After the ROS2 driver starts, it publishes the LiDAR scan data as a standard LaserScan topic, which can then be used with RViz2, SLAM, Nav2, or custom obstacle avoidance nodes.

The typical data flow is as follows:

VP100L LiDAR
   ↓ USB/serial port
vp100_ros2_node
   ↓ /scan
RViz2 / SLAM / Nav2 / other nodes

2. VP100L Main Parameters

Parameter Unit Typical value / range Description
Ranging accuracy, white target 80% reflectivity mm ±15mm @ 0.1m-0.5m, STD 3mm; ±20mm @ 0.5m-2m, STD 4mm; ±30mm @ 2m-12m, STD 15mm White highly reflective target
Ranging accuracy, black target 4% reflectivity mm ±20mm @ 0.1m-0.5m, STD 10mm; ±40mm @ 0.5m-6m, STD 15mm Black low-reflectivity target
Scan frequency Hz 6 Fixed frequency
Ranging frequency Hz 3000 Fixed frequency
Pitch angle error ° 0.5 - 1.5 Mechanical installation affects the actual performance
Yaw angle error ° -2 - 2 Can be corrected by installation or by a software angle offset
Angular resolution ° 0.72 About 500 scan points per revolution
Ambient light immunity Klux ≤ 60 It is recommended to verify by actual measurement in strong light environments
Service life H ≥ 1500 According to the documented parameters
Device current mA 350 Typical operating current
Operating temperature ℃ -10 - 45 Exceeding the range may affect ranging stability
Storage temperature ℃ -30 - 70 Storage environment requirement
Laser wavelength nm 895 - 915, typical 905 Infrared band
Laser peak power W 2 Laser peak power
Laser safety class - IEC-60825 Class 1 Class 1 safety level under normal use

3. Hardware Connection and Serial Port Detection

Step 1: Connect the LiDAR

Connect the VP100L LiDAR to the Ubuntu host or the robot main controller board through the USB-to-serial cable. After connection, the system usually creates a serial device such as /dev/ttyUSB0.

View the serial devices in the terminal:

ls /dev/ttyUSB*

You can also view the USB device information:

lsusb

View the plug/unplug log:

dmesg -w

After the LiDAR is plugged in, if you see ttyUSB0, ttyUSB1, or a similar serial device, the system has recognized the USB-to-serial device.

Step 2: Configure Serial Port Permissions

If a serial port permission error is reported when starting the node, such as Permission denied, you can grant permission temporarily:

sudo chmod 666 /dev/ttyUSB0

You can also add the current user to the dialout group, which takes effect permanently:

sudo usermod -aG dialout $USER
sudo reboot
Attention

After running usermod, you need to log in again or restart the system; otherwise, the permission may not take effect immediately.

Step 3: Fix the LiDAR Device Name (Optional)

If multiple serial devices such as the chassis, robotic arm, and LiDAR are connected to the robot at the same time, the number of /dev/ttyUSB0 may change. The driver package provides a udev script that can fix the LiDAR as /dev/nvilidar.

After entering the package directory, run:

cd ~/vp100_ros2_ws/src/vp100_ros2
chmod 0777 startup/*
sudo sh startup/initenv.sh

After the script finishes, unplug and replug the LiDAR, then check the device name:

ls -l /dev/nvilidar

If /dev/nvilidar is displayed, you can change the serial port name in the parameter file to:

serialport_name: "/dev/nvilidar"

4. ROS2 Package Description

The name of the ROS2 driver package in the compressed archive is:

vp100_ros2

The main directory structure is as follows:

vp100_ros2/
├── CMakeLists.txt
├── package.xml
├── launch/
│   ├── vp100_launch.py          # Launch the LiDAR driver
│   ├── vp100_launch_view.py     # Launch the LiDAR driver + RViz2
│   ├── vp100.rviz               # RViz2 configuration file
├── params/
│   └── vp100.yaml               # LiDAR parameter configuration
├── sdk/
│   └── ...                      # LiDAR SDK and serial communication source code
├── src/
│   ├── vp100_ros2_node.cpp      # LiDAR ROS2 publish node
│   └── vp100_ros2_client.cpp    # /scan topic test client
└── startup/
    └── initenv.sh               # udev fixed device name script

After the driver node starts, it publishes the /scan topic for use by RViz2, SLAM, Nav2, or other ROS2 nodes.

5. Build the Package

Step 1: Create a Workspace

mkdir -p ~/vp100_ros2_ws/src
cd ~/vp100_ros2_ws/src

Copy the vp100_ros2 folder into the src directory:

cp -r /path/to/vp100_ros2 ~/vp100_ros2_ws/src/

Replace /path/to/vp100_ros2 with the actual path where the archive was extracted.

Step 2: Install Dependencies

sudo apt update
sudo apt install -y \
  ros-humble-rclcpp \
  ros-humble-sensor-msgs \
  ros-humble-visualization-msgs \
  ros-humble-geometry-msgs \
  ros-humble-std-srvs \
  ros-humble-tf2-ros \
  ros-humble-rviz2 \
  python3-colcon-common-extensions

Step 3: Build the Driver

cd ~/vp100_ros2_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install --packages-select vp100_ros2

After the build is complete, load the environment variables:

source ~/vp100_ros2_ws/install/setup.bash

It is recommended to add this to ~/.bashrc so that it takes effect automatically in new terminals:

echo "source ~/vp100_ros2_ws/install/setup.bash" >> ~/.bashrc
source ~/.bashrc

6. Modify VP100L Parameters

Parameter file path:

~/vp100_ros2_ws/src/vp100_ros2/params/vp100.yaml

The recommended configuration for the VP100L is as follows:

vp100_ros2_node:
  ros__parameters:
    serialport_name: "/dev/ttyUSB0"
    serialport_baud: 230400
    frame_id: "laser_frame"
    resolution_fixed: false
    auto_reconnect: true
    reversion: false
    inverted: false
    angle_min: -180.0
    angle_max: 180.0
    range_min: 0.001
    range_max: 64.0
    aim_speed: 6.0
    sampling_rate: 3
    angle_offset_change_flag: false
    angle_offset: 0.0
    ignore_array_string: ""
    log_enable_flag: true
Attention

In the original parameter file, frame_id may be laser_link, while the static TF published by default in the launch file is base_link -> laser_frame.

To avoid No transform from [laser_link] to [laser_frame] in RViz2 or the LiDAR data not being displayed, it is recommended to change frame_id to laser_frame consistently.

If you have already used udev to fix the device name, change the serial port name to:

serialport_name: "/dev/nvilidar"

7. Launch Steps

This example recommends opening two terminals: the first terminal starts the LiDAR driver, and the second terminal views the topics or opens RViz2.

Step 1: Start the LiDAR Driver

Open the first terminal:

cd ~/vp100_ros2_ws
source install/setup.bash
ros2 launch vp100_ros2 vp100_launch.py

After a successful start, the terminal prints the VP100 driver version information and begins connecting to the LiDAR.

If the LiDAR serial port, baud rate, and permissions are configured correctly, /scan data is published continuously.

Step 2: Check Whether the Topic Exists

Open the second terminal:

cd ~/vp100_ros2_ws
source install/setup.bash
ros2 topic list

Under normal conditions, you should see:

/scan

View the /scan data:

ros2 topic echo /scan

View the publish rate:

ros2 topic hz /scan

The nominal scan frequency of the VP100L is 6Hz, and the actual frequency should be close to this value.

Step 3: View Data with the Test Client

The driver package provides a simple /scan subscription test program:

ros2 run vp100_ros2 vp100_ros2_client

This program prints angle and distance information, which is suitable for quickly confirming whether the LiDAR is outputting valid scan points.

Step 4: Display the LiDAR Point Cloud in RViz2

Option 1: Open RViz2 separately:

rviz2

Set the following in RViz2:

Fixed Frame: laser_frame
Add -> LaserScan -> Topic: /scan

Option 2: Use the visualization launch file provided by the driver package:

ros2 launch vp100_ros2 vp100_launch_view.py
Attention

If vp100_launch_view.py reports a node_executable parameter error when launched under ROS2 Humble, open the file and change:

node_executable='vp100_ros2_node'

to:

executable='vp100_ros2_node'

After the change, rebuild or re-source the workspace.

8. Parameter Description

Parameter Recommended value Description
serialport_name /dev/ttyUSB0 or /dev/nvilidar LiDAR serial device name
serialport_baud 230400 VP100L baud rate, must be correct
frame_id laser_frame Name of the coordinate frame in /scan messages
resolution_fixed false Whether to fix the number of points output per revolution
auto_reconnect true Whether to reconnect automatically after the LiDAR disconnects
reversion false Reverse the scan direction
inverted false Invert the data direction
angle_min -180.0 Minimum scan angle
angle_max 180.0 Maximum scan angle
range_min 0.001 Minimum valid range
range_max 64.0 Maximum valid range limit; the actual valid distance depends on the LiDAR model
aim_speed 6.0 Target scan frequency; fixed at about 6Hz for the VP100L
sampling_rate 3 Sampling rate, corresponding to 3000 points/second
angle_offset_change_flag false Whether to enable the angle offset
angle_offset 0.0 Angle offset value
ignore_array_string "" Filter specified angle ranges
log_enable_flag true Whether to enable log output

Angle filtering example:

ignore_array_string: "30,60,90,120"

This means filtering the points in the two angle ranges 30°-60° and 90°-120°.

9. Use with the Chassis / Nav2

If you use the VP100L for robot navigation, it is recommended to unify the coordinate frames:

base_link  ->  laser_frame

The driver launch file already contains a static TF:

base_link to laser_frame, with a Z offset of 0.02m

If the actual installation position of the LiDAR is different, modify the parameters of static_transform_publisher in vp100_launch.py:

arguments=['0', '0', '0.02', '0', '0', '0', '1', 'base_link', 'laser_frame']

The parameter order is:

x y z qx qy qz qw parent_frame child_frame

For example, if the LiDAR is installed 0.12m in front of the robot at a height of 0.08m, change it to:

arguments=['0.12', '0', '0.08', '0', '0', '0', '1', 'base_link', 'laser_frame']
Attention

Nav2, SLAM, and RViz2 are very sensitive to TF. The frame_id of /scan must be transformable to base_link, odom, or map through the TF tree; otherwise, the topic may exist but the data cannot be displayed, mapping may drift, or navigation may not work.

10. Quick Verification Command Summary

# 1. View the serial port
ls /dev/ttyUSB*

# 2. Grant temporary permission to the serial port
sudo chmod 666 /dev/ttyUSB0

# 3. Build
cd ~/vp100_ros2_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install --packages-select vp100_ros2
source install/setup.bash

# 4. Start the LiDAR
ros2 launch vp100_ros2 vp100_launch.py

# 5. View the topics
ros2 topic list
ros2 topic echo /scan
ros2 topic hz /scan

# 6. Display in RViz2
rviz2

If you only use the VP100L, it is recommended to keep params/vp100.yaml as follows:

vp100_ros2_node:
  ros__parameters:
    serialport_name: "/dev/nvilidar"
    serialport_baud: 230400
    frame_id: "laser_frame"
    resolution_fixed: false
    auto_reconnect: true
    reversion: false
    inverted: false
    angle_min: -180.0
    angle_max: 180.0
    range_min: 0.001
    range_max: 64.0
    aim_speed: 6.0
    sampling_rate: 3
    angle_offset_change_flag: false
    angle_offset: 0.0
    ignore_array_string: ""
    log_enable_flag: true

This avoids common problems such as serial port number changes, baud rate errors, and RViz2 coordinate frame mismatches.

Image 1