PI4 version steps:
Press the power switch on the side of the robot dog and wait for the robot dog to start up. And connect the robot dog's WiFi to the same LAN environment as the computer.
After the robot dog is started, the laser radar, imu, and robot dog joint status nodes have been automatically started.
If you find that you cannot obtain lidar and other data, please close the robot dog program and restart the chassis program.
To close the large program, restart the chassis and modify the multi-level communication ID, please refer to the tutorial: 14. Radar mapping navigation\6. Obtaining the status of the physical robot dog in the ROS2 environment\Acquiring the real joint data of the robot dog in the ROS2 environment.pdf
PI5 version steps:
Press the power switch on the side of the robot dog and wait for the robot dog to start up. And connect the robot dog's WiFi to the same LAN environment as the computer.
After the robot dog is started, remotely connect to the robot dog through the IP address on the OLED.
Then ctrl+c closes the large program and enter the following command to enter docker:
./run_humble.sh
Then enter the following commands in the docker terminal to start the car radar, imu, and robot dog joint status nodes.
xxxxxxxxxx
ros2 launch bringup Navigation_bringup.launch.py
Note: The default virtual machine has been installed here.
Open the virtual machine, enter the password: yahboom and press the Enter key to enter the system desktop.
Note: This step is the same for virtual machines of PI4 and PI5 versions
Enter the desktop system and open the folder.
Then double click on the cartoros2 folder
Then right-click in an empty space of the folder and select Open in Terminal
Then enter the following command in the terminal to activate the environment
xxxxxxxxxx
source install/setup.bash
After completing the input, press the Enter key.
Then enter the command
xxxxxxxxxx
ros2 launch yahboom_bringup Mapping_bring.launch.py
Then press the Enter key to start drawing.
Click on the terminal and press the shortcut key: ctrl + shift + t
Enter the command in the terminal:
xxxxxxxxxx
ros2 run teleop_twist_keyboard teleop_twist_keyboard
By pressing the Enter key, you can press the keyboard keys in the terminal to control the movement of the robot dog. Among them, I is forward, K is pause, and < is backward.
When the map scan is completed, we press the shortcut key Ctrl shift t in the terminal to reopen a terminal window and enter the following command
First enter the following command to activate the environment
xxxxxxxxxx
source install/setup.bash
Then enter the following command to stop mapping,
xxxxxxxxxx
ros2 service call /finish_trajectory cartographer_ros_msgs/srv/FinishTrajectory "{trajectory_id: 0}"
Then enter the following command to save the pbstream file
x#pi4
ros2 service call /write_state cartographer_ros_msgs/srv/WriteState "{filename: '/home/yahboom/cartoros2/data/maps/mymap.pbstream'}"
#pi5
ros2 service call /write_state cartographer_ros_msgs/srv/WriteState "{filename: '/home/yahboom/yahboomcar_ws/maps/mymap.pbstream'}"
The path of the filename parameter is the path where the pbstream file of the map is saved.
Finally enter the following command to convert the pbstream file to a pgm file.
xxxxxxxxxx
#pi4
ros2 run cartographer_ros pbstream_to_ros_map_node -map_filestem=/home/yahboom/cartoros2/data/maps/mymap -pbstream_filename=/home/yahboom/cartoros2/data/maps/mymap.pbstream -resolution=0.05
#pi5
ros2 run cartographer_ros cartographer_pbstream_to_ros_map -map_filestem=/home/yahboom/yahboomcar_ws/maps/mymap -pbstream_filename=/home/yahboom/yahboomcar_ws/maps/mymap.pbstream -resolution=0.05