Repository navigation
Description
Describe the bug
FORGE can command roll motion away from the upright target near the +/-180-degree boundary.
In ForgeEnv._apply_action(), the current and desired orientations are converted using euler_xyz_from_quat() without wrap_to_2pi=True. The subsequent clipping code maps negative desired roll into a positive range, but leaves current roll in the signed range.
For example, a physical roll of 181 degrees is returned as -179 degrees. With a target of 180 degrees, the code computes an error of +359 degrees instead of -1 degree. After clipping, this can command motion away from the target.
Source inspection on October 21, 2026 confirmed the affected code in official v3.0.0, commit e3f7d9ff1f5d7f8280de3ece9000b7117f66bcf4.
Relevant source:
Steps to reproduce
The following dependency-free scalar example illustrates the roll conversion and subtraction for a pure X-axis rotation. It is a numerical illustration of the calculation, not a full FORGE environment or PyTorch regression test.
Save as reproduce_roll.py and run:
python reproduce_roll.pyimport math
target = math.pi
cap = math.radians(5.0) # Illustrative cap, not a training configuration.
for physical_roll in (181.0, 200.0):
angle = math.radians(physical_roll)
current = math.atan2(math.sin(angle), math.cos(angle))
delta = target - current
wrapped_delta = target - (current % (2.0 * math.pi))
step = max(-cap, min(delta, cap))
wrapped_step = max(-cap, min(wrapped_delta, cap))
print(
f"current={physical_roll:.0f}, target=180, "
f"unwrapped_next={physical_roll + math.degrees(step):.0f}, "
f"wrapped_next={physical_roll + math.degrees(wrapped_step):.0f}"
)Output:
current=181, target=180, unwrapped_next=186, wrapped_next=180
current=200, target=180, unwrapped_next=205, wrapped_next=195
Expected behavior:
The clipped roll command should move toward 180 degrees while respecting the per-step motion limit.
Actual behavior in this calculation:
The signed current roll and positive desired roll produce a step in the opposite direction.
System Info
Source inspected:
- Isaac Lab: official v3.0.0.
- Commit:
e3f7d9ff1f5d7f8280de3ece9000b7117f66bcf4. - Validation: source inspection and scalar math; no simulator or GPU is required for the example above.
Earlier affected training setup:
- Isaac Lab: 3.0.0 beta2.
- Isaac Sim Version: 6.0.1.0.
- GPU: NVIDIA GeForce RTX 5090 (AutoDL).
The original AutoDL instance was cloned to another RTX 5090 host after the original GPU became unavailable.
The following details were collected from the cloned instance on October 22, 2026:
- OS: Ubuntu 22.04.5 LTS.
- GPU: NVIDIA GeForce RTX 5090.
- CUDA: 12.8 (PyTorch CUDA build).
- GPU Driver: 580.76.05.
The original host's GPU driver version was not recorded. The driver version above describes the current host.
I have not rerun training on official v3.0.0. The earlier beta2 training setup and the current cloned instance should not be interpreted as an end-to-end runtime test of official v3.0.0.
Additional context
A candidate correction is to explicitly request the angle range expected by the existing controller at both orientation conversions in _apply_action():
curr_roll, curr_pitch, curr_yaw = euler_xyz_from_quat(
self.fingertip_midpoint_quat, wrap_to_2pi=True
)
desired_roll, desired_pitch, desired_yaw = euler_xyz_from_quat(
ctrl_target_fingertip_preclipped_quat, wrap_to_2pi=True
)This would preserve the existing controller's angle-range assumptions without changing the shared math utility's default.
I would like to contribute a focused fix and a regression test that exercises the actual FORGE control path. The proposed correction should also be checked against the task's yaw joint-limit convention.
Please let me know if this issue is already tracked or if a different correction is preferred.
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
- Roll commands near the +/-180-degree boundary move toward the upright target and obey the per-step motion limit.
- A regression test exercises the actual FORGE control path, fails before the fix, and passes after it.
- The task's yaw joint-limit behavior remains covered and correct.
Activity
Fix FORGE Euler angle ranges during action clipping (isaac-sim#8804)
Fix AutoMate curr_yaw wrapping for signed Euler angles (#9312)
Fix AutoMate curr_yaw wrapping for signed Euler angles (#9312)
Fix Factory nut-thread rotation check for signed Euler angles (#9311)
Fix Factory nut-thread rotation check for signed Euler angles (#9311)