Robot state estimation

Note: The ROS_DOMAIN_ID of the Raspberry Pi and the microROS control board need to be consistent. You can check [MicroROS Control Board Parameter Configuration] to set the microROS control board ROS_DOMAIN_ID. Check the tutorial [Connect MicroROS Agent] to determine whether the IDs are consistent.

1. Program function description

After the program is started, it will subscribe to imu and odom data, filter out part of the imu data, and then fuse it with the odom data. Finally, a fused odom data will be output to estimate the status of the robot. This data is mostly used in mapping and navigation. .

2.Start and connect to the agent

After successfully starting the Raspberry Pi, enter the following command to start the agent.

image-20240123103719295

Then, turn on the car switch and wait for the car to connect to the agent. The connection is successful, as shown in the figure below.

image-20240123103750736

3. Enter the car system docker

Open another terminal and enter the following command to enter docker.

When the following interface appears, you have successfully entered docker. Now you can control the car through commands.

image-20240201101712864

4. Start the program

Enter the following command in the terminal.

image-20240123121250759

Enter the following command to view the communication diagram between nodes.

image-20240123121402247

If it is not displayed at first, select [Nodes/Topics(all)], and then click the refresh button in the upper left corner.

The fused node is /ekf_filter_node. You can query the relevant information of this node and input it through the terminal.

image-20240123121535224

Combined with the node communication diagram above, it can be seen that the node subscribes to /imu/data and /odom_raw data, and then publishes a /odom data.

5. Parse launch file

launch file location(Take the supporting virtual machine as an example):

yahboomcar_bringup_launch.py

The launch file starts the following nodes.