yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
ROSMASTER A1 PRO📖
00.Configuration and Operation Guide
  • 0. Unboxing and Review
  • 1.Assembly Videos
  • 2.User Manual
  • 3.Enter Docker (For Raspberry Pi)
  • 4.A1Pro Front Wheel Servo Calibration
  • 5.USB Camera Calibration
  • 6.Depth Camera Calibration
  • 7.FAQ
  • 8.Desktop Configuration Center and Remote Control Guide
01.Chassis Control Course
  • 1.Robot Information Publishing
  • 2.Robot Handle Control
  • 3.Robot Keyboard Control
  • 4.Linear Velocity Calibration
  • 5.Angular Velocity Calibration
  • 6.Robot URDF Model
  • 7.Robot EKF State Estimation
02.Lidar Course
  • 1.Lidar Introduction and Use
  • 2.Lidar Obstacle Avoidance
  • 3.Lidar Following
  • 4.Lidar Patrol
  • 5.GMapping-SLAM Mapping
  • 6.Cartographer-SLAM Mapping
  • 7.Slam-Toolbox Mapping
  • 8.Lifelong Mode Mapping
  • 9.Navigation2 Single Point Navigation
  • 10.Navigation2 Multi Point Navigation
  • 11.Cartographer Relocalization Navigation
  • 12.Slam-Toolbox Localization Navigation
  • 13.Synchronous Mapping And Navigation
  • 14.Aruco Visual Relocalization Navigation
  • 15.Mobile App Mapping And Navigation
  • 16.AprilTag Transport
  • 17.Color Block Transport
03.USB Camera-Depth Camera Course
  • 1.USB Camera Introduction
  • 2.USB Camera Intrinsic Calibration
  • 3.Nuwa-HP60C Camera Introduction (Depth Camera Only)
  • 4.Depth Camera Distance Measurement (Depth Camera Only)
  • 5.Depth Pseudo Color Image (Depth Camera Only)
  • 6.Block Volume Calculation (Depth Camera Only)
  • 7.Edge Detection (Depth Camera Only)
  • 8.RTAB-Map SLAM Mapping (Depth Camera Only)
  • 9.RTAB-Map Navigation (Depth Camera Only)
04.Robotic Arm and 3D Space Gripping Course
  • 0.Robotic Arm Basic Usage
  • 1.Robotic Arm Kinematics
  • 2.Robotic Arm Chassis Coordination Control
  • 3.AprilTag ID Sorting
  • 4.AprilTag Height Anomaly Sorting
  • 5.AprilTag Tracking and Grasping
  • 6.Color Block Sorting
  • 7.Color Block Height Anomaly Sorting
  • 8.Color Block Tracking and Grasping
  • 9.Wood Block Shape Sorting
  • 10.KCF Tracking and Grasping Objects
  • 11.Mediapipe Gesture ID Sorting AprilTag
  • 12.Mediapipe Gesture Height Sorting AprilTag
  • 13.Desktop Tracking and Grasping AprilTag
  • 14.3D Spatial Tracking AprilTag
  • 15.Line Following Obstacle Clearing
  • 16.Transformer Model Tracking Algorithm
05.Road Network Planning and Navigation
  • 1.Introduction To Road Network Planning
  • 2.Road Network Annotation
  • 3.Planning And Navigation Between Waypoints
  • 4.Road Network Navigation In Any Pose
  • 5.Path Re-planning
06.OpenClaw Basic Course
  • 1.Introduction to OpenClaw
  • 2.OpenClaw Core Concepts
  • 3.OpenClaw API-KEY Configuration
  • 4.OpenClaw Switch Models
  • 5.OpenClaw System Prompt Words
  • 6.OpenClaw Common CLI Commands
07.OpenClaw Interaction Method
  • 1.OpenClaw Webchat Interaction
  • 2.OpenClaw Tui Interaction
  • 3.OpenClaw Voice Dialogue Interaction
  • 4.OpenClaw WhatsApp Interaction
