Sensors
A sensor turns simulation state into a numeric observation. Some sensors query the SuperDex scene directly: the joint positions and velocities of a bot, the total contact force on a link, the force at each vertex of a link's surface, or the wrench through each joint of an articulation. Others transform the output of other sensors: they sum or map surface forces, stack several signals, or model the observation path with noise, outliers and delay. Sources and transforms share one interface, so a transform can consume a source or another transform.
Sensors are connected by a SensorGraph: a directed acyclic graph whose
edges are declared inputs. Each graph step runs the outputs you select and their
upstream dependencies, in dependency order, after physics has produced the data
to measure. A sensor is either bot-level, declared on one of a bot's links
and owned by that bot, or scene-level, declared in the scene and bound to no
link. A scene-level sensor combines or post-processes bot sensors, which it
names in full as bot/link/sensor.
Sensors, and the graph that connects them, are specified declaratively or
programmatically. Declaratively, a link's sensors list in a
.superdex_bot file declares bot-level sensors, and the top-level sensors
list in a .superdex_scene file declares scene-level ones; loading the scene
builds the graph from both. Parameters are inline JSON or a path to a
.superdex_sensor file. Programmatically, create_sensor on the
RoboticsContext or on a bot creates a sensor at runtime, from C++ or Python.
A sensor created this way is not part of a loaded scene's graph, but C++ can
add it to a SensorGraph it assembles itself. See
Making a Sensor to add a new type.
Ownership. The RoboticsContext owns sensors created through its factories;
the graph borrows them. Before destroying a bot's sensors, the scene loader
unbinds them and downstream sensors from the graph. Their declared nodes remain
for later loading. A scene-level sensor can be destroyed and recreated when a
dependency unloads and loads again. A sensor created directly on the context
lives until you destroy it or the context is torn down. Reading the
latest sample in C++ returns a borrowed view: consume or copy it before the
sensor publishes again, resets or is destroyed. Python's copy_latest_values()
returns an owning copy. See Bot Context & Lifetime
for the ownership of bots and their components.
Sensor Types
| Sensor | Category | Description |
|---|---|---|
SENSOR_LINK_CONTACT_FORCE | Tactile | Total contact force on a link. |
SENSOR_LINK_VERTEX_FORCE | Tactile | Contact force at each vertex of a link's surface. |
SENSOR_AGGREGATE_FORCE | Tactile | Transform: the sum of a vertex-force input. |
SENSOR_SEED_RECT_MAP | Tactile | Transform: a rectangular force map from a hemispherical vertex-force input. |
SENSOR_SEED_V1_MLP | Tactile | Experimental SEED fingertip response, with an optional learned model. |
SENSOR_JOINT_ENCODER | Joint Pose and Wrench | Positions and velocities of a bot's articulated links. |
SENSOR_ARTICULATED_JOINT_WRENCH | Joint Pose and Wrench | Force and torque through each joint of an articulation. |
SENSOR_CONCAT | Signal processing | Several equally shaped outputs stacked into one. |
SENSOR_GAUSSIAN_NOISE | Signal processing | Zero-mean Gaussian noise, drawn once per input publication. |
SENSOR_UNIFORM_NOISE | Signal processing | Additive uniform noise, drawn once per input publication. |
SENSOR_OUTLIER_INJECTION | Signal processing | Whole samples replaced by outliers at a fixed probability. |
SENSOR_DELAY_LINE | Signal processing | Its input, released after a fixed delay. |
SENSOR_TEMPORAL_WINDOW | Signal processing | A rolling history of its input; C++ registration required. |
SENSOR_CAMERA | Camera | Camera pose and intrinsics for a renderer. It does not publish images and is not a sensor-graph node. |
All except SENSOR_TEMPORAL_WINDOW are registered in the public
RoboticsContext. To add your own type, see
Making a Sensor.
The next pages cover the pieces in detail:
- Sensor Graphs: building and stepping a graph, reading samples, the two timestamps on each sample, and changing the graph at runtime.
- Tactile Sensors: contact-force sensors and the vertex-force and force-map representations for tactile links.
- Joint Pose and Wrench: joint encoders and joint wrenches.
- Making a Sensor: writing and registering a new source or transform.