Module ouster.sdk.bag
ouster.sdk.bag.bag_packet_source
- class MessageCount[source]
Bases:
Structure
- count
Structure/Union member
- id
Structure/Union member
- class BagPacketSource(bag_path, *, extrinsics_file=None, meta=None, soft_id_check=False, extrinsics=[])[source]
Bases:
PacketSource
Read a sensors packet streams out of a bag file as an iterator.
Read sensor data streams from a single bag file.
- Parameters:
bag_path (
Union
[str
,List
[str
]]) – path to bag file or folder containing ROS2 db3 and yaml filemeta (
Optional
[List
[str
]]) – optional list of metadata files to load, if not provided metadata is loaded from the bag insteadsoft_id_check (
bool
) – if True, don’t skip packets on init_id mismatch
- property sensor_info: List[SensorInfo]
Metadata associated with the packet.
- property is_live: bool
Check if the packet source is live.
- property is_indexed: bool
- property id_error_count: int
- property size_error_count: int
- property closed: bool
Check if source is closed. Thread-safe.
ouster.sdk.bag.bag_scan_source
- class BagScanSource(file_path, *, extrinsics_file=None, raw_headers=False, raw_fields=False, soft_id_check=False, meta=None, field_names=None, extrinsics=[], **kwargs)[source]
Bases:
ScanSource
Implements ScanSource protocol for pcap files with multiple sensors.
- Parameters:
file_path (
Union
[str
,List
[str
]]) – OSF filename as scans sourceraw_headers (
bool
) – if True, include raw headers in decoded LidarScansraw_fields (
bool
) – if True, include raw fields in decoded LidarScanssoft_id_check (
bool
) – if True, don’t skip packets on init_id/serial_num mismatchmeta (
Optional
[List
[str
]]) – optional list of metadata files to load, if not provided metadata is loaded from the bag insteadfield_names (
Optional
[List
[str
]]) – list of fields to decode into a LidarScan, if not provided decodes all default fields
- property is_live: bool
Check if the scan source is live.
A live scan source indicates that it is actively receiving data from a sensor.
- Returns:
True if the scan source is live, False otherwise.
- Return type:
bool
- property sensor_info: List[SensorInfo]
Retrieve sensor information for all sensors in the scan source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
- property id_error_count: int
- property size_error_count: int