sift_py.data_import.rosbags
¶
Service to upload ROS2 bag files.
ROS organizes data exchange through topics, messages, and fields: * topics: Named messages that facilitate communication between ROS nodes. * messages: Data structures published and subscribed to on topics. Each message type defines a specific schema. * fields: Individual data elements within a message, such as integers, floats, strings, or nested structures.
This class extracts messages from a ROS bag, flattens their fields, and prepares them for uploading to Sift.
| CLASS | DESCRIPTION |
|---|---|
RosbagsUploadService |
Service to upload ROS2 bag files. |
RosbagsUploadService
¶
RosbagsUploadService(rest_conf: SiftRestConfig)
Service to upload ROS2 bag files.
| METHOD | DESCRIPTION |
|---|---|
upload |
Uploads the ROS2 bag file pointed to by |
upload
¶
upload(
path: Union[str, Path],
msg_dirs: List[Union[str, Path]],
store: Stores,
asset_name: str,
ignore_errors: bool = False,
run_name: Optional[str] = None,
run_id: Optional[str] = None,
handlers: Optional[Dict[str, Callable]] = None,
show_progress: bool = True,
) -> DataImportService
Uploads the ROS2 bag file pointed to by path to the specified asset.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
Path to the ROS2 bag file. |
msg_dirs
|
List of directories containing message definitions.
Each entry should be a path the root directory of the msg definitions (e.g, |
store
|
The Store type to use for the message definitions.
TYPE:
|
asset_name
|
Name of the asset to upload the data to.
TYPE:
|
ignore_errors
|
If True, will skip messages without definitions.
TYPE:
|
run_name
|
Name of the run to create for this data. |
run_id
|
ID of the run to add this data to. |
handlers
|
Dictionary of messages to callbacks for custom processing or sequence data (e.g, images or videos). Keys should be the ROS topic, value is a callable with the following signature: def callback(topic: str, timestamp: int, msg: object) ... |
show_progress
|
Whether to show the status bar or not.
TYPE:
|