isaaclab_physx.sensors#
Sub-package containing PhysX-specific sensor implementations.
Additional Public Classes#
The following classes are part of the public isaaclab_physx.sensors API.
A PhysX contact reporting sensor. |
|
PhysX contact sensor configuration. |
|
Data container for the PhysX contact reporting sensor. |
|
A PhysX sensor for reporting frame transforms. |
|
Data container for the PhysX frame transformer sensor. |
|
The PhysX Inertial Measurement Unit (IMU) sensor. |
|
Data container for the PhysX IMU sensor. |
|
PhysX joint reaction wrench sensor. |
|
Data container for the PhysX joint-wrench sensor. |
|
PhysX MultiMeshRayCaster implementation. |
|
PhysX MultiMeshRayCasterCamera implementation. |
|
The PhysX Pose Velocity Acceleration (PVA) sensor. |
|
Data container for the PhysX PVA sensor. |
|
PhysX ray-caster implementation. |
|
PhysX RayCasterCamera implementation. |
- class isaaclab_physx.sensors.ContactSensor[source]#
Bases:
BaseContactSensorA PhysX contact reporting sensor.
The contact sensor reports the normal contact forces on a rigid body in the world frame. It relies on the PhysX ContactReporter API to be activated on the rigid bodies.
To enable the contact reporter on a rigid body, please make sure to enable the
isaaclab.sim.spawner.RigidObjectSpawnerCfg.activate_contact_sensorson your asset spawner configuration. This will enable the contact reporter on all the rigid bodies in the asset.The sensor can be configured to report the contact forces on a set of bodies with a given filter pattern using the
ContactSensorCfg.filter_prim_paths_expr. This is useful when you want to report the contact forces between the sensor bodies and a specific set of bodies in the scene. The data can be accessed using theContactSensorData.force_matrix_w. Please check the documentation on RigidContact for more details.The reporting of the filtered contact forces is only possible as one-to-many. This means that only one sensor body in an environment can be filtered against multiple bodies in that environment. If you need to filter multiple sensor bodies against multiple bodies, you need to create separate sensors for each sensor body.
As an example, suppose you want to report the contact forces for all the feet of a robot against an object exclusively. In that case, setting the
ContactSensorCfg.prim_pathandContactSensorCfg.filter_prim_paths_exprwith{ENV_REGEX_NS}/Robot/.*_FOOTand{ENV_REGEX_NS}/Objectrespectively will not work. Instead, you need to create a separate sensor for each foot and filter it against the object.Methods:
- __init__(cfg: ContactSensorCfg)[source]#
Initializes the contact sensor object.
- Parameters:
cfg¶ – The configuration parameters.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.ContactSensorCfg[source]#
Bases:
ContactSensorCfgPhysX contact sensor configuration.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(class_type: type[ContactSensor] | str = <factory>, cloning_contexts: tuple[str | type, ...] | None = <factory>, prim_path: str = <factory>, update_period: float = <factory>, debug_vis: bool = <factory>, track_pose: bool = <factory>, track_contact_points: bool = <factory>, track_friction_forces: bool = <factory>, max_contact_data_count_per_prim: int | None = <factory>, track_air_time: bool = <factory>, force_threshold: float | None = <factory>, history_length: int = <factory>, filter_prim_paths_expr: list[str] = <factory>, sensor_shape_prim_expr: list[str] = <factory>, filter_shape_prim_expr: list[str] = <factory>, visualizer_cfg: ~isaaclab.markers.visualization_markers_cfg.VisualizationMarkersCfg = <factory>) None#
- class isaaclab_physx.sensors.ContactSensorData[source]#
Bases:
BaseContactSensorDataData container for the PhysX contact reporting sensor.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__()#
- class isaaclab_physx.sensors.FrameTransformer[source]#
Bases:
BaseFrameTransformerA PhysX sensor for reporting frame transforms.
This class provides an interface for reporting the transform of one or more frames (target frames) with respect to another frame (source frame). The source frame is specified by the user as a prim path (
FrameTransformerCfg.prim_path) and the target frames are specified by the user as a list of prim paths (FrameTransformerCfg.target_frames).The source frame and target frames are assumed to be rigid bodies. The transform of the target frames with respect to the source frame is computed by first extracting the transform of the source frame and target frames from the physics engine and then computing the relative transform between the two.
Additionally, the user can specify an offset for the source frame and each target frame. This is useful for specifying the transform of the desired frame with respect to the body’s center of mass, for instance.
A common example of using this sensor is to track the position and orientation of the end effector of a robotic manipulator. In this case, the source frame would be the body corresponding to the base frame of the manipulator, and the target frame would be the body corresponding to the end effector. Since the end-effector is typically a fictitious body, the user may need to specify an offset from the end-effector to the body of the manipulator.
Methods:
- __init__(cfg: FrameTransformerCfg)[source]#
Initializes the frame transformer object.
- Parameters:
cfg¶ – The configuration parameters.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.FrameTransformerData[source]#
Bases:
BaseFrameTransformerDataData container for the PhysX frame transformer sensor.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__()#
- class isaaclab_physx.sensors.Imu[source]#
Bases:
BaseImuThe PhysX Inertial Measurement Unit (IMU) sensor.
This sensor models a real IMU that measures angular velocity (gyroscope) and linear acceleration (accelerometer) in the sensor’s body frame. Unlike the PVA sensor, it does not provide pose, linear velocity, angular acceleration, or projected gravity.
Like a real accelerometer, the linear acceleration readings always include the contribution of gravity. The gravity vector is queried from the simulation at initialization.
The sensor can be attached to any prim path with a rigid ancestor in its tree. If the provided path is not a rigid body, the closest rigid-body ancestor is used for simulation queries. The fixed transform from that ancestor to the target prim is computed once during initialization and composed with the configured sensor offset.
Note
Linear acceleration is computed using numerical differentiation from velocities. Consequently, the IMU sensor accuracy depends on the chosen physics timestep. For sufficient accuracy, we recommend keeping the timestep at least 200 Hz.
Methods:
- __init__(cfg: ImuCfg)[source]#
Initializes the IMU sensor.
- Parameters:
cfg¶ – The configuration parameters.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.ImuData[source]#
Bases:
BaseImuDataData container for the PhysX IMU sensor.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__()#
- class isaaclab_physx.sensors.JointWrenchSensor[source]#
Bases:
BaseJointWrenchSensorPhysX joint reaction wrench sensor.
The sensor reads PhysX’s incoming joint wrench for every articulation link and exposes the linear force [N] and angular torque [N·m] components in the child-side joint frame, with torque referenced at the child-side joint anchor. The root body’s entry is included.
prim_pathmust point at either the articulation root prim or a parent prim containing a single articulation root in every environment.Methods:
- __init__(cfg: JointWrenchSensorCfg)[source]#
Initialize the PhysX joint-wrench sensor.
- Parameters:
cfg¶ – The configuration parameters.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.JointWrenchSensorData[source]#
Bases:
BaseJointWrenchSensorDataData container for the PhysX joint-wrench sensor.
Methods:
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.MultiMeshRayCaster[source]#
Bases:
_PhysXRayCasterMixin,BaseMultiMeshRayCasterPhysX MultiMeshRayCaster implementation.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(cfg: MultiMeshRayCasterCfg)#
Initializes the ray-caster object.
- Parameters:
cfg¶ – The configuration parameters.
- class isaaclab_physx.sensors.MultiMeshRayCasterCamera[source]#
Bases:
_PhysXRayCasterMixin,BaseMultiMeshRayCasterCameraPhysX MultiMeshRayCasterCamera implementation.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(cfg: MultiMeshRayCasterCameraCfg)#
Initializes the camera object.
- Parameters:
cfg¶ – The configuration parameters.
- Raises:
ValueError – If the provided data types are not supported by the ray-caster camera.
- class isaaclab_physx.sensors.Pva[source]#
Bases:
BasePvaThe PhysX Pose Velocity Acceleration (PVA) sensor.
The sensor can be attached to any prim path with a rigid ancestor in its tree and produces body-frame linear acceleration and angular velocity, along with world-frame pose and body-frame linear and angular accelerations/velocities.
If the provided path is not a rigid body, the closest rigid-body ancestor is used for simulation queries. The fixed transform from that ancestor to the target prim is computed once during initialization and composed with the configured sensor offset.
Note
We are computing the accelerations using numerical differentiation from the velocities. Consequently, the PVA sensor accuracy depends on the chosen physx timestep. For a sufficient accuracy, we recommend to keep the timestep at least as 200Hz.
Note
The user can configure the sensor offset in the configuration file. The offset is applied relative to the rigid source prim. If the target prim is not a rigid body, the offset is composed with the fixed transform from the rigid ancestor to the target prim. The offset is applied in the body frame of the rigid source prim. The offset is defined as a position vector and a quaternion rotation, which are applied in the order: position, then rotation. The position is applied as a translation in the body frame of the rigid source prim, and the rotation is applied as a rotation in the body frame of the rigid source prim.
Methods:
- __init__(cfg: PvaCfg)[source]#
Initializes the PVA sensor.
- Parameters:
cfg¶ – The configuration parameters.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.PvaData[source]#
Bases:
BasePvaDataData container for the PhysX PVA sensor.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__()#
- class isaaclab_physx.sensors.RayCaster[source]#
Bases:
_PhysXRayCasterMixin,BaseRayCasterPhysX ray-caster implementation.
Methods:
- __init__(cfg: RayCasterCfg)[source]#
Initialize the PhysX ray-caster.
- Parameters:
cfg¶ – The ray-caster configuration.
- classmethod __new__(*args, **kwargs)#
- class isaaclab_physx.sensors.RayCasterCamera[source]#
Bases:
_PhysXRayCasterMixin,BaseRayCasterCameraPhysX RayCasterCamera implementation.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__(cfg: RayCasterCameraCfg)#
Initializes the camera object.
- Parameters:
cfg¶ – The configuration parameters.
- Raises:
ValueError – If the provided data types are not supported by the ray-caster camera.