This page will guide you through getting started with SLAM on the Unitree A1 using ROS and the RPLIDAR. It uses the ROS install slam/RPLIDAR files included on the non-realtime PC within the dog. I will assume you have read and understand the Unitree A1 Getting Started page.
The schematic below is taken from the A1 Developer Guide, which can be useful, but has limited information, especially in terms of ROS/SLAM. Of interest are the non-realtime ARM-based PC and the Lidar.
The x86 PC is located at the rear of the dog, the Nvidia TX2 is located at the front, and the RPLIDAR is mounted to the top. As the Nvidia TX2 already has Ubuntu, ROS, and some RPLIDAR stuff pre-installed, that is what we will use to run the SLAM stuff.
To begin, take the bag with the RPLIDAR power and ethernet cable.
These need to be plugged into the left side of the RPLIDAR, with the positive (red) side of the power connector at the top.
The ethernet cable can then be connected to the closest ethernet port on the top of the dog, and although the USB power cable can be connected to any USB port, the ones at the back of the dog are better in order to keep the front two free for a keyboard and mouse.
The dog can then be turned on (by pressing and then pressing and holding the power button on the dog and remote). Once the dog has stood up, pressing L2 + A will cycle through the standing modes - do this until the dog is at its lowest point. You can now plug in a mouse and keyboard, and connect to a monitor using the HDMI port - make sure you connect to the Nvidia TX2 at the front of the dog!
Once connected, you should see the Ubuntu desktop with the Nvidia logo.
To start, open a terminal window.
By default, the Unitree A1 starts a vision system. As there is limited documentation available on how to interact with this vision system, we will kill it and start running everything in ROS ourselves instead. Begin by entering top
into the terminal to see the running processes.
Take a note of the PID for the Unitree RobotVisionSystem. In my case this was 7739, but this could be different for you. Press q
to quit, and then enter kill PID
into the terminal (replacing PID with whatever was listed for the RobotVisionSystem).