Sensors#
Sensors read information out of a scene without changing its physics. Attach a sensor to a link, step the simulation, and read back a tensor each step. For the attach-and-read model, imperfections, history, and batched reads, see the sensors guide.
Sensor types#
Create a sensor with scene.add_sensor(), passing an options object from gs.sensors. The call returns a handle whose read() gives the measured value and read_ground_truth() the noiseless one, both with the same shape. scene.add_camera() creates a visualization camera instead, which lives outside the sensor pipeline; the Camera sensor page draws the distinction.
Shapes use the batched-optional notation ([n_envs,] ...): the leading n_envs axis is present when the scene is built with multiple environments and absent otherwise.
|
|
Shape |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
each |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
each |
|
|
|
|
|
each |
|
|
|
|
|
|
Notes on the return types:
Camera sensors:
read()returnsCameraReturnType, which carries a singlergbfield. Depth, segmentation, and surface normals come fromscene.add_camera(...).render(...).SurfaceDistanceProbe:read()returns the probe-to-surface distances; the corresponding nearest points are available assensor.nearest_points, shape([n_envs,] n_probes, 3).Raycasterpatterns:pattern_shapefollows the ray pattern: for example(n_horizontal, n_vertical)for a spherical pattern and(height, width)forDepthCamera.
Sensor reference pages#
See also#
Sensors: the attach-and-read model, imperfections, history, and batched reads.
Visualization and rendering: the rendering and camera system.
Entity: entities and links that sensors attach to.