08.OpenClaw Development
  • 1.OpenClaw Connecting to Robot MCP Service
  • 2.Robot CLI Command Tool
  • 3.robot-control plugin tool
  • 4.reply-bridge plugin tool
  • 5.OpenClaw Multimodal Vision
  • 6.OpenClaw Chassis Control
  • 7.OpenClaw Robotic Arm Control
  • 8.OpenClaw Skills Development
  • 9.OpenClaw Scheduled Tasks
  • 10.OpenClaw Multi-Agent Intelligent Agent
  • 11.OpenClaw Active Interaction
  • 12.OpenClaw Vector Memory
09.OpenClaw Embodied Intelligent Application
  • 1.OpenClaw Target Tracking
  • 2.OpenClaw Arm Tracking And Grasping
  • 3.OpenClaw Arm Fixed-point Placement
  • 4.OpenClaw Waste Sorting
  • 5.OpenClaw SLAM Mapping And Navigation
  • 6.OpenClaw Navigation Transport
  • 7.OpenClaw AprilTag Grasping
  • 8.OpenClaw Color Line Patrol
  • 9.OpenClaw Visual Distance Measurement
10.OpenClaw Scenario Sandbox
  • 1.Map Description and Prop Placement
  • 2.Build Sand Table Map
  • 3.Visual Relocation Markers
  • 4.Map Mapping Markers
  • 5.OpenClaw Scenario Sandbox Comprehensive Case
11.AI Model Basics
  • 1.AI Large Model Types and Principles
  • 2.RAG Retrieval Enhancement and Model Training Samples
  • 3.Embodied Intelligent Robot System Architecture
  • 4.Embodied Intelligent Functions Core Source Code
12.AI Model Development
  • 1.Register a Model Service Provider Aaccount
  • 2.Configuring API-KEY
  • 3.Introduction to Dify
  • 4.Basic Dify Features
  • 5.AI Large Model Development - chatbot
  • 6.Deploy the RAG Knowledge Base
  • 7.RAG Knowledge Base + chatbot
  • 8.AI Agent Workflow
  • 9.Custom Wake-up Response
13.AI Model - Text Version
  • 1.Semantic Understand and Command Follow
  • 2.Multimodal Visual Understand
  • 3.Multimodal Visual Understand + Robotic Arm Gripping
  • 4.Multimodal Visual Understand+SLAM Navigation
  • 5.Robotic Arm Gripping+Multimodal Visual Understand+SLAM Navigation
  • 6.Intention Estimation
14.AI Model - Voice Version
  • 1.Semantic Understand and Command Follow
  • 2.Multimodal Visual Understand
  • 3. Multimodal Large Model+Robotic Arm Gripping
  • 4.Multimodal Visual Understand+SLAM Navigation
  • 5.Robotic Arm Gripping+Multimodal Visual Understand+SLAM Navigation
  • 6.Intention Estimation
15.Mediapipe Visual Course
  • 1.Hand Detection
  • 2.Posture Detection
  • 3.Overall Detection
  • 4.Facial Landmark Detection
  • 5.Face Detection
  • 6.Face Special Effects
  • 7.3D Object Recognition
  • 8.Brush
  • 9.Finger Control
  • 10.Palm Target Positioning
  • 11.Fingertip Trajectory Recognition
  • 12.Fingertip Gesture Control Cobotic Arm
  • 13.Gesture Grabbing and Releasing Objects
  • 14.Finger Control Robotic Arm
  • 15.Medipipe Gesture Control Robotic arm Cction Group
16.MoveIt2 Simulation Course
  • 1.MovelT2 Configuration
  • 2.MovelT2 Simulation-Reality Linkage
  • 3.Random Movement
  • 4.Forward Kinematics Design
  • 5.Inverse Kinematics Design
  • 6.Cartesian Path
  • 7.Scene Design
  • 8.Trajectory Planning
  • 9.Collision Detection
  • 10.3D Perception Obstacle‑Avoidance
17.Multi-vehicle Course
  • 1.Multi-vehicle Control
  • 2.Multi-vehicle Navigation
  • 3.Multi-vehicle Formation
