---
title: LiDARキャリブレーション
slug: api-guide/ja/lidar
docTags: 
createdAt: 2024-12-17T10:14:11.222Z
---

LiDARキャリブレーションは`LidarCalibration`オブジェクトとして表現され、3つの座標で表される位置と[クォータニオン](https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)形式の回転で構成されます。オプションで、スイープ開始角度とスイープ終了角度を持つオブジェクトを指定することで、センサーの視野を指定できます。視野には、視野が及ぶ深度（距離）をオプションで含めることもできます。

| キー                     | 値                          | パラメータ                                               |
| ---------------------- | -------------------------- | --------------------------------------------------- |
| `rotation_quaternion`  | `RotationQuaternion`オブジェクト | `w`, `x`, `y`, `z`                                  |
| `position`             | `Position`オブジェクト           | `x`, `y`, `z`                                       |
| `field_of_view`（オプション） | `LidarFieldOfView`オブジェクト   | `start_angle_deg`、`stop_angle_deg`、およびオプションで`depth` |

基本的な`LidarCalibration`オブジェクトの作成については、以下のコード例を参照してください。

```python
from kognic.io.model.calibration.common import Position, RotationQuaternion
from kognic.io.model.calibration.lidar.lidar_calibration import LidarCalibration, LidarFieldOfView


def unity_lidar_calibration():
    lidar_position = Position(x=0.0, y=0.0, z=0.0)
    lidar_rotation = RotationQuaternion(w=1.0, x=0.0, y=0.0, z=0.0)
    lidar_fov = LidarFieldOfView(start_angle_deg=315, stop_angle_deg=45, depth=200)
    return LidarCalibration(position=lidar_position, rotation_quaternion=lidar_rotation, field_of_view=lidar_fov)
```
