Skip to content

Commit c3d467b

Browse files
committed
naming of sensor ids
1 parent 6e45892 commit c3d467b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lamaria/structs/trajectory.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,17 @@ def _add_images_to_reconstruction(
244244

245245
image_id = 1
246246
# imu is the rig in this reconstruction
247-
rig = reconstruction.rig(rig_id=1)
247+
imu_id = 1
248+
left_camera_id = 2
249+
right_camera_id = 3
250+
251+
rig = reconstruction.rig(rig_id=imu_id)
248252

249253
if self.corresponding_sensor == "imu":
250254
transform = pycolmap.Rigid3d()
251255
else:
252256
# left camera poses are provided
253257
# sensor_from_rig == cam0_from_imu
254-
left_camera_id = 2
255258
left_camera = reconstruction.cameras[left_camera_id]
256259
transform = rig.sensor_from_rig(sensor_id=left_camera.sensor_id)
257260

@@ -278,8 +281,8 @@ def _add_images_to_reconstruction(
278281
images_to_add = []
279282

280283
for label, camera_id in [
281-
(LEFT_CAMERA_STREAM_LABEL, 2),
282-
(RIGHT_CAMERA_STREAM_LABEL, 3),
284+
(LEFT_CAMERA_STREAM_LABEL, left_camera_id),
285+
(RIGHT_CAMERA_STREAM_LABEL, right_camera_id),
283286
]:
284287
source_timestamps = timestamp_to_images[label]["sorted_keys"]
285288
# offsets upto 1 ms (1e6 ns)

0 commit comments

Comments
 (0)