LiDARとカメラ
1 分
lidarsandcameras は、1〜12枚のカメラ画像と1〜20個の点群を含む単一フレームで構成されます。 lidarsandcameras オブジェクトの各フィールドの詳細については、 docid\ m9gj 7ge3m0jf7hvlohj2 の関連セクションをご覧ください。 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) dryrunを使用してシーンを検証 メソッド呼び出しで dryrun パラメータをtrueに設定すると、apiを使用してシーンが検証されますが、実際には作成されません。

