Sensor and Camera Options¶
SensorsOptions and CamerasOptions are the sensors_options and cameras_options fields of a config. Each holds
named children: one SensorOptions or CameraOptions per sensor or camera, keyed by the name the env exposes it
under (env.sensors[...], env.cameras[...]). A SensorOptions wraps any Genesis sensor options (gs.sensors.*,
or one of Eden's engine sensors) and says which entity and link to attach it to. The
sensors and rendering guide explains each sensor and camera mode.
from eden.options.camera import CameraOptions, CamerasOptions
from eden.options.sensors import SensorOptions, SensorsOptions
Sensors¶
SensorOptions
¶
Bases: ConfigurableOptions
Configuration for a single sensor.
| PARAMETER | DESCRIPTION |
|---|---|
sensor
|
The Genesis sensor options.
TYPE:
|
attach_entity_name
|
Name of the entity to attach the sensor to. Empty for static sensors.
TYPE:
|
attach_link_name
|
Name of the link to attach the sensor to.
TYPE:
|
track_link_names
|
Resolved at env build into the nested sensor's |
filter_link_names
|
For contact sensors ( |
Examples:
IMU sensor attached to a robot link
>>> sensor_options = SensorOptions(
... sensor=gs.sensors.IMU(
... acc_noise=(0.01, 0.01, 0.01),
... ),
... attach_entity_name="robot",
... attach_link_name="base_link",
... )
Source code in eden/options/options.py
SensorsOptions
¶
Bases: DynamicConfigurableOptions
Container for multiple named sensors in an environment.
Examples:
>>> sensors_options = SensorsOptions(
... contact_sensor=SensorOptions(
... sensor=gs.sensors.Contact(),
... attach_entity_name="robot",
... attach_link_name="end_effector",
... ),
... imu_sensor=SensorOptions(
... sensor=gs.sensors.IMU(acc_noise=(0.01, 0.01, 0.01)),
... attach_entity_name="robot",
... ),
... )
Source code in eden/options/options.py
Cameras¶
CameraOptions
¶
Bases: ConfigurableOptions
Configuration for a single camera.
| PARAMETER | DESCRIPTION |
|---|---|
model
|
Camera model.
|
cam_pos
|
Camera position.
|
cam_lookat
|
Camera lookat.
|
cam_resolution
|
Camera resolution in (width, height).
|
cam_up
|
Camera up vector.
|
cam_intrinsic
|
Camera intrinsic matrix, used to set the camera's field of view and resolution.
If provided,
|
cam_extrinsic
|
Camera extrinsic matrix, used to set the camera's position, lookat, and up.
The extrinsic matrix is the inverse of the transform from the camera frame to the world frame.
If provided,
|
cam_aperture
|
Camera aperture.
|
cam_fov
|
Vertical field of view, in degrees.
|
cam_near
|
Near clipping plane in meters.
|
cam_far
|
Far clipping plane in meters.
|
debug
|
Whether to enable debug mode.
|
follow_entity_name
|
Name of the entity to follow.
|
attach_entity_name
|
Name of the entity to attach the camera to.
|
attach_link_name
|
Name of the link to attach the camera to.
|
attach_offset
|
Offset of the camera from the link.
|
attach_quat
|
Quaternion of the camera from the link (w, x, y, z).
|
overlays
|
What :meth:
|
sensor_options
|
Genesis sensor options (e.g. RasterizerCameraOptions, NyxCameraOptions). When provided, the camera uses scene.add_sensor() instead of scene.add_camera(). The sensor backend only supports RGB rendering; depth/segmentation/normal/pointcloud are not available. Fields pos/lookat/fov/res/up are auto-populated from cam_pos/cam_lookat/cam_fov/cam_resolution/cam_up during build if not explicitly set.
|
Source code in eden/options/options.py
Attributes¶
CamerasOptions
¶
Bases: DynamicConfigurableOptions
Container mapping camera names to their :class:CameraOptions.
Source code in eden/options/camera.py
Methods:¶
CameraOverlayOptions
¶
Bases: DynamicConfigurableOptions
One overlay a camera paints onto its RGB frames (:mod:eden.entities.camera_overlays).
Built with the overlay class's configure(), e.g.
PlanePaintOverlay.configure(metric_name="drawing", color=(0, 0, 0)), which fills name with the overlay's
registry key and carries its parameters as extras. Those are checked here, when name resolves: their names
against the overlay's parameters, their types against the declared ones (converting as a declared field would, so
a list read back from JSON is the declared tuple again), and their values by the overlay's check_parameters().
A typo or a bad value in a config file therefore fails in that file. An overlay whose module is not imported yet is
checked when the camera is constructed.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Registry key of the overlay in
|
Source code in eden/options/options.py
The overlay classes themselves (PlanePaintOverlay, SplatComposite, ...) are on the
entities page.