UPLOAD DATA
...
Guides
More examples
Lidars and cameras
1min
a lidarsandcameras consists of a single frame which contains 1 12 cameras images as well as 1 20 point clouds for more documentation on what each field corresponds to in the lidarsandcameras object please check the section related to overview docid\ yunpnpwuhzlgg9wb9qnk8 from future import absolute import from datetime import datetime from typing import optional from uuid import uuid4 import kognic io model scene lidars and cameras as lcm 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, image, pointcloud def run(client kognicioclient, dryrun bool = true, kwargs) > optional\[createsceneresponse] print("creating lidars and cameras 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 = lcm lidarsandcameras( external id=f"lidars and cameras example {uuid4()}", frame=lcm frame( 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, ), ], ), calibration id=created calibration id, metadata=metadata, ) \# create scene return client lidars and cameras 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