Skip to content

ACRE SLAM Go2 Packge

Nicholas Sutton edited this page Jul 12, 2026 · 17 revisions

ACRE SLAM

Introduction

The acre_slam package is a ROS2 SLAM package for the Unitree Go2. Before using acre_slam, please familiarize yourself with the basics of using the Unitree Go2.

Overview

Our SLAM stack uses the following libraries:

The following resources are helpful for understanding the sensors and how they interact with the Unitree SDK:

Go2 Mid360 LiDAR Config

Using the Mid360 LiDAR requires configuration before it can be used.

  1. Connect to the Go2 via Ethernet and disable obstacle avoidance using the controller
  2. Follow the steps in Go2 Networking Configuration and connect to the NVIDIA Orin using ssh

Warning

When connecting to the NVIDIA Orin, you will be prompted to select a ROS2 version. Sourcing a ROS2 version will conflict with the SLAM packages used by the Go2. Hit the ENTER key to skip this.

  1. Check that the data reception and transmission buffer sizes are set correctly:
cat /etc/sysctl.conf | grep -E "rmem_max|wmem_max"
# The values should be set to
# net.core.rmem_max=52428800
# net.core.wmem_max=52428800

If these values are not set run the following commands:

sudo su
echo "net.core.rmem_max=52428800" >> /etc/sysctl.conf
echo "net.core.wmem_max=52428800" >> /etc/sysctl.conf
sysctl -p
  1. Give permission to execute the needed binaries
sudo chmod 777 -R /unitree/module/unitree_slam
  1. Check the SLAM configuration files
cat /unitree/module/unitree_slam/config/slam_interfaces_server_config/param.yaml

The settings under the Go2 section should match our Go2's configuration. The most important settings to check are:

lidar_type: "mid360"
lidar_ysn: "..." # This value can be found by scanning the left QR code on the LiDAR
lidar_ip: "192.168.123.20"
cat /unitree/module/unitree_slam/config/gridmap_config/config.yaml

check that T_Dog2lidar is set to the following value

T_Dog2lidar: [0.0, 0.0, 0.0, 0.0, 0.226, 0.0]
  1. To activate the Mid360 LiDAR driver, run:
cd /unitree/module/unitree_slam/bin
./mid360_driver # & to run it in the background
# If you encounter a segfault, try running:
# LD_LIBRARY_PATH=/opt/unitree_robotics/lib:$LD_LIBRARY_PATH ./mid360_driver

Installation

  1. Install the acre_slam package
  2. Build and run the Docker container:
docker build --build-arg CUDA=true -t acre_slam . # Use CUDA=false if you don't want to use the gpu
./run.bash

ROS2 Network Configuration

Ensure that you have already followed the steps in Go2 Networking Configuration

  1. Run ifconfig in a terminal and copy the name of the Network Interface connected to the Go2
  2. In unitree_setup.bash set NetworkInterface name="your_interface_name"
  3. Run source ./unitree_setup.bash
  4. Run ros2 topic list to test your installation
  5. You can turn off the Go2s onboard LiDAR with the following commands:
# Turn the LiDAR off
ros2 topic pub /utlidar/switch std_msgs/msg/String "data: 'OFF'" --once

# Turn it back on
ros2 topic pub /utlidar/switch std_msgs/msg/String "data: 'ON'" --once

Running GLIM SLAM

  • Run the following command:
ros2 run glim_ros glim_rosnode --ros-args -p config_path:=/workspace/src/acre_slam/config/glim

Running Nav2 Costmap

  • Ensure that GLIM is running, then run the following command:
ros2 launch acre_slam nav2_costmap.launch.py

Clone this wiki locally