Skip to content

Silent failure in GPU mode: getRootPose() and velocity getters return stale initial data #292

Description

@fffffq00

Description:
I was using the maniskill3 framework today and tried to access the robot's root pose via env.agent.robot._objs[i].root_pose. I noticed that the returned values remained completely static throughout the simulation.

After digging into the SAPIEN source code, I realized this happens because the environment is running in GPU mode, and the native C++ handles lose synchronization with the GPU tensor buffers.

However, the core issue is that the std::runtime_error originally designed to prevent this exact scenario has been explicitly commented out in the source code:
https://github.com/haosulab/SAPIEN/blob/master/src/physx/articulation.cpp#L362-L364
The same applies to the velocity getters below it.

Suggestion:
Why was this exception-throwing code commented out? Is it really appropriate to provide no warnings or exceptions at all for an unsupported API call in GPU mode? (Even though few people might call these native single-fetch APIs in GPU mode, we should still ensure all features are robust.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions