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
静态类2 个方法Static manager that enables, wires, and provides access to all configured extensions.
Extension
抽象类1 个方法Abstract 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 个方法Extension that collects observations from registered observers each tick.
Recorder
1 个方法Extension that records simulation data to a configured backend.
Replayer
1 个方法Extension that replays previously recorded trajectory data into the simulation.
Benchmark
1 个方法Extension that runs policy benchmark episodes and collects success metrics.
Server
1 个方法Extension that exposes a REST HTTP API for remote control of the simulation.
Policy
抽象类6 个方法Abstract 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
抽象类2 个方法Abstract action executed by the task/benchmark system.
actmethodExecute the action and return a result status.
GraspAction
0 个方法Close the gripper to grasp a target object.
继承自Action2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
MoveAction
0 个方法Move the end-effector to a target pose.
继承自Action2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
ReleaseAction
0 个方法Open the gripper to release a currently held object.
继承自Action2
is_goal_satisfiedmethodReturn True if the post-condition goal of this action is met.
AcquireAction
0 个方法Combined move-to + grasp action for acquiring an object.
PickAction
0 个方法Pick up an object from its current location.
PlaceAction
0 个方法Move to a target pose and release the held object.
PushAction
0 个方法Push an object by contacting and driving it to a new location.
PullAction
0 个方法Pull an object toward the robot.
InsertAction
0 个方法Insert an object into a slot or receptacle.
ClickAction
0 个方法Click or press a button/switch by making contact and applying force.
TwistAction
0 个方法Grasp and rotate an object (e.g. turn a knob or open a jar).
ActionFactory
静态类1 个方法Static factory for creating Action instances from a config dict.
createstaticmethodInstantiate an Action by type name and config parameters.
Goal
抽象类1 个方法Abstract goal condition evaluated after an action to determine task success.
PoseGoal
0 个方法Goal satisfied when an entity reaches a target pose within a tolerance.
OnTopGoal
0 个方法Goal satisfied when a target object is resting on top of a reference object.
InsideGoal
0 个方法Goal satisfied when a target object is contained inside a specified container.
GoalFactory
静态类1 个方法Static factory for creating Goal instances from a config dict.
Observer
抽象类1 个方法Abstract data observer that collects state information each tick.
observemethodSample the current state and return an Observation.
RobotObserver
0 个方法Observes robot joint positions, velocities, and EE pose.
继承自Observer1
SensorObserver
0 个方法Observes raw data from a named sensor entity.
继承自Observer1
ObjectObserver
0 个方法Observes the pose and state of a named object entity.
继承自Observer1
TaskObserver
0 个方法Observes task execution status (current action, progress, success flag).
继承自Observer1
ObserverFactory
静态类1 个方法Static factory for creating Observer instances from a config dict.
createstaticmethodInstantiate an Observer by type name and config parameters.
Observation
1 个方法Dict-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).
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
other | Observation | — | Observation to merge. |
Postprocessor
抽象类1 个方法Abstract post-processing step applied to recorded trajectory data.
postprocessmethodApply this post-processing step to a trajectory.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
trajectory | Trajectory | — | Trajectory to process. |
ExportHdf5
0 个方法Post-processor that exports trajectory data to an HDF5 file.
继承自Postprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportVideo
0 个方法Post-processor that renders recorded camera frames as an MP4 video.
继承自Postprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportPngDepth
0 个方法Post-processor that saves recorded depth frames as individual PNG images.
继承自Postprocessor1
postprocessmethodApply this post-processing step to a trajectory.
ExportPreviewVideo
0 个方法Post-processor that produces a compact preview video from recorded data.
继承自Postprocessor1
postprocessmethodApply this post-processing step to a trajectory.
PostprocessorFactory
静态类1 个方法Static factory for creating Postprocessor instances from a config dict.
createstaticmethodInstantiate a Postprocessor by type name and config parameters.
Backend
抽象类1 个方法Abstract storage/transport backend used by Recorder to persist trajectory data.
writemethodWrite a trajectory to the backend.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
trajectory | Trajectory | — | Trajectory data to persist. |
LocalFileSystemBackend
0 个方法Saves trajectory data to the local filesystem.
继承自Backend1
Ros2Backend
0 个方法Publishes trajectory data as ROS2 topic messages.
继承自Backend1
BackendFactory
静态类1 个方法Static factory for creating Backend instances from a config dict.
createstaticmethodInstantiate a Backend by type name and config parameters.
TrajectoryTrack
2 个方法A 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 个方法Container for multiple TrajectoryTracks forming a complete episode recording.
add_trackmethodRegister a named track into this trajectory.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
name | str | — | Channel name for the track. |
track | TrajectoryTrack | — | Track instance to add. |
get_trackmethodRetrieve a named track.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
name | str | — | Track channel name. |
TrajectoryLoader
静态类1 个方法Loads Trajectory objects from a storage backend.
loadmethodLoad a trajectory from a path or identifier.
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
source | str | — | File path or backend identifier for the trajectory. |