Repository navigation
Score tracking body velocities relative to the anchor heading. - #1274
Merged
Merged
Conversation
qiayuanl
force-pushed
the
qiayuanl/tracking-relative-body-velocity
branch
3 times, most recently
from
October 27, 2026 22:55
9d7299f to
515957f
Compare
qiayuanl
marked this pull request as ready for review
October 27, 2026 22:57
qiayuanl
force-pushed
the
qiayuanl/tracking-relative-body-velocity
branch
from
November 19, 2026 06:07
515957f to
4bdb284
Compare
The tracking rewards motion_body_lin_vel and motion_body_ang_vel compared world-frame body velocities, so a yaw offset between the robot and reference anchors lowered both velocity terms on top of motion_global_root_ori. The two terms now use motion_relative_body_linear_velocity_error_exp and motion_relative_body_angular_velocity_error_exp, which rotate the reference body velocities with MotionCommand.to_robot_heading: the yaw offset between the robot and reference anchors, the same offset that re-anchors the body pose targets. Only the two anchor terms score global xy position and heading. Term names, weights and stds are unchanged. The new functions replace motion_global_body_linear_velocity_error_exp and motion_global_body_angular_velocity_error_exp, which are removed, and the error_body_lin_vel and error_body_ang_vel metrics stay in the world frame. MotionCommand.yaw_offset_quat_w is the one expression of that offset. update_relative_body_poses reads it for the cached pose targets, whose values are unchanged, and to_robot_heading reads it when it is called. The cache is filled one control step before the reward is evaluated, so on fast turns its yaw offset includes the reference's own yaw change and a perfect tracker would lose velocity reward. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
qiayuanl
force-pushed
the
qiayuanl/tracking-relative-body-velocity
branch
from
November 19, 2026 08:04
4bdb284 to
614e2bf
Compare
kevinzakka
approved these changes
Nov 20, 2026
Collaborator
|
Ran the G1 tracking nightly setup (side_kick_test for 6k iters) on this branch and on main, with 3 evals per checkpoint. It matches or slightly beats main.
|
qiayuanl
added a commit
to HybridRobotics/supermimic
that referenced
this pull request
Nov 21, 2026
The world-model tracking reward compared predicted body velocities with world-frame targets, so a yaw offset between the predicted root and the reference anchor lowered both velocity terms on top of the root orientation term. _reanchor_targets rotates the velocity targets by the yaw offset that re-anchors the pose targets. Only the two anchor terms score global xy position and heading; term weights and stds are unchanged. The env reward comes from mjlab's tracking config, where mujocolab/mjlab#1274 makes the same change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tracking rewards
motion_body_lin_velandmotion_body_ang_velcompared world-frame body velocities. A robot that follows the motion well but at a different heading therefore lost reward on both velocity terms as well as onmotion_global_root_ori, even though the body pose terms already re-anchor the reference to the robot's xy position and heading.This adds
MotionCommand.to_robot_heading, which rotates reference body vectors by the yaw offset between the robot and reference anchors. The two terms apply it to the reference velocities throughmotion_relative_body_linear_velocity_error_expandmotion_relative_body_angular_velocity_error_exp, with the same weights and stds. These replacemotion_global_body_linear_velocity_error_expandmotion_global_body_angular_velocity_error_exp, which are removed. Theerror_body_lin_vel/error_body_ang_velmetrics stay in the world frame.The yaw offset has one definition, the property
MotionCommand.yaw_offset_quat_w.update_relative_body_posesreads it for the cached pose targets, whose values are unchanged, andto_robot_headingreads it when it is called. The cache is filled one control step before the reward is evaluated, so on fast turns its yaw offset includes the reference's own yaw change. On a pirouette clip, a perfect tracker lost up to about 13% of the linear velocity reward on single frames with that cached offset.A test in
test_tracking_task.pygives the robot anchor a yaw and tilt offset from the reference and checks thatto_robot_headingrotates by the yaw alone.🤖 Generated with Claude Code