fastsim.unisim
Backend-agnostic scene and entity API. SceneManager provides access to all spawned robots, objects, and sensors regardless of the underlying simulator backend. Abstract base classes define the lifecycle contract for every entity type.
UniSim
abstract6 methodsAbstract base class for all simulator backends. Subclass to integrate a new physics engine.
UniSim defines the minimal interface that every backend must implement: initialization, scene setup, stepping, and reset. The framework calls these methods; users typically do not interact with UniSim directly.
Spawnable
abstract6 methodsAbstract base for all scene entities. Defines the spawn/remove/update lifecycle.
Every entity that can be placed in a scene (robots, objects, sensors, lights, bases) extends Spawnable. The framework calls spawn() once at scene setup, update_data() every tick, and remove() on cleanup.
Articulation
abstract9 methodsAbstract articulated body with joint state read/write and drive targets.
Articulation extends Spawnable with a joint-level API used by both robots and articulated objects. Position, velocity, and effort targets map to the underlying physics drive.
get_joint_positionmethodRead the current position of one or all joints.
set_joint_position_targetmethodSet position drive targets for one or more joints.
set_joint_velocity_targetmethodSet velocity drive targets for one or more joints.
set_joint_effort_targetmethodSet effort (torque/force) targets for one or more joints.
Inherited fromSpawnable6
Robot
abstract6 methodsAbstract robot with end-effector, IK, and motion planning support.
Robot extends Articulation with EE-level operations and planner integration. Concrete robot classes (GeneralRobot, SingleGripperArmRobot, …) inherit from Robot.
solve_ikmethodSolve IK for a target EE pose using the robot's planner.
get_ee_jacobianmethodCompute the geometric Jacobian at the end-effector for the current configuration.
Inherited fromArticulation9
write_data_to_simmethodFlush buffered drive commands to the physics backend.
get_joint_namesmethodReturn the ordered list of joint names for this articulation.
get_body_namesmethodReturn the ordered list of rigid body (link) names.
is_joint_stoppedmethodReturn True when all joints have come to rest (velocity below threshold).
GeneralRobot
0 methodsGeneral-purpose robot with no gripper or arm specialization. Inherits the full Robot API.
Inherited fromRobot6
get_plannermethodReturn the motion planner instance attached to this robot.
get_ee_posemethodReturn the current world-frame pose of the end-effector.
get_ee_link_namemethodReturn the name of the link designated as the end-effector.
get_ee_jacobianmethodCompute the geometric Jacobian at the end-effector for the current configuration.
SingleGripperArmRobot
6 methodsArm robot with a single parallel-jaw or suction gripper.
Adds gripper open/close commands and convenience arm-specific helpers on top of the base Robot API.
set_arm_target_positionmethodSet joint position targets for the arm joints only (excludes gripper).
Inherited fromRobot6
get_plannermethodReturn the motion planner instance attached to this robot.
get_ee_posemethodReturn the current world-frame pose of the end-effector.
get_ee_link_namemethodReturn the name of the link designated as the end-effector.
get_ee_jacobianmethodCompute the geometric Jacobian at the end-effector for the current configuration.
Object
abstract2 methodsAbstract scene object with position and scale. Parent of RigidObject, ArticulatedObject, and SoftObject.
RigidObject
2 methodsPhysics-enabled rigid body. Responds to gravity, contacts, and impulses.
ArticulatedObject
0 methodsAn articulated scene object (e.g. a drawer, door) that is not a robot.
Inherits joint control from Articulation and object positioning from Object. Useful for interactive props with multiple moving parts.
Inherited fromArticulation9
write_data_to_simmethodFlush buffered drive commands to the physics backend.
get_joint_namesmethodReturn the ordered list of joint names for this articulation.
get_body_namesmethodReturn the ordered list of rigid body (link) names.
is_joint_stoppedmethodReturn True when all joints have come to rest (velocity below threshold).
SoftObject
abstract10 methodsAbstract deformable / soft-body object with particle-level state access.
Provides APIs for querying and controlling particle positions, velocities, and deformation gradients. Concrete implementations (e.g. IsaacLabSoftObject) map these to the simulator's soft-body solver. Supports cloth, volumetric, and inflatable body types.
get_particle_positionsmethodReturn all particle positions as an (N, 3) array in world space.
get_particle_velocitiesmethodReturn all particle velocities as an (N, 3) array in world space.
set_particle_positionsmethodOverwrite particle positions with an (N, 3) array in world space.
| Name | Type | Default | Description |
|---|---|---|---|
positions | np.ndarray | — | New particle positions, shape (N, 3) |
set_particle_velocitiesmethodOverwrite particle velocities with an (N, 3) array in world space.
| Name | Type | Default | Description |
|---|---|---|---|
velocities | np.ndarray | — | New particle velocities, shape (N, 3) |
get_deformation_gradientmethodReturn per-element deformation gradients as an (M, 3, 3) array.
M is the number of finite-element cells (tetrahedra, hexahedra, or triangles for cloth). Returns an empty array when the simulator does not expose element-level data.
set_root_link_posemethodTeleport the entire soft body rigidly without introducing deformation.
| Name | Type | Default | Description |
|---|---|---|---|
position | List[float] | — | Target position [x, y, z] |
quaternion | List[float] | — | Target orientation [w, x, y, z] |
Sensor
abstract1 methodAbstract sensor entity. All sensors extend this class.
Inherited fromSpawnable6
Camera
3 methodsRGB/depth camera sensor with configurable intrinsics.
get_rgbmethodReturn the latest RGB image as a uint8 array (H×W×3).
get_depthmethodReturn the latest depth image in metres (H×W).
get_intrinsicsmethodReturn the camera intrinsic matrix K (3×3).
Base
abstract0 methodsAbstract scene base / environment entity (ground, stage, arena).
Inherited fromSpawnable6
EmptyBase
0 methodsEmpty base with no geometry or physics — useful for tabletop scenes where the ground is provided externally.
UsdBase
1 methodLoads a USD stage file as the scene environment.
GroundPlaneBase
0 methodsInfinite ground plane with collision physics — the default base for most manipulation tasks.
Light
abstract1 methodAbstract light entity. All light types extend this class.
Inherited fromSpawnable6
GeneralLight
1 methodGeneral-purpose light supporting sphere, rectangle, and distant light types.
RobotFactory
static-only1 methodStatic factory for creating Robot instances from name and config.
ObjectFactory
static-only1 methodStatic factory for creating Object instances from name and config.
SensorFactory
static-only1 methodStatic factory for creating Sensor instances from name and config.
BaseFactory
static-only1 methodStatic factory for creating Base instances from name and config.
LightFactory
static-only1 methodStatic factory for creating Light instances from name and config.
SceneManager
static-only8 methodsStatic registry and factory for all scene entities (robots, objects, sensors, spawnables).
SceneManager is the single source of truth for every entity active in the simulation. Query entities by name, bulk-retrieve all entities of a kind, or access low-level Spawnable handles for advanced use.
setup_scene_from_configstaticmethodParse the scene config section and spawn all configured entities.
| Name | Type | Default | Description |
|---|---|---|---|
scene_cfg | dict | — | The parsed scene configuration dict (usually from ConfigManager.scene_config). |