IJointStateSensor#

Fully qualified name: isaacsim::sensors::experimental::physics::IJointStateSensor

struct IJointStateSensor#

Carbonite interface for managing C++ joint state sensors.

Reads all DOF positions, velocities, and efforts from an articulation in a single sensor. Uses IArticulationDataView for engine-agnostic access to articulation joint state data.

Unlike EffortSensor (which targets a single joint), this sensor attaches to the articulation root prim and reports all DOFs in articulation order.

The plugin is self-driving: it subscribes to PhysX simulation events (eResumed / eStopped) and physics step events internally.

Lifecycle:

  1. acquire via carb::getCachedInterface or pybind11 acquire function

  2. createSensor() with the articulation root prim path

  3. getSensorReading() — returns the complete reading (names + positions + velocities + efforts)

  4. shutdown() on extension unload

When simulation stops (eStopped), all sensors are destroyed and existing sensor IDs become invalid; call createSensor() again after resume if needed.

Not thread-safe: call createSensor(), removeSensor(), and getSensorReading() from a single thread, or synchronize externally.

Public Functions

virtual void shutdown() = 0#

Shut down the manager, destroying all sensors and freeing resources.

virtual bool createSensor(const char *articulationRootPath) = 0#

Create a joint state sensor for the given articulation root prim.

If a sensor already exists for this prim path the call succeeds without creating a duplicate.

Parameters:

articulationRootPath – USD path to the articulation root prim.

Returns:

true on success (sensor created or already exists), false on failure.

virtual void removeSensor(const char *articulationRootPath) = 0#

Remove a sensor and free its resources.

Parameters:

articulationRootPath – USD path used when the sensor was created.

virtual JointStateSensorReading getSensorReading(
const char *articulationRootPath,
) = 0#

Get the complete joint state reading for a sensor.

On a valid reading, all array pointers in the returned struct point into sensor-internal storage and remain valid until the next physics step or sensor destruction.

Parameters:

articulationRootPath – USD path used when the sensor was created.

Returns:

Complete reading with dofCount, dofNames, positions, velocities, and efforts. isValid is false before the first physics step or if the sensor is disabled.