slide: https://tzf230201.github.io/unitree-go2w-autonomous-carrier/
The images below show the SLAM result and the real environment used in the experiment.
image_3 shows the map produced by the SLAM pipeline.
image_4 shows the real-world location corresponding to the SLAM experiment.
| Package | Description |
|---|---|
FAST_LIO_ROS2_HesaiLidar_XT16 |
FAST-LIO2 with native Hesai PandarXT-16 support (no Livox dependency required) |
HesaiLidar_ROS_2.0 |
Default Hesai LiDAR ROS 2 driver |
go2w_fast_lio2 |
Launch & config for FAST-LIO2 + Hesai driver on Go2W |
go2w_description |
Go2W URDF/xacro robot description |
go2w_joints_state_and_imu_publisher |
Joint states & IMU publisher for Go2W |
go2w_cmd_vel_control |
Velocity control for Go2W |
pointcloud_to_laserscan |
Convert 3D point cloud to 2D laser scan |
cd ~/ros2_ws/src/git clone --recurse-submodules https://github.com/tzf230201/unitree-go2w-autonomous-carrier.gitcd LIO-SAM
git checkout ros2
cd ..sudo apt install ros-humble-perception-pcl \
ros-humble-pcl-msgs \
ros-humble-vision-opencv \
ros-humble-xacro \
ros-humble-pcl-conversions
sudo apt-get install libboost-all-dev libyaml-cpp-devcd ~/ros2_ws
# Build hesai_ros_driver first
colcon build --packages-select hesai_ros_driver
# Source, then build fast_lio (native Hesai support, no Livox SDK needed)
source install/setup.bash
colcon build --packages-select fast_lio
# Source, then build remaining packages
source install/setup.bash
colcon buildsource ~/ros2_ws/install/setup.bash
ros2 launch go2w_fast_lio2 fast_lio2.launch.py rviz:=trueThis launches:
- Hesai LiDAR driver (default, publishes
/lidar_points) - FAST-LIO2 with native Hesai handler (
lidar_type: 5) - Go2W robot description & joint state publisher
- RViz2 (optional, disable with
rviz:=false)
The go2w_nav2 SLAM launch now starts the required navigation stack around FAST-LIO2:
go2w_fast_lio2is launched automatically by default with FAST-LIO RViz disabled/Odometryis projected into a planar/odom- FAST-LIO point cloud is converted into
/scan slam_toolbox, Nav2, RViz, andgo2w_cmd_vel_controlare launched together
Run:
source ~/ros2_ws/install/setup.bash
ros2 launch go2w_nav2 slam.launch.pyIf you already launched FAST-LIO2 in another terminal, disable the internal include:
source ~/ros2_ws/install/setup.bash
ros2 launch go2w_nav2 slam.launch.py launch_fast_lio:=falseUseful options:
# Disable Nav2 RViz
ros2 launch go2w_nav2 slam.launch.py nav2_rviz:=false
# Disable cmd_vel bridge to the robot
ros2 launch go2w_nav2 slam.launch.py launch_cmd_vel_bridge:=falseHow to use RViz:
- Wait a few seconds until FAST-LIO2, SLAM, and Nav2 are all active.
- Use
2D Pose Estimateto set the robot initial pose on the map. - Use
2D Goal Poseto send a navigation goal. - When navigation is successful, Nav2 publishes
/cmd_vel, andgo2w_cmd_vel_controlforwards it to/api/sport/request.
Important notes for successful go2w_nav2 operation:
go2w_nav2depends on valid/scan,/odom,/map, and TF betweenmap -> odom -> base_footprint.- The package includes a planar odometry projector and pointcloud-to-laserscan converter because Nav2 and
slam_toolboxexpect 2D navigation data. - The Nav2 behavior tree XML files must be set correctly. If they are empty, RViz goals are accepted but immediately fail with
Behavior tree threw exception: Empty Tree. - If a goal is received but the robot does not move, check whether
/navigate_to_pose/_action/statusbecomes6(ABORTED). - If old processes are still running, restart the launch completely after rebuilding:
source ~/ros2_ws/install/setup.bash
ros2 launch go2w_nav2 slam.launch.pyIf you want to use a Livox LiDAR instead, install Livox SDK2 and livox_ros_driver2:
# Install Livox SDK2
cd /tmp
git clone https://github.com/Livox-SDK/Livox-SDK2
cd Livox-SDK2
mkdir build && cd build
cmake .. && make -j$(nproc)
sudo make install
# Build livox_ros_driver2
cd ~/ros2_ws
colcon build --packages-select livox_ros_driver2 \
--cmake-args -DROS_EDITION=ROS2 -DHUMBLE_ROS=humble
# Rebuild fast_lio (will auto-detect livox_ros_driver2 and enable Livox support)
source install/setup.bash
colcon build --packages-select fast_lioimage_2 shows the Nav2 result from the older version using LIO-SAM (see Realeases V1) of the program and is kept here as a reference.
-
go2w_joints_state_and_imu_publisheris modified from: https://github.com/felixokolo/go2_slam_2d_3d/tree/main/src/go2_joints_state_publisher -
go2w_cmd_vel_controlis modified from: https://github.com/TechShare-inc/go2_unitree_ros2.git -
pointcloud_to_laserscanfrom: https://github.com/felixokolo/pointcloud_to_laserscan/tree/97c195bbc84f410263178a02ee1117b661a45015 -
FAST_LIO_ROS2_HesaiLidar_XT16is based on FAST-LIO2 with added native Hesai point cloud support and optional Livox dependency



