Skip to content

Commit

Permalink
feat: add lidar_latency
Browse files Browse the repository at this point in the history
Signed-off-by: kminoda <[email protected]>
  • Loading branch information
kminoda committed Dec 14, 2023
1 parent 77f6d25 commit 259d450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions perception_dataset/rosbag2/converter_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class Rosbag2ConverterParams(BaseModel):
camera_latency_sec: float = (
0.0 # camera latency in seconds between the header.stamp and shutter trigger
)
lidar_to_camera_latency_sec: float = 0.03 # lidar to camera latency in seconds. For example in XX1 the latency is 0.03 sec due to the offset between top and the other LiDARs.
system_scan_period_sec: float = 0.1 # system scan period in seconds
timestamp_diff: float = 0.15
topic_list: list = [] # topic list for input_bag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def __init__(self, params: Rosbag2ConverterParams) -> None:
self._without_compress: bool = params.without_compress
self._system_scan_period_sec: float = params.system_scan_period_sec
self._camera_latency: float = params.camera_latency_sec
self._lidar_latency: float = params.lidar_latency_sec
self._start_timestamp: float = params.start_timestamp_sec
self._data_type: DataType = params.data_type
self._ignore_no_ego_transform_at_rosbag_beginning: bool = (
Expand Down Expand Up @@ -604,7 +605,7 @@ def _convert_image(
synced_frame_info_list = misc_utils.get_lidar_camera_synced_frame_info(
image_timestamp_list=image_timestamp_list,
lidar_timestamp_list=lidar_timestamp_list,
lidar_to_camera_latency_sec=self._camera_latency,
lidar_to_camera_latency_sec=self._lidar_latency + self._camera_latency,
system_scan_period=self._system_scan_period_sec,
accept_frame_drop=self._accept_frame_drop,
num_load_frames=self._num_load_frames,
Expand Down

0 comments on commit 259d450

Please sign in to comment.