Skip to content

[Question] IMU Sensor Requires RigidBodyAPI on Target Prim #3088

@GiulioRomualdi

Description

@GiulioRomualdi

I'm not sure if this is expected behavior or a bug.

I'm trying to attach an IMU sensor to a frame that does not have a RigidBodyAPI. Specifically, the prim path is:

/ergoCub/root_link/torso_1/waist_imu_0

As shown in the image below, the prim exists and has valid transform data, but no RigidBodyAPI component:

Image

When I try to create the IMU sensor using:

imu = ImuCfg(prim_path="{ENV_REGEX_NS}/Robot/root_link/torso_1/waist_imu_0", debug_vis=False)

I get the following runtime error:

RuntimeError: Failed to find a RigidBodyAPI for the prim paths: /World/envs/env_.*/Robot/root_link/torso_1/waist_imu_0

This error originates from this section of the code:

if prim.HasAPI(UsdPhysics.RigidBodyAPI):
self._view = self._physics_sim_view.create_rigid_body_view(self.cfg.prim_path.replace(".*", "*"))
else:
raise RuntimeError(f"Failed to find a RigidBodyAPI for the prim paths: {self.cfg.prim_path}")

Question

Is it required that the target prim for an IMU sensor has RigidBodyAPI?
I was expecting it to be possible to attach IMUs to arbitrary (static or articulated) frames, not just rigid bodies.

I'm using Isaac Lab v2.1.1 and IsaacSim 4.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions