Welcome to MicroROS V2 Robot Car repository
3. Holistic Detection
Holistic Detection
1. Experiment Objective
Use MediaPipe Holistic to simultaneously detect the face (468 keypoints), both hands (21 keypoints each) and body pose (33 keypoints) in the camera image.
2. Experiment Principle
1. Key Terms
| Keyword | Description |
|---|---|
| MediaPipe Holistic | Google's holistic detection model, integrating three sub-models: Face Mesh (468 points) + Pose (33 points) + Hands (21 points × 2) |
| Three-in-one detection | Runs three MediaPipe sub-models on the same frame simultaneously, outputting full-body + hand + face keypoints together |
| Facial mesh | 468 facial keypoints covering fine structures such as the contours of facial features, lips, eyebrows and eyelids |
2. Technical Architecture
Terminal 1: start agent + camera + joint modelsTerminal 2: start holistic detection
3. Experiment Steps
1. Hardware Preparation
| Hardware | Requirement |
|---|---|
| PTZ version | ✅ Supported |
| No-PTZ version | ✅ Supported |
| Required peripherals | ESP32 camera |
2. Start the agent + camera + joint models (Terminal 1)
xxxxxxxxxxros2 launch microros_v2_bringup car_base.launch.py
3. Start holistic detection (Terminal 2)
xxxxxxxxxxros2 launch microros_v2_mediapipe_pkg holistic.launch.py4. Operating Instructions
Press q to exit.
5. How to Stop
Press Ctrl+C in each terminal, one by one, to stop.
4. Observed Results
- The face is finely covered by a 468-point white mesh; each hand has 21 red dots + a skeleton; the body has a 33-point skeleton overlaid
- All three sets of keypoints render simultaneously without occluding each other

5. Code Walkthrough
Source code paths:
- Launch:
~/microros_ws/src/microros_v2_mediapipe_pkg/launch/holistic.launch.py- Node:
~/microros_ws/src/microros_v2_mediapipe_pkg/microros_v2_mediapipe_pkg/Holistic.py
1. Core Node Analysis
x# Source file: ~/microros_ws/src/microros_v2_mediapipe_pkg/microros_v2_mediapipe_pkg/Holistic.pyclass Holistic(Node): def __init__(self): super().__init__("holistic_node") self.mp_holistic = mp.solutions.holistic self.holistic = self.mp_holistic.Holistic( static_image_mode=False, min_detection_confidence=0.5, min_tracking_confidence=0.5) def image_callback(self, msg): frame = self.bridge.imgmsg_to_cv2(msg, 'bgr8') results = self.holistic.process(cv.cvtColor(frame, cv.COLOR_BGR2RGB)) if results.pose_landmarks: self.mp_draw.draw_landmarks(frame, results.pose_landmarks, self.mp_holistic.POSE_CONNECTIONS) if results.face_landmarks: self.mp_draw.draw_landmarks(frame, results.face_landmarks, self.mp_holistic.FACEMESH_TESSELATION, ...) if results.left_hand_landmarks: self.mp_draw.draw_landmarks(frame, results.left_hand_landmarks, self.mp_holistic.HAND_CONNECTIONS) if results.right_hand_landmarks: self.mp_draw.draw_landmarks(frame, results.right_hand_landmarks, self.mp_holistic.HAND_CONNECTIONS) cv.imshow(self.window_name, frame)Key logic:
mp.solutions.holistic.Holistic(): three-in-one detector that runs the Pose, Face Mesh and Hands sub-models simultaneously- The four landmark sets are checked independently: face (468 points), pose (33 points), left hand (21 points) and right hand (21 points) may not all be present at the same time
FACEMESH_TESSELATION: triangular face mesh, finer than simple skeleton connections
2. Key Parameters
Parameter definition files:
- Launch:
~/microros_ws/src/microros_v2_mediapipe_pkg/launch/holistic.launch.py- Node:
~/microros_ws/src/microros_v2_mediapipe_pkg/microros_v2_mediapipe_pkg/Holistic.py
| Parameter | Type | Default | Description |
|---|---|---|---|
static_image_mode | bool | false | Whether to detect each frame independently |
min_detection_confidence | float | 0.5 | Detection confidence threshold |
min_tracking_confidence | float | 0.5 | Tracking confidence threshold |
3. Node Description
| Node | Function |
|---|---|
holistic_node | MediaPipe Holistic three-in-one face + hand + pose detection |
6. Frequently Asked Questions
| Issue | Cause | Solution |
|---|---|---|
| Low performance / lag | Holistic runs three models simultaneously, which is computationally heavy | Detect only the upper body (don't raise your hands) to reduce the cost of face + hands appearing together |
| Only part of the keypoints show | The corresponding body part is not in the frame | Make sure the whole body + face + hands are all within the camera's field of view |