18.YOLO26 Development
  • 1.CLI Use
  • 2.Object Detection
  • 3.Instance Segmentation
  • 4.Pose Estimation
  • 5.Image Classification
  • 6.Oriented Object Detection
  • 7.YOLOv26 + DeepSORT Tracking
  • 8.Monocular Depth Estimation
19.Control Board STM32 Driver Course
  • 0.Notes (Must Read)
  • 1.About Expansion Board
  • 2.STM32 Development Environment
  • 3.Button Control
  • 4.FreeRTOS Application
  • 5.Serial Communication
  • 6.SBUS Model Aircraft Remote Control
  • 7.CAN Bus Communication
  • 8.RGB Colorful Light Bar
  • 9.Timer Interrupt to Control PWM Servo
  • 10.Control Serial Port Servos
  • 11.Nine-axis Attitude Sensor to Obtain Data
  • 12.Control Motor
  • 13.Timer Captures the Encoder Data
  • 14.1 Kinematic Analysis of Mecanum Wheel
  • 14.2 Kinematic Analysis of Ackerman
  • 14.3 Kinematic Analysis of 4WD
  • 15.PID Control Robot Movement
20.Docker Course
  • 1.Docker Introduction and Installation
  • 2.Docker Basic Commands
  • 3.Docker Submission and Multi-Terminal Access
  • 4. Docker Startup Script
  • 5.Docker-Vscode Environment Construction
21.Image Processing Basics Course
  • 1. Introduction to Open Source CV
  • 2. Image reading and display
  • 3. Image writing
  • 4. Image quality
  • 5. Pixel Operation
  • 6. Image zoom
  • 7. Image cutting
  • 8. Image translation
  • 9. Image Mirroring
  • 10. Affine Transformation
  • 11. Image Rotation
  • 12. Perspective Transformation
  • 13. Grayscale processing
  • 14. Image Binarization
  • 15. Edge Detection
  • 16. Line drawing
  • 17. Rectangle and circle drawing
  • 18. Drawing text and pictures
22.Linux System Course
  • 1.Introduction to Linux system
  • 2.Ubuntu file system
  • 3.Ubuntu common commands
  • 4.Ubuntu common editors
  • 5.Ubuntu software operation commands
  • 6.Virtual machine installation
  • 7.SSH remote control
  • 8.VNC remote control
  • 9.Transfer files remotely
  • 10.Driver library and communication
  • 11.Static IP and hotspot mode
  • 12.Bind device ID
  • 13.Capacity expansion and resource allocation
  • 14.Update system software sources
  • 15.Set root user password
  • 16.sudo free password
  • 17.Connect to WiFi network
  • 18.View system version
  • 19.Customized service management
  • 20.Back up system image
23.ROS2 Basic Course
  • 1.Introduction to ROS2
  • 2.ROS2 install Humble
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
24.Main Control Course
Jetson Orin Nano_NX
  • 1.Jetson Orin board introduction
  • 2.Restore the factory image system
  • 3.Backup SSD system
  • 4.SSD expansion
  • 5.Network configuration
  • 6.SSH remote login
  • 7.VNC remote control
  • 8.Remote file transfer
  • 9.Jtop tool
  • 10.Exchange space expansion
Raspberry Pi
  • 1. Introduction to Raspberry PI 5
  • 2. Raspberry PI system installation and backup
  • 3. Powering the Raspberry PI 5
  • 4. Startup of Raspberry PI 5
  • 5. Update and upgrade operating system
  • 6. Introduction to raspi-config tool
  • 7. config.txt file description
  • 8. Network Configuration
  • 9. remote access
  • 10. Transfer files remotely
  • 11. Set display resolution and rotation
  • 12. Set screen to sleep
  • 13. Play audio and video
  • 14. Using USB camera
  • 15. Using MIPI camera
  • 16. Get real-time temperature of Raspberry Pi
