roverd.sensors
¶
Rover Sensors.
Name | Class | Description | Timestamp Correction |
---|---|---|---|
radar | XWRRadar |
4D radar | IID |
lidar | OSLidarDepth |
Ouster OS0/1/2 lidar depth data | IID + frame drops |
OSLidar |
Ouster lidar with reflectance and NIR | ||
camera | Camera |
Generic RGB camera | IID |
_camera | Semseg |
Generic image semantic segmentation | IID |
imu | IMU |
3-axis accelerometer + gyroscope | IID |
(other) | DynamicSensor |
Generic sensor with dynamic channels | none |
roverd.sensors.Camera
¶
Bases: Sensor[CameraData[ndarray], Metadata]
Generic RGB camera.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
key
|
str
|
video channel name. |
'video.avi'
|
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/camera.py
__getitem__
¶
__getitem__(index: int | integer) -> CameraData
Read camera data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
CameraData[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/camera.py
roverd.sensors.DynamicSensor
¶
Bases: Sensor[TGenericSample, Metadata]
Generic sensor type with dynamically configured data types.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
create
|
bool
|
if |
False
|
exist_ok
|
bool
|
if |
False
|
subset
|
Sequence[str] | None
|
if specified, only read the listed channels. |
None
|
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/generic.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
__getitem__
¶
Fetch measurement from this sensor, by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
measurement index, or channel name. |
required |
Returns:
Type | Description |
---|---|
TGenericSample | Channel
|
Measurement data, or channel object if |
Source code in format/src/roverd/sensors/generic.py
create
¶
Create and open new channel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
str
|
name of new channel. |
required |
meta
|
dict
|
metadata for the new channel; see
|
required |
args
|
dict
|
additional arguments to pass to the channel constructor. |
{}
|
Returns:
Type | Description |
---|---|
Channel
|
The newly created channel; sensor metadata is also flushed to disk,
and the channel is registered with this |
Source code in format/src/roverd/sensors/generic.py
roverd.sensors.IMU
¶
Bases: Sensor[IMUData[ndarray], Metadata]
IMU sensor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/pose.py
__getitem__
¶
Fetch IMU data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
IMUData[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/pose.py
roverd.sensors.LidarMetadata
dataclass
¶
Lidar metadata.
Attributes:
Name | Type | Description |
---|---|---|
timestamps |
Float64[ndarray, N]
|
timestamp for each frame; nominally in seconds. |
intrinics |
Float64[ndarray, N]
|
lidar intrinsics file; see the ouster sdk |
Source code in format/src/roverd/sensors/lidar.py
roverd.sensors.OSLidar
¶
Bases: Sensor[OSData[ndarray], LidarMetadata]
Ouster lidar sensor, all channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/lidar.py
__getitem__
¶
Read lidar data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
OSData[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/lidar.py
roverd.sensors.OSLidarDepth
¶
Bases: Sensor[OSDepth[ndarray], LidarMetadata]
Ouster lidar sensor, depth/rng only.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/lidar.py
__getitem__
¶
Read lidar data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
OSDepth[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/lidar.py
stream
¶
Stream lidar data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch
|
int | None
|
if specified, stream in batches of this size; otherwise, stream one frame at a time. |
None
|
Yields:
Type | Description |
---|---|
OSDepth[ndarray]
|
Lidar data. |
Source code in format/src/roverd/sensors/lidar.py
roverd.sensors.Semseg
¶
Bases: Sensor[CameraSemseg[ndarray], Metadata]
Generic camera semseg.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
key
|
str
|
semseg channel name. |
'segment'
|
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/camera.py
__getitem__
¶
__getitem__(index: int | integer) -> CameraSemseg
Read camera data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
CameraSemseg[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/camera.py
roverd.sensors.Sensor
¶
Bases: Sensor[TSample, TMetadata]
Base sensor class, providing various utility methods.
Warning
If past > 0
or future > 0
, the caller is responsible for
ensuring that invalid indices < past
or >= len(sensor) - future
are not read.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Attributes:
Name | Type | Description |
---|---|---|
path |
path to sensor data directory. |
|
channels |
dictionary of channels, keyed by channel name. |
|
correction |
timestamp correction function to apply. |
Source code in format/src/roverd/sensors/generic.py
roverd.sensors.XWRRadar
¶
Bases: Sensor[XWRRadarIQ[ndarray], RadarMetadata]
Full spectrum 4D radar sensor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
path to sensor data directory. Must contain a |
required |
correction
|
str | None | Callable[[Float64[ndarray, N]], Float64[ndarray, N]]
|
optional timestamp correction to apply (i.e.,
smoothing); can be a callable, string (name of a callable in
|
None
|
past
|
int
|
number of past samples to include. |
0
|
future
|
int
|
number of future samples to include. |
0
|
Source code in format/src/roverd/sensors/radar.py
__getitem__
¶
Fetch IQ data by index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index
|
int | integer | str
|
frame index, or channel name. |
required |
Returns:
Type | Description |
---|---|
XWRRadarIQ[ndarray] | Channel
|
Radar data, or channel object if |
Source code in format/src/roverd/sensors/radar.py
roverd.sensors.from_config
¶
Create sensor from configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
File path to the sensor data. |
required |
type
|
str | None | Sensor | Callable[[str], Sensor]
|
sensor, sensor constructor, name of a sensor, or |
required |
Returns:
Type | Description |
---|---|
Sensor
|
Initialized sensor object. |