Skip to content

[Bug Report] PhysX and OVPhysX sensors report stale articulation child-link poses and velocities after a state write #8662

Closed

Description

@NeoZng

Describe the bug

On the GPU pipeline of physics=isaacsim_physx and physics=ovphysx, sensors that read link poses or velocities
from the physics views report the previous pose (and velocity) of an articulation child link when their first
read after a root or joint state write comes before the next physics step. Root links and the CPU pipeline are not affected.

This happens on every reset inside ManagerBasedRLEnv.step(): _reset_idx() resets the scene and the reset events
write the new root and joint states (manager_based_rl_env.py:391-395), and the observations are computed right
after (:282), with no physics step or sim.forward() in between. #1276 had added write_data_to_sim() and
sim.forward() after this reset so that non-rendering sensors see the new state; #3446 removed them, citing #2736.
#2736 only makes ArticulationData re-read its body buffers after a write (the getters' lazy kinematic update is
older, #2118), and the sensors below do not read through those getters. DirectRLEnv.step() has the same sequence
(direct_rl_env.py:430, :468). So the first observation of every episode that starts inside step() is computed
from the previous episode's final child-link poses.

Articulation writes only mark the kinematics dirty (PhysxManager.invalidate_transforms(kinematics=True), e.g.
isaaclab_physx/assets/articulation/articulation.py:566, and for velocity writes ArticulationData._reset_velocity(),
isaaclab_physx/assets/articulation/articulation_data.py:207). The child links are brought up to date only by
update_kinematics() (isaaclab_physx/physics/physx_manager.py:507-513, isaaclab_ov/physics/ovphysx_manager.py:570-576),
which ArticulationData.body_link_pose_w and body_com_vel_w call (articulation_data.py:849, :924). The
known issue "Sensor readings are stale immediately after a reset" (docs/source/refs/issues.rst:44-68) describes this
as handled for link poses, leaving only RTX-rendered sensors stale. These sensors read the same link states
through their own views and skip update_kinematics():

Backend Sensor Read on develop (06f2d42)
PhysX RayCaster, RayCasterCamera, MultiMeshRayCaster(Camera): sensor pose isaaclab_physx/sensors/ray_caster/ray_caster.py:113, :208
PhysX MultiMeshRayCaster: tracked target meshes isaaclab_physx/sensors/ray_caster/ray_caster.py:148
PhysX FrameTransformer isaaclab_physx/sensors/frame_transformer/frame_transformer.py:426
PhysX ContactSensor with track_pose=True isaaclab_physx/sensors/contact_sensor/contact_sensor.py:585
PhysX Imu, Pva: link pose and velocity isaaclab_physx/sensors/imu/imu.py:184-185, isaaclab_physx/sensors/pva/pva.py:217-218
OVPhysX ray casters: sensor pose, tracked target meshes isaaclab_ov/sensors/ray_caster/ray_caster.py:163, :230
OVPhysX FrameTransformer isaaclab_ov/sensors/frame_transformer/frame_transformer.py:435
OVPhysX ContactSensor with track_pose=True isaaclab_ov/sensors/contact_sensor/contact_sensor.py:388
OVPhysX Imu, Pva: link pose and velocity isaaclab_ov/sensors/imu/imu.py:199-200, isaaclab_ov/sensors/pva/pva.py:206-207
OVPhysX OvPhysxFrameView: camera poses, including Camera.get_world_poses() isaaclab_ov/sim/views/ovphysx_frame_view.py:698
PhysX contrib VisuoTactileSensor: force field (elastomer pose) isaaclab_contrib/sensors/tacsl_sensor/visuotactile_sensor.py:618

On OVPhysX this includes Camera.get_world_poses(), which docs/source/concepts/sensors/camera.rst:129-132
documents as the current pose, including motion of the parent body, for any update_latest_camera_pose. For a camera
on a child link of a two-link test robot (Newton Warp renderer), it returned the pre-reset pose right after the reset,
0.541 m off; a camera on the root link was exact. The contrib VisuoTactileSensor on the GelSight R15 finger, whose
elastomer is a child link, kept its tactile points at the pre-write pose after a 1 m root write.

