-
Notifications
You must be signed in to change notification settings - Fork 0
ACRE SLAM Go2 Packge
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.
Our SLAM stack uses the following libraries:
The following resources are helpful for understanding the sensors and how they interact with the Unitree SDK:
Using the Mid360 LiDAR requires configuration before it can be used.
- Connect to the Go2 via Ethernet and disable obstacle avoidance using the controller
- 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.
- 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=52428800If 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- Give permission to execute the needed binaries
sudo chmod 777 -R /unitree/module/unitree_slam- Check the SLAM configuration files
cat /unitree/module/unitree_slam/config/slam_interfaces_server_config/param.yamlThe 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.yamlcheck that T_Dog2lidar is set to the following value
T_Dog2lidar: [0.0, 0.0, 0.0, 0.0, 0.226, 0.0]- 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- Install the acre_slam package
- 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.bashEnsure that you have already followed the steps in Go2 Networking Configuration
- Run
ifconfigin a terminal and copy the name of the Network Interface connected to the Go2 - In
unitree_setup.bashsetNetworkInterface name="your_interface_name" - Run
source ./unitree_setup.bash - Run
ros2 topic listto test your installation - 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- Run the following command:
ros2 run glim_ros glim_rosnode --ros-args -p config_path:=/workspace/src/acre_slam/config/glim- Ensure that GLIM is running, then run the following command:
ros2 launch acre_slam nav2_costmap.launch.py