_simulation_state_impl
Module Contents
Classes
Implementation of the simulation state interface for MuJoCo. |
- class SimulationStateImpl(data: mujoco.MjData, abstraction_to_mujoco_mapping: mujoco_simulator._abstraction_to_mujoco_mapping.AbstractionToMujocoMapping, camera_views: dict[int, numpy.typing.NDArray[numpy.uint8]])
Bases:
revolve2.simulation.scene.SimulationState
Implementation of the simulation state interface for MuJoCo.
- abstract get_rigid_body_relative_pose(rigid_body: revolve2.simulation.scene.RigidBody) revolve2.simulation.scene.Pose
Get the pose of a rigid body, relative to its parent multi-body system’s reference frame.
- Parameters:
rigid_body – The rigid body to get the pose for.
- Returns:
The relative pose.
- Raises:
NotImplementedError – Always.
- abstract get_rigid_body_absolute_pose(rigid_body: revolve2.simulation.scene.RigidBody) revolve2.simulation.scene.Pose
Get the pose of a rigid body, relative the global reference frame.
- Parameters:
rigid_body – The rigid body to get the pose for.
- Returns:
The absolute pose.
- Raises:
NotImplementedError – Always.
- get_multi_body_system_pose(multi_body_system: revolve2.simulation.scene.MultiBodySystem) revolve2.simulation.scene.Pose
Get the pose of a multi-body system, relative to the global reference frame.
- Parameters:
multi_body_system – The multi-body system to get the pose for.
- Returns:
The relative pose.
- get_hinge_joint_position(joint: revolve2.simulation.scene.JointHinge) float
Get the rotational position of a hinge joint.
- Parameters:
joint – The joint to get the rotational position for.
- Returns:
The rotational position.
- get_imu_specific_force(imu_sensor: revolve2.simulation.scene.sensors.IMUSensor) pyrr.Vector3
Get the specific force measured an IMU.
- Parameters:
imu_sensor – The IMU.
- Returns:
The specific force.
- get_imu_angular_rate(imu_sensor: revolve2.simulation.scene.sensors.IMUSensor) pyrr.Vector3
Get the angular rate measured by am IMU.
- Parameters:
imu_sensor – The IMU.
- Returns:
The angular rate.
- get_camera_view(camera_sensor: revolve2.simulation.scene.sensors.CameraSensor) numpy.typing.NDArray[numpy.uint8]
Get the current view of the camera.
- Parameters:
camera_sensor – The camera.
- Returns:
The image (RGB).