After their own reset, Imu and Pva report their reset values until the next physics step (zero rates and
accelerations, identity orientation, projected gravity (0, 0, -1), and for Pva zero position) because of the timestamp guard from #5782
(isaaclab_physx/sensors/imu/kernels.py:50), so the reset inside step() does not reach them. Other state writes
before a read do. For example, the push_robot interval event of the velocity tasks writes root velocities
(isaaclab_tasks/core/velocity/velocity_env_cfg.py:267-272, isaaclab/envs/mdp/events.py:1241) after the resets and
before the observations (manager_based_rl_env.py:275-276), which reaches Imu and Pva on child links.

Sensors on the child link of a floating two-link test articulation (a revolute joint between two cubes), read right
after one write to env 0, differed from ArticulationData by:

Write to env 0 Quantity PhysX OVPhysX
Joint position, 1.17 rad change Pva.pos_w, orientation of Pva.quat_w 0.166 m, 1.17 rad 0.166 m, 1.17 rad
Joint velocity, 3 rad/s Imu.ang_vel_b, Pva.lin_vel_b 2.00 rad/s, 0.30 m/s 2.00 rad/s, 0.30 m/s
Root velocity, 0.5 m/s and 2 rad/s Imu.ang_vel_b, Pva.lin_vel_b 2.00 rad/s, 0.83 m/s 2.00 rad/s, 0.83 m/s
Root pose, 0.54 m shift and 90° yaw Pva.pos_w, orientation of Pva.quat_w 0.414 m, 1.53 rad 0.414 m, 1.53 rad

Sensors on the root link and in env 1 were exact. No registered task uses Imu or Pva.

Impact on registered tasks: env 0 was forced to time out inside env.step() three times, and the policy observation
returned by that step was compared with the same term recomputed after the link poses were brought up to date.

Task Physics Term Max error over 3 resets
Isaac-Velocity-Rough-H1 isaacsim_physx height_scan (scanner on torso_link) 0.37 m
Isaac-Velocity-Rough-G1 isaacsim_physx height_scan (scanner on torso_link) 0.40 m
Isaac-Open-Drawer-Franka isaacsim_physx, ovphysx rel_ee_drawer_distance 0.137 m

Height scanners on a root link (ANYmal, Go1, ...) are not affected. Explicit env.reset() calls sim.forward() and
is not affected.

Steps to reproduce

Three sensors on the child link LF_SHANK of ANYmal-C, a joint write as a reset event does, then a sensor read:

"""Sensors report the previous pose of an articulation child link right after a state write.

Run on a GPU:

    uv run python repro.py --physics isaacsim_physx
    uv run python repro.py --physics ovphysx
"""

import argparse

from isaaclab.app import add_launcher_args, launch_simulation
from isaaclab.physics import PhysicsCfg

parser = argparse.ArgumentParser()
parser.add_argument("--physics", default="isaacsim_physx", choices=["isaacsim_physx", "ovphysx"])
add_launcher_args(parser)
args_cli = parser.parse_args()