RDKX5
  • 1.Introduction to RDK X5 board
  • 2.Write system file
  • 3.Hardware interface description
  • 4.Install case and other accessories
  • 5.Network configuration
  • 6.Remote login
  • 7.Update system
  • 8.srpi-config user guide
  • 9.config. txt configuration file
  • 10.Self-startup setting
  • 11.RDK exclusive command usage
  • 12.Linux command usage
  • 13.GPIO readwrite operation
  • 14.Image classification algorithm
  • 15.Use USB camera
  • 16.Use MIPI camera
  • 17.Binocular camera depth algorithm
  • 18. Controlling RGB Cooling Fans
Download
  • SystemFile
  • Code
  • 3D_Model_File
  • Software_Tools
  • Hardware_Info
  • Introduction_Manual
  • Script_File
  • Dify AI Agent
Download ZIP

Welcome to ROSMASTER A1 PRO repository

1.OpenClaw Target Tracking

OpenClaw Target Tracking

OpenClaw Target Tracking1. Course ContentCourse OverviewLearning Objectives2. Preparation3. Target Tracking Case PracticeStep 1: Issue Tracking CommandStep 2: Hand-Eye Following ObservationStep 3: Target Loss Protection MechanismStep 4: Auto Recovery and Resume TrackingStep 5: Cancel/Exit Target Tracking4. Core Source Code Analysis4.1 TargetTrack() — Main Entry for Starting and Canceling Tracking4.2 _gaze_track_loop() — Background Closed-Loop Tracking Thread4.3 _get_bbox() — Thread-Safe Target Position Reading4.4 _gaze_control() — Joint Increment Control and Limit Protection5. Parameter DebuggingParameter Debugging Suggestion Table6. Common Problems and Troubleshooting Guide

1. Course Content

Course Overview

In embodied intelligent robots, Target Tracking (Visual Tracking) is like human "eye gaze and head turning tracking" - when you move an object in front of you, your eyes keep staring at it, if the object moves out of the center of your vision, your neck will turn to keep the object centered in your field of view.

OpenClaw Target Tracking utilizes this Eye-in-Hand Visual Servoing principle:

  • Eyes see (Visual Perception): The camera at the end of the robotic arm captures images in real-time, continuously locking onto the target object's position through visual algorithms.

  • Neck moves (Joint Control): The algorithm calculates the deviation pixels between the target object and the center of the frame in real-time, dynamically adjusting the base rotation joint and pitch joint of the robotic arm to move the camera, keeping the target firmly locked in the center of the frame.

  • Smart exception handling: When the target is occluded or moves out of the frame, the robotic arm automatically pauses movement and waits in place; once the target returns to the field of view, the robotic arm can recover tracking within seconds.

image-20261009174805671

Learning Objectives

  1. Master how to start and cancel target tracking through OpenClaw (natural language interaction/voice interaction/WebChat).

  2. Understand the basic principles of visual servo feedback control (how image center deviation is converted to robotic arm joint angles).

  3. Master the core source code logic of target tracking and debugging methods for key parameters (error threshold, adjustment step size).


2. Preparation

  • Start core nodes such as odometry, TF transformation, robotic arm assistance, camera node, and MCP service:

ros2 launch dofbot_pro_bringup mcp_service.launch.py
  • If you need voice broadcast replies, you can use the command with launch_openclaw_bridge parameter to start the program; if you don't need voice replies, you can use the basic command above:

xxxxxxxxxx
ros2 launch dofbot_pro_bringup mcp_service.launch.py   launch_openclaw_bridge:=true 

image-20260904094627705

  • If you need voice dialogue interaction, you can run the following command (choose one between WebChat web interface and voice wake-up interaction):

xxxxxxxxxx
ros2 run ackermann_mcp asr_detect

image-20260904101250184

After shouting the wake-up word "Hi, yahboom", the indicator light turns on and you can speak the content you want to dialogue:

image-20260904101324762


3. Target Tracking Case Practice

Tip
Dialogue commands can be expressed naturally according to your actual needs. The following cases are demonstrated using the web-based WebChat as an example.

