UPLOAD DATA
...
Guides
More examples
Aggregated Lidars and Cameras Sequence
2min
an aggregatedlidarsandcamerasseq scene consists of a sequence of camera images and lidar point clouds, where each frame consists on 1 12 camera images as well as 1 20 point clouds (in the case where you have pre aggregated your point clouds, the first frame consists of 1 20 point clouds and all other frames 0 point clouds) what differentiates aggregatedlidarsandcamerasseq from lidarsandcamerasseq is that point clouds are aggregated over time during annotation which results in one big point cloud in the coordinate system of the first frame therefore, ego motion data is mandatory for this type of scene for more documentation on what each field corresponds to in the aggregatedlidarsandcamerasseq object please check the section related to overview docid\ yunpnpwuhzlgg9wb9qnk8 refer to coordinate systems docid\ xqf6uaqsofwvavmtepdec for more information about what coordinate systems to use from future import absolute import from datetime import datetime from typing import optional from uuid import uuid4 import kognic io model scene aggregated lidars and cameras seq as alcsm from examples calibration calibration import create sensor calibration from kognic io client import kognicioclient from kognic io logger import setup logging from kognic io model import createsceneresponse, egovehiclepose, image, pointcloud, position, rotationquaternion def run(client kognicioclient, dryrun bool = true, kwargs) > optional\[createsceneresponse] print("creating lidar and camera sequence scene ") lidar sensor1 = "lidar" cam sensor1 = "rfc01" cam sensor2 = "rfc02" metadata = {"location lat" 27 986065, "location long" 86 922623, "vehicle id" "abg"} \# create calibration \# (please refer to the api documentation about calibration for more details) calibration spec = create sensor calibration( f"collection {datetime now()}", \[lidar sensor1], \[cam sensor1, cam sensor2], ) created calibration = client calibration create calibration(calibration spec) scene = alcsm aggregatedlidarsandcamerassequence( external id=f"aggregated lcs full example {uuid4()}", frames=\[ alcsm frame( frame id="1", relative timestamp=0, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl01 las", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc01 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc02 jpg", sensor name=cam sensor2, ), ], metadata={"dut status" "active"}, ego vehicle pose=egovehiclepose( position=position(x=1 0, y=1 0, z=1 0), rotation=rotationquaternion(w=0 01, x=1 01, y=1 01, z=1 01), ), ), alcsm frame( frame id="2", relative timestamp=500, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl02 las", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc11 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc12 jpg", sensor name=cam sensor2, ), ], ego vehicle pose=egovehiclepose( position=position(x=2 0, y=2 0, z=2 0), rotation=rotationquaternion(w=0 01, x=2 01, y=2 01, z=2 01), ), ), alcsm frame( frame id="3", relative timestamp=1000, point clouds=\[ pointcloud( filename=" /examples/resources/point cloud rfl02 csv", sensor name=lidar sensor1, ), ], images=\[ image( filename=" /examples/resources/img rfc11 jpg", sensor name=cam sensor1, ), image( filename=" /examples/resources/img rfc12 jpg", sensor name=cam sensor2, ), ], ego vehicle pose=egovehiclepose( position=position(x=3 0, y=3 0, z=3 0), rotation=rotationquaternion(w=0 01, x=2 01, y=2 01, z=2 01), ), ), ], calibration id=created calibration id, metadata=metadata, ) \# create scene return client aggregated lidars and cameras seq create(scene, dryrun=dryrun, kwargs) if name == " main " setup logging(level="info") client = kognicioclient() \# project available via `client project get projects()` project = "\<project identifier>" run(client, project=project) use dryrun to validate scene setting dryrun parameter to true in the method call, will validate the scene using the api but not create it reuse calibration note that you can, and should, reuse the same calibration for multiple scenes if possible