Data Transforms¶
Data transformations and compatibility layers.
roverd.transforms.ouster
¶
Ouster Lidar transforms.
Warning
This module is not automatically imported; you will need to explicitly import it:
You will also need to have the ouster-sdk
extra installed.
roverd.transforms.ouster.ConfigCache
¶
Ouster sensor intrinsics cache.
Source code in format/src/roverd/transforms/ouster.py
__getitem__
¶
__getitem__(path: str) -> SensorInfo
Get sensor intrinsics by path.
- First checks if we have a
SensorInfo
loaded already for the given path. - If not, we then check if we have a
SensorInfo
loaded with an identical configuration. - If neither is found, we read the file and create a new
SensorInfo
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
Path to the sensor intrinsics file. |
required |
Returns:
Type | Description |
---|---|
SensorInfo
|
Ouster |
Source code in format/src/roverd/transforms/ouster.py
roverd.transforms.ouster.Destagger
¶
Bases: Transform[OSDepth, Depth]
Destagger Ouster Lidar depth data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
ConfigCache | None
|
if provided, use this configuration cache (to share with other transforms). |
None
|
Source code in format/src/roverd/transforms/ouster.py
__call__
¶
Destagger Ouster Lidar depth data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
OSDepth
|
Ouster Lidar depth data with staggered measurements. |
required |
Returns:
Type | Description |
---|---|
Depth
|
Depth data with destaggered measurements. |
Source code in format/src/roverd/transforms/ouster.py
roverd.transforms.ouster.PointCloud
¶
Bases: Transform[OSDepth, PointCloud]
Calculate point cloud from Ouster Lidar depth data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
min_range
|
float | None
|
minimum range to include in the point cloud; if |
None
|
Source code in format/src/roverd/transforms/ouster.py
__call__
¶
__call__(data: OSDepth) -> PointCloud
Convert Ouster Lidar depth data to point cloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
OSDepth
|
Ouster Lidar depth data with staggered measurements. |
required |
Returns:
Type | Description |
---|---|
PointCloud
|
Point cloud data. |
Source code in format/src/roverd/transforms/ouster.py
roverd.transforms.ros
¶
Rover to rosbag conversion.
Warning
This module is not automatically imported; you will need to explicitly import it:
You will also need to have the ros
extra installed.
roverd.transforms.ros.rover_to_rosbag
¶
rover_to_rosbag(
out: str, imu: IMU, lidar: OSLidarDepth, min_range: float | None = None
) -> None
Write lidar and IMU data to a ros bag (to run SLAM, e.g., cartographer).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
out
|
str
|
output rosbag file path. |
required |
imu
|
IMU
|
IMU sensor. |
required |
lidar
|
OSLidarDepth
|
Lidar sensor. |
required |
min_range
|
float | None
|
minimum range for lidar points. |
None
|
Source code in format/src/roverd/transforms/ros.py
roverd.transforms.ros.ts_sec_ns
¶
Convert float64 timestamp to seconds, ns remainder, and ns timestamp.