Step 1: Issue Tracking Command

Enter the command in the WebChat interaction interface, for example:

"Track the yellow block in front of you"

image-20260904100157188

After OpenClaw receives the command, it first calls the LLM visual detection interface GetBbox to obtain the ROI bounding box coordinates of the yellow block in the current frame, then calls TargetTrack to start tracking.

Step 2: Hand-Eye Following Observation

Note: RDK and Raspberry Pi boards may experience very laggy VNC when running visualization due to performance issues. The tutorial does not enable the viewing angle by default. You can actually move the cube to track. To enable it, go to the launch file and manually change display_windows_only_track to True, then compile.

Slowly move the target object by hand, and the robotic arm will quickly react. By rotating the base rotation joint (left-right view) and pitch joint (up-down view) in real-time, the camera always aims at and gazes at the target object:

image-20260904100252514

Step 3: Target Loss Protection Mechanism

If you cover the object with your hand or quickly move the object out of the frame, because the target's recognition confidence is too low (below threshold 0.08) or completely lost, the robotic arm will immediately stop moving and wait in the current posture:

image-20260904100317398

Popular principle: This is a anti-flying/anti-spinning protection mechanism. When the robot "can't see clearly", hovering in place is much safer than blindly searching, which can effectively prevent the robotic arm from colliding with surrounding objects.

Step 4: Auto Recovery and Resume Tracking

When the target cube is placed back into the camera's field of view, the visual tracking algorithm automatically captures and recognizes the cube. When the recognition confidence is greater than 0.1, the robotic arm instantly "re-locks the target" and continues into smooth tracking state:

image-20260904100334910

Step 5: Cancel/Exit Target Tracking

When you don't need to continue tracking, just give OpenClaw a natural language command again, for example:

"Stop tracking" or "Cancel tracking target"

image-20260904100411814

At this point, the background gaze thread will exit smoothly and safely, and the MCP server will print a log indicating that the target tracking state has been released. The robotic arm will automatically return to its initial posture:

image-20260904100433926

Important

  • In the subsequent course 【02-OpenClaw Robotic Arm Tracking and Grasping】, OpenClaw will first call this target tracking function to aim at the object, then drive the car chassis and robotic arm to complete precise grasping.


4. Core Source Code Analysis

  • Source code file path:

xxxxxxxxxx
~/yahboomcar_ros2_ws/dofbot_pro_ws/src/ackermann_mcp/ackermann_mcp/action_controller.py

In the ActionController class, the core control logic of target tracking is mainly composed of 4 key functions. Below is a popular analysis combined with the actual operation process.

4.1 TargetTrack() — Main Entry for Starting and Canceling Tracking

When the user says "Track the yellow block", OpenClaw passes the object coordinates to call this function to start tracking; when the user says "Stop tracking", it passes the string "cancel" to cancel tracking.

​x
def TargetTrack(self, x1_or_cmd, y1:int=None, x2:int=None, y2:int=None):
    # Branch 1: Cancel tracking logic
    if isinstance(x1_or_cmd, str):
        if x1_or_cmd != "cancel":
            return [False, "Invalid command for TargetTrack. Use 'cancel' to stop tracking."]
        # 1. Safely terminate background gaze thread
        if hasattr(self, '_gaze_stop_event'):
            self._gaze_stop_event.set()
        if hasattr(self, '_gaze_thread') and self._gaze_thread is not None and self._gaze_thread.is_alive():
            self._gaze_thread.join(timeout=2.0)
            self._gaze_thread = None
        # 2. Call ROS 2 service to unregister visual tracking algorithm
        if not self.cancel_track_client.wait_for_service(timeout_sec=5.0):
            return [False, "CancelTrack service not available"]
        self.cancel_track_client.call(CancelTrack.Request())
        # 3. Reset robotic arm to initial default posture
        self._reset_joints()
        self.InitArmPose()
        return [True, "Tracking cancelled and arm reset"]

    # Branch 2: Start tracking logic
    x1: int = x1_or_cmd
    if not self.start_track_client.wait_for_service(timeout_sec=5.0):
        return [False, "Tracking service not available"]
    # 1. Send initial bounding box coordinates to upstream visual tracking service (x1, y1, x2, y2)
    result = self.start_track_client.call(StartTrack.Request(x1=x1, y1=y1, x2=x2, y2=y2))
    if not result.success:
        return [False, "Tracking failed"]
    # 2. Start independent background gaze thread _gaze_track_loop
    self._gaze_stop_event = threading.Event()
    self._gaze_thread = threading.Thread(target=self._gaze_track_loop, daemon=True)
    self._gaze_thread.start()
    return [True, "Tracking started"]

