You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug Report] [Newton Branch] Incorrect axis index for compute_rot in locomotion envs #4465
In the dev/newton and feature/newton branches, the compute_rot function in both locomotion_env_warp.py and locomotion_env.py calculates angle_to_target using the Z-axis (index 2) instead of the Y-axis (index 1).
The environment is Z-up, and the calculated angle is compared with the robot's Yaw (rpy[...][2]). Therefore, the target angle must be calculated in the XY plane to be physically meaningful. The current implementation incorrectly calculates the angle in the XZ plane (pitch/elevation).
Steps to reproduce
Inspect the code in isaaclab_tasks_experimental/isaaclab_tasks_experimental/direct/locomotion/ or isaaclab_tasks/isaaclab_tasks/direct/locomotion/on branch dev/newton or feature/newton.
File 1: locomotion_env_warp.py
# In compute_rot kernelangle_to_target[env_index] = (
# Bug: Uses index [2] (Z) instead of [1] (Y)wp.atan2(targets[env_index][2] -torso_pose[env_index][2], targets[env_index][0] -torso_pose[env_index][0])
-rpy[env_index][2]
)
File 2: locomotion_env.py
The same logic error exists in the compute_rot function for this file as well.
Proposed Fix:
Change index 2 to 1 in both files to correctly calculate the heading angle in the XY plane:
Thanks for reporting this @fanzongsao ! It does look like a bug. This was taken from IsaacSim's internal code. For now I have a PR to fix it, but we'll do more digging, maybe it's just an inappropriate use of the function.
Activity
RandomOakForest commentedon Jan 30, 2026
Thank you for posting this. The team will review it.
AntoineRichard commentedon Jan 30, 2026
Thanks for reporting this @fanzongsao ! It does look like a bug. This was taken from IsaacSim's internal code. For now I have a PR to fix it, but we'll do more digging, maybe it's just an inappropriate use of the function.
[Newton] Fixes rotation computation for locomotion environment (#4499)