Skip to content

Human Body Tracking

Hint

The operating environment and software and hardware configurations are as follows:

  • OriginBot robot(Visual Version/Navigation Version)
  • PC:Ubuntu (≥20.04) + ROS2 (≥Foxy)

Start the robot chassis

After the SSH connection to OriginBot is successful, enter the following command in the terminal to start the robot chassis:

$ ros2 launch originbot_bringup originbot.launch.py

image-20220822151622648

Activate the human body following function

$ cd /userdata/dev_ws

# Start the launch file
$ ros2 launch body_tracking body_tracking_without_gesture.launch.py
# Copy the configuration files needed to run the example from the TogetheROS installation path
$ cd /userdata/dev_ws
$ cp -r /opt/tros/lib/mono2d_body_detection/config/ .

# Start the launch file
$ ros2 launch body_tracking hobot_body_tracking_without_gesture.launch.py

image-20220822151712998

Attention

When starting the application function, please pay attention to the configuration file under the current running path, otherwise the application function cannot find the configuration file and will fail to run.

The human body follows the effect

After successful startup, standing in front of the OriginBot camera, you need to let the robot recognize the whole body, move the body slowly, and you can see that the robot has begun to follow the movement of the human body.

body_detection

Visualized display of the upper computer

Open the browser and access the IP address of the robot to see the real-time effect of visual recognition.

ezgif-5-5c246b7347

Introduction to the principle

The human body following function is to control the robot to follow the movement of the human body, which is composed of MIPI image acquisition, human body detection and tracking, human body following strategy, image encoding and decoding, and WEB display, and the process is as follows:

20220922180336

For a detailed explanation of the principle, please see:

https://developer.horizon.cc/college/detail/id=98129467158916314

The source code for human detection and tracking can be found at:

https://developer.horizon.cc/documents_tros/boxs/function/mono2d_body_detection

图片1