ROS2 environment entity mechanical dog APP mapping

Quick use

1. Power on the mechanical dog

PI4 version steps:

Press the power switch on the side of the mechanical dog and wait for the mechanical dog to start up. And connect the robot dog's WiFi to the same LAN environment as the computer.

WechatIMG125

After the mechanical dog is started, the laser radar, imu, and mechanical dog joint status nodes have been automatically started.

If you find that you cannot obtain lidar and other data, please close the mechanical 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 mechanical dog in the ROS2 environment\Acquiring the real joint data of the mechanical dog in the ROS2 environment.pdf

PI5 version steps:

Press the power switch on the side of the mechanical dog and wait for the mechanical dog to start up. And connect the robot dog's WiFi to the same LAN environment as the computer.

WechatIMG125

After the mechanical dog is started, remotely connect to the mechanical dog through the IP address on the OLED.

image-20240428181518347

Then ctrl+c closes the large program and enter the following command to enter docker:

image-20240428181812147

Then enter the following commands in the docker terminal to start the car radar, imu, and mechanical dog joint status nodes.

image-20240428185044657

2. Open the virtual machine

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.

image-20230423142903590

3. Start ROSBridge

Note: This step is the same for virtual machines of PI4 and PI5 versions

image-20230803214101229

Then double click on the cartoros2 folder

image-20230423145127514

Then right-click in an empty space of the folder and select Open in Terminal

image-20230423145325137

Then enter the following command in the terminal to activate the environment

After completing the input, press the Enter key.

image-20230423150152571

Then enter the following command and press Enter to start rosbridge

Then press the shortcut key: ctrl + shift + t

Enter the command in the newly opened terminal

Then press the Enter key to start drawing.

image-20230804161405000

4. Control the mechanical dog to walk and build a map

Click on the terminal and press the shortcut key: ctrl + shift + t

Enter the command in the terminal to start the point cloud publishing node:

image-20230705151930240

Click on the terminal and press the shortcut key: ctrl + shift + t

Enter the command in the terminal to start the positioning publishing node:

image-20230705152136120

5. Camera display

PI4 version steps:

Click on the terminal and press the shortcut key: ctrl + shift + t

Enter the command in the terminal to remotely connect to the robot dog. Currently, the robot dog and the virtual machine are in the same LAN. The IP of the robot dog is: 192.168.2.79. In actual operation, it depends on the specific IP address of your own robot dog.

Press Enter and enter yes, then enter the login password of the mechanical dog: yahboom

image-20230705201156130

Then enter the command to start the camera in the terminal:

image-20230705201333328

PI5 version steps:

Open a terminal in the virtual machine, enter the IP on the mechanical dog, and log in remotely. The example IP here is 192.168.2.145.

Press Enter and enter yes, then enter the login password of the mechanical dog: yahboom

image-20240428190651112

Then enter docker ps to view the current ID, and then enter the command to enter the same docker

image-20240428190905348

Then enter the command to start the camera in the terminal:

image-20240428191000475

6. APP display

Open the mobile APP ROS Robot

IMG_20230621_095117

Enter the IP address of the virtual machine. Take the current virtual machine IP as: 192.168.2.117 as an example. At the same time, select the camera topic of the mechanical dog as /usb_cam/imge_raw/compress and select ros2.

Screenshot_2023-07-05-20-18-42-227_com.rosrobot

Then swipe down and click Connect.

Screenshot_2023-07-05-20-18-48-927_com.rosrobot

After entering the map interface, you can see the map scanned by the radar and the camera image.

Screenshot_2023-07-05-20-25-09-211_com.rosrobot

Swipe down to see the remote sensing control in the lower right corner. You can use remote sensing to control the mechanical dog for mapping.

Screenshot_2023-07-05-20-25-16-726_com.rosrobot

7. Save the map

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

Then enter the following command to stop mapping,

Then enter the following command to save the pbstream file

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.

image-20230423164945396