Key point popular explanation:

  1. Multi-threading concurrency mechanism: After starting tracking, the program hands the specific head-turning gaze action to an independent background thread _gaze_track_loop, and the main thread immediately returns success. This not only allows the car to continuously track the target but also can respond to your next command at any time without freezing the system.

  2. Graceful exit and reset: When canceling tracking, the termination signal is sent through threading.Event(), and after waiting for the thread to safely end, InitArmPose() is called to gracefully reset the robotic arm, preventing the servo from being suspended mid-air causing continuous stress and heating.


4.2 _gaze_track_loop() — Background Closed-Loop Tracking Thread

This is the heartbeat loop that actually makes the robotic arm "eye follows heart", continuously observing target position and calculating error at approximately 4Hz.

xxxxxxxxxx
def _gaze_track_loop(self):
    '''Background thread: Continuously adjusts robotic arm gaze based on target pixel position'''
    self._get_joints()  # Read current angles of robotic arm joints 1, 2, 4
    while not self._gaze_stop_event.is_set() and rclpy.ok():
        box = self._get_bbox()  # Get current target's [centerX, centerY, confidence]
        if box[2] < 0.08:
            # Confidence too low (target occluded or lost), wait 0.1s and continue to next frame, don't move blindly
            time.sleep(0.1)
            continue
        # Camera resolution is 640x480, so the center coordinates are (320, 240)
        error_x = box[0] - 320  # Horizontal deviation (positive means object is to the right, negative to the left)
        error_y = box[1] - 240  # Vertical deviation (positive means object is below, negative above)
        self._gaze_control(error_x, error_y)  # Execute joint micro-adjustment
        time.sleep(0.25)

Key point popular explanation:

  • Why is the base center (320, 240)? Because the RGB camera's image resolution is 640 pixels wide × 480 pixels high, so the exact center of the frame is (640/2, 480/2) = (320, 240).

  • Target deviation direction: If the center of the detection box is (400, 200), then error_x = 400 - 320 = +80 (to the right), error_y = 200 - 240 = -40 (above). The controller can clearly know which direction to turn the head.


4.3 _get_bbox() — Thread-Safe Target Position Reading

xxxxxxxxxx
def _get_bbox(self)-> list:
    with self._track_lock:
        # Calculate geometric center point of detection box
        center_x = (self.track_box.bbox[0] + self.track_box.bbox[2]) / 2
        center_y = (self.track_box.bbox[1] + self.track_box.bbox[3]) / 2
        # Check freshness of visual message (timeliness judgment)
        msg_stamp_sec = self.track_box.timestamp.sec + self.track_box.timestamp.nanosec * 1e-9
        now_sec = self.get_clock().now().nanoseconds * 1e-9
        # If visual message hasn't been updated for more than 0.5 seconds, visual algorithm stalling or frame loss, force confidence to 0
        confidence = self.track_box.confidence if (now_sec - msg_stamp_sec) < 0.5 else 0.0
        return [center_x, center_y, confidence]

Key point popular explanation:

  • Avoid using outdated information (timeliness guarantee): If the camera suddenly disconnects or the visual node drops frames, using the residual historical coordinates from the previous second to adjust the robotic arm can easily lead to misoperation. The code guarantees adjustment only based on "fresh first-hand footage" by comparing timestamps (over 0.5 seconds is considered invalid).