with launch_simulation(PhysicsCfg(), args_cli) as physics_cfg:
    import torch

    import isaaclab.sim as sim_utils
    from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
    from isaaclab.sensors import ContactSensorCfg, FrameTransformerCfg, RayCasterCfg, patterns
    from isaaclab.terrains import TerrainImporterCfg
    from isaaclab.utils import replace

    from isaaclab_assets.robots.anymal import ANYMAL_C_CFG

    scene_cfg = InteractiveSceneCfg(num_envs=2, env_spacing=2.0)
    scene_cfg.terrain = TerrainImporterCfg(prim_path="/World/ground", terrain_type="plane")
    scene_cfg.robot = replace(ANYMAL_C_CFG, prim_path="{ENV_REGEX_NS}/Robot")
    # three sensors on the child link LF_SHANK
    shank = "{ENV_REGEX_NS}/Robot/LF_SHANK"
    scene_cfg.scanner = RayCasterCfg(
        prim_path=shank,
        mesh_prim_paths=["/World/ground"],
        pattern_cfg=patterns.GridPatternCfg(resolution=0.1, size=(0.0, 0.0)),
    )
    scene_cfg.frames = FrameTransformerCfg(
        prim_path="{ENV_REGEX_NS}/Robot/base", target_frames=[FrameTransformerCfg.FrameCfg(prim_path=shank)]
    )
    scene_cfg.contact = ContactSensorCfg(prim_path=shank, track_pose=True)

    sim = sim_utils.SimulationContext(sim_utils.SimulationCfg(dt=0.005, device=args_cli.device, physics=physics_cfg))
    scene = InteractiveScene(scene_cfg)
    sim.reset()
    robot = scene["robot"]
    for _ in range(10):
        scene.write_data_to_sim()
        sim.step()
        scene.update(sim.get_physics_dt())

    # Reset as ManagerBasedRLEnv does inside step(): reset the scene, then a reset event writes the joints.
    scene.reset()
    robot.write_joint_position_to_sim_index(position=robot.data.default_joint_pos.torch + 0.5)
    # The observations read the sensors before the next physics step.
    sensed_pos_w = {
        "RayCaster.pos_w": scene["scanner"].data.pos_w.torch,
        "FrameTransformer.target_pos_w": scene["frames"].data.target_pos_w.torch[:, 0],
        "ContactSensor.pos_w": scene["contact"].data.pos_w.torch[:, 0],
    }
    shank_pos_w = robot.data.body_link_pos_w.torch[:, robot.find_bodies("LF_SHANK")[0][0]]
    print(f"physics={type(physics_cfg).__name__} device={sim.device}")
    for name, pos_w in sensed_pos_w.items():
        error = torch.linalg.norm(pos_w - shank_pos_w, dim=-1).max().item()
        print(f"{name:30s} max error vs body_link_pos_w: {error:.3f} m")

Expected: 0.000 m for every sensor. Actual on develop:

$ uv run python repro.py --physics isaacsim_physx
physics=PhysxCfg device=cuda:0
RayCaster.pos_w                max error vs body_link_pos_w: 0.308 m
FrameTransformer.target_pos_w  max error vs body_link_pos_w: 0.308 m
ContactSensor.pos_w            max error vs body_link_pos_w: 0.308 m
$ uv run python repro.py --physics ovphysx
physics=OvPhysxCfg device=cuda:0
RayCaster.pos_w                max error vs body_link_pos_w: 0.310 m
FrameTransformer.target_pos_w  max error vs body_link_pos_w: 0.310 m
ContactSensor.pos_w            max error vs body_link_pos_w: 0.310 m

The sensors report the shank pose from before the write. Reading robot.data.body_link_pose_w first, or a physics
step, brings them up to date.

System Info

  • Commit: 9b6d2d8 (develop) and b63cbde (release/3.0.0), each in a uv environment synced from its
    uv.lock; first found on 06f2d42 with Isaac Sim 6.1.0-rc.26, with the same output
  • Isaac Sim Version: 6.2.0
  • ovphysx: 0.6.4
  • OS: Ubuntu 24.04
  • GPU: NVIDIA RTX PRO 5000 72GB Blackwell
  • CUDA: 13.0
  • GPU Driver: 580.126.20

Additional context

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

  • The listed sensors report the current child-link pose and velocity when read after a root or joint state write
    and before the next physics step, on GPU isaacsim_physx and ovphysx.
  • Regression tests cover each sensor family on both backends, including Imu and Pva link velocities.

Activity

  1. RandomOakForest commented on Oct 16, 2026

    @RandomOakForest
    Collaborator

    Thank you for posting this and adding the PR. The team will review it.

  2. added
    bug
    on Oct 16, 2026
  3. added a commit that references this issue on Oct 23, 2026
    1d1a808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions