pointcloudset.io.dataset.ros module

” Reading pointcloud 2.

ROS bagfiles.

Parts of the code are from Willow Garage, Inc.

pointcloudset.io.dataset.ros.dataset_from_ros(bagfile: Path, topic: str, start_frame_number: int = 0, end_frame_number: Optional[int] = None, keep_zeros: bool = False, ext: Literal['BAG', 'ROS2'] = 'BAG') Optional[dict]

Reads a Dataset from a ROS1 bag of ROS2 mcap or db3 file.

Parameters
  • bagfile (Path) – Path to bag file.

  • topic (str) –

    ROS topic that should be read

  • start_frame_number (int, optional) – Start pointcloud of pointcloud sequence to read. Defaults to 0.

  • end_frame_number (int, optional) – End pointcloud of pointcloud sequence to read. Defaults to None.

  • keep_zeros (bool, optional) – If True keep zeros in frames, if False do not keep zeros in frames. Defaults to False.

Returns

Dict to generate Dataset.

Return type

Union[dict, None]