4.4 _gaze_control() — Joint Increment Control and Limit Protection

This function converts pixel error into joint angle increment commands for each joint of the robotic arm.

xxxxxxxxxx
def _gaze_control(self, error_x, error_y):
    '''Gaze tracking core algorithm: Adjust corresponding joints based on pixel deviation'''
    if self.joint_1 is None or self.joint_2 is None or self.joint_4 is None:
        return

    # 1. Horizontal direction control: Managed by base rotation joint 1
    if abs(error_x) > self.gaze_threshold:
        if error_x > self.gaze_threshold:
            self.joint_1 += self.step  # Target is to the right, joint 1 clockwise micro-adjustment
        elif error_x < -self.gaze_threshold:
            self.joint_1 -= self.step  # Target is to the left, joint 1 counter-clockwise micro-adjustment
        self.SingleJoint_pub.publish(ArmJoint(id=1, joint=self.joint_1, time=100))

    # 2. Vertical direction control: Mainly managed by wrist pitch joint 4, joint 2 as auxiliary buffer
    if abs(error_y) > self.gaze_threshold:
        if error_y > self.gaze_threshold:
            self.joint_4 -= self.step  # Target is below, joint 4 looks down
        elif error_y < -self.gaze_threshold:
            self.joint_4 += self.step  # Target is above, joint 4 looks up
            
        # Intelligent protection mechanism: Check if joint 4 has reached its physical lower limit
        if self.joint_4 > -5:
            self.SingleJoint_pub.publish(ArmJoint(id=4, joint=self.joint_4, time=100))
        else:
            # When joint 4 has already lowered to the limit (-5°), further lowering would scratch the car body! At this point, automatically link joint 2 to continue lowering
            self.joint_2 -= self.step
            self.SingleJoint_pub.publish(ArmJoint(id=2, joint=self.joint_2, time=100))

5. Parameter Debugging

  • Core parameter configuration file path:

xxxxxxxxxx
~/yahboomcar_ros2_ws/dofbot_pro_ws/src/dofbot_pro_bringup/config/common.yaml
  • Configuration parameters related to target tracking:

xxxxxxxxxx
...
# gaze control
gaze_threshold: 55.0           # Gaze control dead zone error threshold, unit: pixels
gaze_step: 2                   # Gaze control adjustment step size per adjustment, unit: joint angle (degrees)
...

Parameter Debugging Suggestion Table

Parameter NameDefault ValueEffect of IncreasingEffect of DecreasingRecommended Debugging Scenario
gaze_threshold55.0Robotic arm is less sensitive to slight shaking, movement is more stable, but alignment accuracy is slightly worseMore strict alignment, more precise center; but if set too small (e.g., < 20), the robotic arm may tremble micro-correcting near the targetAppropriately increase when ambient light is poor or target edge is shaking; appropriately decrease when high precision is required
gaze_step2Each response rotation is larger, head turning speed is faster, can keep up with fast movementEach micro-adjustment is smoother and finer; but if the target moves fast, may experience tracking lagCan set to 3 or 4 when tracking high-speed moving objects; keep default 2 for slow precise observation

6. Common Problems and Troubleshooting Guide

  • Problem phenomenon: Robotic arm reacts slowly or loses target when target moves?

    • Troubleshooting 1 (Initial bounding box accuracy): Check if the first frame ROI box is accurately circled when GetBbox selects the target object. The system automatically saves the first frame verification image to this path:

      xxxxxxxxxx
      ~/MODELS/multi_brains_file/verify_image.png

      Open this image to confirm whether the initial box is misaligned due to ambient reflections or occlusion:

      image-20260904100616270

    • Troubleshooting 2 (Movement speed): Keep the object moving at a constant speed when moving, don't quickly pull it away instantaneously, to avoid it leaving the camera's field of view refresh rate.

    • Troubleshooting 3 (Lighting environment): Ensure uniform lighting on the object surface, avoid strong backlight or severe shadow interference with feature matching.

OpenClaw Vector Memory
OpenClaw Arm Tracking And Grasping

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文