Skip to content

Target Following Demo ​

This tutorial demonstrates how to use the AgileBot robot for target following tasks.

Target Following Demo

Overview ​

The target following demo shows how robots can use the RMPflow motion policy to follow moving targets. This demo uses Isaac Sim's motion generation framework.

Prerequisites ​

Running the Demo ​

Using the Demo Script Provided by the Project ​

bash
cd agilebot_isaac_sim
python agilebot_integration/demos/follow_target.py

Demo Description ​

RMPflow Motion Policy ​

RMPflow (Robot Motion Policy Flow) is a framework for robot motion planning that generates smooth, safe trajectories by combining multiple motion policies.

Target Following Algorithm ​

  1. Target Detection: Detect the position of the target object
  2. Trajectory Planning: Use RMPflow to compute trajectories from current position to target position
  3. Motion Execution: Control robot joints to follow the planned trajectory
  4. Obstacle Avoidance: Avoid obstacles during movement

Configuration Parameters ​

Motion Policy Configuration ​

Motion policy configuration files are located in the project source directory agilebot_integration/motion_policy_configs/Agilebot/gbt_c7a/ .

According to the Environment Configuration Guide, you need to copy the configuration files to the IsaacSim installation directory:

bash
cp -r agilebot_integration/motion_policy_configs/Agilebot \
  ~/isaacsim/exts/isaacsim.robot_motion.motion_generation/motion_policy_configs/

After copying, the full configuration file path is:

~/isaacsim/exts/isaacsim.robot_motion.motion_generation/motion_policy_configs/Agilebot/gbt_c7a/

Main configuration parameters (reference RMPflow Official Tuning Guide):

ParameterDescriptionDefault Value
c-space_target_rmp/metric_scalarC-space target RMP weight1-100
c-space_target_rmp/robust_position_term_threshRobust position term thresholdAdjust based on joint count
target_rmp/metric_scalarTarget RMP weightAdjust based on task
target_rmp/min_metric_alphaMinimum metric alpha0 or non-zero
target_rmp/metric_alpha_length_scaleMetric alpha length scale100000
target_rmp/proximity_metric_boost_length_scalarProximity metric boost length scalar1
target_rmp/max_metric_scalarMaximum metric scalarLarge value
target_rmp/accel_p_gainAcceleration P gainAdjust based on task
target_rmp/accel_d_gainAcceleration D gainAdjust based on task
target_rmp/accel_norm_epsAcceleration normalization epsilonAdjust based on task
collision_rmp/metric_scalarCollision avoidance RMP weightComparable to target_rmp
damping_rmp/inertiaDamping RMP inertia0

Tuning Suggestions ​

  1. C-space Target RMP: Set metric_scalar in the range 1-100, which sets the global scale of all RMPs
  2. Target RMP: Set a large max_metric_scalar to make it dominant; C-space target will operate in the nullspace of the target RMP
  3. Collision Avoidance RMP: Set weight comparable to target_rmp/max_metric_scalar
  4. Directional Term: Set min_metric_alpha to a non-zero value and adjust metric_alpha_length_scale for good behavior

FAQ ​

Q: Robot cannot reach target position ​

A: Check if the target position is within the robot's workspace. If the target position is outside the workspace, the robot cannot reach it. Adjust target_tolerance parameter to suit task requirements.

Q: Motion trajectory is not smooth ​

A: Adjust RMPflow configuration parameters, especially:

  • Check the gain values of target_rmp/accel_p_gain and target_rmp/accel_d_gain
  • Ensure metric_scalar values are within a reasonable range

Q: Robot collides with obstacles ​

A: Increase collision_rmp/metric_scalar parameter value to ensure the collision avoidance RMP has sufficient weight to avoid obstacles.

Q: How to tune from scratch ​

A: Reference the official tuning process:

  1. Turn off all RMPs (set metric_scalar to 0)
  2. Set all inertia terms to 0
  3. Re-enable RMPs one by one: c-space_target_rmp → target_rmp → collision_rmp → axis_target_rmp

Next Steps ​