fastsim.extensions
Optional capability modules (recording, benchmark, ROS, HTTP server, data collection, …) that plug into the simulation lifecycle. Enabled via config and wired through ExtensionManager. Also contains the action/goal/observer/backend subsystems used by these modules.
ExtensionManager
static-only2 methodsStatic manager that enables, wires, and provides access to all configured extensions.
enable_all_extensionsstaticmethodActivate all extensions listed in the extension config.
| Name | Type | Default | Description |
|---|---|---|---|
sim | FastSim | — | The active FastSim instance to hook extensions into. |
Extension
abstract1 methodAbstract base class for all FastSim extensions.
Implement enable(sim) to hook into the FastSim lifecycle (register step callbacks, set up resources, etc.). Extensions are instantiated and enabled by ExtensionManager.
DataCollector
3 methodsExtension that collects observations from registered observers each tick.
Recorder
1 methodExtension that records simulation data to a configured backend.
Replayer
1 methodExtension that replays previously recorded trajectory data into the simulation.
Benchmark
1 methodExtension that runs policy benchmark episodes and collects success metrics.
Server
1 methodExtension that exposes a REST HTTP API for remote control of the simulation.
Policy
abstract6 methodsAbstract base class for benchmark policies. Implement all abstract methods to create a custom policy.
A Policy defines the observe → preprocess → compute → postprocess pipeline that runs each benchmark episode. Override needs_observation() to control when observations are requested.
Action
abstract2 methodsAbstract action executed by the task/benchmark system.
actmethodExecute the action and return a result status.
GraspAction
0 methodsClose the gripper to grasp a target object.
Inherited fromAction2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
MoveAction
0 methodsMove the end-effector to a target pose.
Inherited fromAction2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
ReleaseAction
0 methodsOpen the gripper to release a currently held object.
Inherited fromAction2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
AcquireAction
0 methodsCombined move-to + grasp action for acquiring an object.
PickAction
0 methodsPick up an object from its current location.
PlaceAction
0 methodsMove to a target pose and release the held object.
PushAction
0 methodsPush an object by contacting and driving it to a new location.
PullAction
0 methodsPull an object toward the robot.
InsertAction
0 methodsInsert an object into a slot or receptacle.
ClickAction
0 methodsClick or press a button/switch by making contact and applying force.
TwistAction
0 methodsGrasp and rotate an object (e.g. turn a knob or open a jar).
ActionFactory
static-only1 methodStatic factory for creating Action instances from a config dict.
createstaticmethodInstantiate an Action by type name and config parameters.
Goal
abstract1 methodAbstract goal condition evaluated after an action to determine task success.
PoseGoal
0 methodsGoal satisfied when an entity reaches a target pose within a tolerance.
OnTopGoal
0 methodsGoal satisfied when a target object is resting on top of a reference object.
InsideGoal
0 methodsGoal satisfied when a target object is contained inside a specified container.
GoalFactory
static-only1 methodStatic factory for creating Goal instances from a config dict.
createstaticmethodInstantiate a Goal by type name and config parameters.
Observer
abstract1 methodAbstract data observer that collects state information each tick.
observemethodSample the current state and return an Observation.
RobotObserver
0 methodsObserves robot joint positions, velocities, and EE pose.
Inherited fromObserver1
SensorObserver
0 methodsObserves raw data from a named sensor entity.
Inherited fromObserver1
ObjectObserver
0 methodsObserves the pose and state of a named object entity.
Inherited fromObserver1
TaskObserver
0 methodsObserves task execution status (current action, progress, success flag).
Inherited fromObserver1
ObserverFactory
static-only1 methodStatic factory for creating Observer instances from a config dict.
createstaticmethodInstantiate an Observer by type name and config parameters.
Observation
1 methodDict-like container for a single observation snapshot from one or more observers.
Observation subclasses dict, so all standard dict operations are available. Keys are observer-defined channel names; values are the sampled data arrays or scalars.
mergemethodMerge another Observation into this one (in-place union of keys).
| Name | Type | Default | Description |
|---|---|---|---|
other | Observation | — | Observation to merge. |
Postprocessor
abstract1 methodAbstract post-processing step applied to recorded trajectory data.
postprocessmethodApply this post-processing step to a trajectory.
| Name | Type | Default | Description |
|---|---|---|---|
trajectory | Trajectory | — | Trajectory to process. |
ExportHdf5
0 methodsPost-processor that exports trajectory data to an HDF5 file.
Inherited fromPostprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportVideo
0 methodsPost-processor that renders recorded camera frames as an MP4 video.
Inherited fromPostprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportPngDepth
0 methodsPost-processor that saves recorded depth frames as individual PNG images.
Inherited fromPostprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportPreviewVideo
0 methodsPost-processor that produces a compact preview video from recorded data.
Inherited fromPostprocessor1
postprocessmethodApply this post-processing step to a trajectory.
PostprocessorFactory
static-only1 methodStatic factory for creating Postprocessor instances from a config dict.
createstaticmethodInstantiate a Postprocessor by type name and config parameters.
Backend
abstract1 methodAbstract storage/transport backend used by Recorder to persist trajectory data.
writemethodWrite a trajectory to the backend.
| Name | Type | Default | Description |
|---|---|---|---|
trajectory | Trajectory | — | Trajectory data to persist. |
LocalFileSystemBackend
0 methodsSaves trajectory data to the local filesystem.
Inherited fromBackend1
Ros2Backend
0 methodsPublishes trajectory data as ROS2 topic messages.
Inherited fromBackend1
BackendFactory
static-only1 methodStatic factory for creating Backend instances from a config dict.
createstaticmethodInstantiate a Backend by type name and config parameters.
TrajectoryTrack
2 methodsA single named data stream (channel) within a trajectory.
Each TrajectoryTrack holds a sequence of timestamped samples for one observable (e.g. joint positions, camera frames). Multiple tracks combine to form a Trajectory.
Trajectory
3 methodsContainer for multiple TrajectoryTracks forming a complete episode recording.
add_trackmethodRegister a named track into this trajectory.
| Name | Type | Default | Description |
|---|---|---|---|
name | str | — | Channel name for the track. |
track | TrajectoryTrack | — | Track instance to add. |
get_trackmethodRetrieve a named track.
| Name | Type | Default | Description |
|---|---|---|---|
name | str | — | Track channel name. |
TrajectoryLoader
static-only1 methodLoads Trajectory objects from a storage backend.
loadmethodLoad a trajectory from a path or identifier.
| Name | Type | Default | Description |
|---|---|---|---|
source | str | — | File path or backend identifier for the trajectory. |