[Bug Report] Pink IK action zeroes gravity compensation on fixed-base robots
Describe the bug
PinkInverseKinematicsAction._apply_gravity_compensation (source/isaaclab/isaaclab/envs/mdp/actions/pink_task_space_actions.py)
writes torch.zeros_like(...) as the joint-effort target when self._asset.is_fixed_base is true. It applies
the real gravity_compensation_forces only for floating-base robots. With the default
enable_gravity_compensation=True, a fixed-base robot with gravity enabled gets no compensation, and the flag
has no effect.
The fixed-base columns of gravity_compensation_forces are valid. The action already shifts joint ids by
num_base_dofs (0 for a fixed base), and OSC reads the same columns on fixed-base arms without a special case.
The zeros branch came in with #3150 (it reached develop via #3857). No comment explains it, and the unit test
only restates it.
This affects IsaacContrib-PickPlace-FixedBaseUpperBodyIK-G1-Abs, which uses a fixed pelvis, G1_29DOF_CFG
with gravity enabled, and the default flag.
Steps to reproduce
Run that task headless on PhysX with 2 envs, without the camera and teleop cfgs. Hold a constant action made of the reset wrist poses and hand joint positions for 100 steps. Values at step 100:
| effort target on IK joints | max |q - q_target| | wrist drift | |
|---|---|---|---|
develop, enable_gravity_compensation=True |
0 (while |g| reaches 7.8 N·m) | 1.4e-3 rad | 11.1 mm |
develop, enable_gravity_compensation=False |
0 | 1.4e-3 rad | 11.1 mm (identical) |
| forces applied on the fixed base | g(q), max 7.54 N·m | ~1e-9 rad | 0.004 mm |
System Info
- Commit: develop 3791c0fd1c (release/3.0.0 has the same code)
- Isaac Sim Version: 6.1.0
- OS: Ubuntu 24.04
- GPU: RTX PRO 5000 Blackwell
- CUDA: 13.0
- GPU Driver: 580.126.20
Additional context
The GR1T2 and G1 Inspire tasks disable gravity or the flag, so they do not reach this branch.
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
- With gravity enabled and
enable_gravity_compensation=True, fixed-base robots receive the gravity compensation forces of the controlled joints as effort targets
Source: isaac-sim/IsaacLab