From 6648c43b0f5c3abc18cd4224c707363df3b39b50 Mon Sep 17 00:00:00 2001 From: ismetatabay Date: Fri, 6 Oct 2023 19:12:54 +0300 Subject: [PATCH] refactor calibration page structure Signed-off-by: ismetatabay --- .../calibration-tools/index.md | 10 +- .../extrinsic-manual-calibration/index.md | 117 +++++----- .../ground-lidar-calibration/index.md | 87 ++++---- .../lidar-camera-calibration/index.md | 201 ++++-------------- .../lidar-lidar-calibration/index.md | 181 ++++------------ 5 files changed, 175 insertions(+), 421 deletions(-) diff --git a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/calibration-tools/index.md b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/calibration-tools/index.md index 6ebd716f201..400f847f670 100644 --- a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/calibration-tools/index.md +++ b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/calibration-tools/index.md @@ -75,8 +75,8 @@ we will modify `extrinsic_calibration_package` for our sensor kit. For tutorial_vehicle, completed launch files when created following tutorial sections can be found [here](https://github.com/leo-drive/calibration_tools_tutorial_vehicle/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/tutorial_vehicle_sensor_kit). -- [Manual Calibration](./manual-calibration.md) -- [Lidar-Lidar Calibration](./lidar-lidar-calibration.md) - - [Ground Plane-Lidar Calibration](./ground-lidar-calibration.md) -- [Intrinsic Camera Calibration](./intrinsic-camera-calibration.md) -- [Lidar-Camera Calibration](./lidar-camera-calibration.md) +- [Manual Calibration](../extrinsic-manual-calibration) +- [Lidar-Lidar Calibration](../lidar-lidar-calibration) + - [Ground Plane-Lidar Calibration](../ground-lidar-calibration) +- [Intrinsic Camera Calibration](../intrinsic-camera-calibration) +- [Lidar-Camera Calibration](../lidar-camera-calibration) diff --git a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/extrinsic-manual-calibration/index.md b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/extrinsic-manual-calibration/index.md index d2ec8d904a4..e45b07ffc4a 100644 --- a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/extrinsic-manual-calibration/index.md +++ b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/extrinsic-manual-calibration/index.md @@ -32,58 +32,44 @@ The following shows an example of a bag file used for calibration: ## Extrinsic Manual-Based Calibration -First of all, we will start with creating and modifying `extrinsic_calibration_manager` launch files: +### Creating launch files + +First of all, we will start with creating launch file for `extrinsic_calibration_manager` package: ```bash cd /src/autoware/calibration_tools/sensor cd extrinsic_calibration_manager/launch mkdir # i.e. for our guide, it will ve mkdir tutorial_vehicle_sensor_kit cd # i.e. for our guide, it will ve cd tutorial_vehicle_sensor_kit -touch manual.launch.xml manual_sensor_kit.launch.xml +touch manual.launch.xml manual_sensor_kit.launch.xml manual_sensors.launch.xml ``` -We will be modifying these `manual.launch.xml` and `manual_sensor_kit.launch.xml` by using TIER IV's sample sensor kit [aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1) +We will be modifying these `manual.launch.xml`, `manual_sensors.launch.xml` and `manual_sensor_kit.launch.xml` by using TIER IV's sample sensor kit aip_x1. +So, +you should copy the contents of these three files from [aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1) to your created files. + +### Modifying launch files according to your sensor kit So, we can start modifying `manual.launch.xml`, please open this file on a text editor which will you prefer (code, gedit etc.). Example for out tutorial vehicle should be like these steps: -Let's start with adding vehicle_id and sensor model names. -(Optionally, values are not important. These parameters will be overridden by launch arguments) +(Optionally) Let's start with adding vehicle_id and sensor model names. +(Values are not important. These parameters will be overridden by launch arguments) ```diff + + + + + +- + + +- + ``` -??? note "i.e. vehicle_id and sensor_model definition on tutorial_vehicle (manual.launch.xml)" - - ```xml - - - - - - ``` - -After that, we will launch our sensor_kit for manual sensor calibration, -so we must add these lines on manual.launch.xml -(This is the same for tutorial_vehicle, it uses vehicle_id and sensor_name as parameters): - -```diff -+ -+ -+ -+ -+ -+ -+ -+ -``` - The final version of the file (manual.launch.xml) for tutorial_vehicle should be like this: ??? note "Sample manual.launch.xml file for tutorial vehicle" @@ -102,59 +88,49 @@ The final version of the file (manual.launch.xml) for tutorial_vehicle should be + + + + + + + ``` After the completing of manual.launch.xml file, -we will be ready to implement manual_sensor_kit.launch.xml for the own sensor model: +we will be ready to implement manual_sensor_kit.launch.xml for the own sensor model's [sensor_kit_calibration.yaml](https://github.com/autowarefoundation/sample_sensor_kit_launch/blob/main/sample_sensor_kit_description/config/sensor_kit_calibration.yaml): Optionally, you can modify sensor_model and vehicle_id over this xml snippet as well: ```diff +... + + + + + +- + + +- + -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ +... ``` -??? note "i.e. vehicle_id and sensor_model definition on tutorial_vehicle (manual_sensor_kit.launch.xml)" - - ```xml - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - ``` - Then, we will add all our sensor frames on extrinsic_calibration_manager as child frames. ```diff -+ + +- +- +- +- + + + @@ -188,6 +164,11 @@ Lastly, we will launch a manual calibrator each frame for our sensors, please update namespace (ns) and child_frame argument on calibrator.launch.xml launch file argument: ```diff +- +- +- +- +- + + + @@ -203,7 +184,7 @@ please update namespace (ns) and child_frame argument on calibrator.launch.xml l + ``` -??? note "i.e., calibrator.launch.xml for each tutorial_vehicle's sensor" +??? note "i.e., calibrator.launch.xml for each tutorial_vehicle's sensor kit" ```xml + @@ -293,6 +274,12 @@ The final version of the manual_sensor_kit.launch.xml for tutorial_vehicle shoul ``` +You can update `manual_sensors.launch.xml` file according to your modified [sensors_calibration.yaml](https://github.com/autowarefoundation/sample_sensor_kit_launch/blob/main/sample_sensor_kit_description/config/sensors_calibration.yaml) file. +Since we will not be calibrating the sensor directly according to base_link in tutorial_vehicle, +we will not change this file. + +### Calibrating sensors with extrinsic manual calibrator + After the completion of manual.launch.xml and manual_sensor_kit.launch xml file for extrinsic_calibration_manager package, we need to build package: diff --git a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/ground-lidar-calibration/index.md b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/ground-lidar-calibration/index.md index 15030e36579..3391dc595df 100644 --- a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/ground-lidar-calibration/index.md +++ b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/ground-lidar-calibration/index.md @@ -10,7 +10,7 @@ in a way that aligns the points corresponding to the ground within the point cloud with the XY plane of the base_link. This means that only the z, roll, and pitch values of the tf undergo calibration, while the remaining x, y, and yaw values must be calibrated using other methods, -such as [manual adjustment](./manual-calibration.md) or [mapping-based lidar-lidar calibration](./lidar-lidar-calibration.md). +such as [manual adjustment](../extrinsic-manual-calibration) or [mapping-based lidar-lidar calibration](../lidar-camera-calibration). You need to apply this calibration method to each lidar separately, so our bag should contain all lidars to be calibrated. @@ -32,6 +32,8 @@ so our bag should contain all lidars to be calibrated. ## Ground-lidar calibration +### Creating launch files + We will start with creating launch file four our own vehicle like the previous sections process: ```bash @@ -41,44 +43,28 @@ cd # i.e. for our guide, it will ve cd tutorial_vehic touch ground_plane.launch.xml ground_plane_sensor_kit.launch.xml ``` -The created `ground_plane.launch.xml` and `ground_plane_sensor_kit.launch.xml` are version of sample sensor kit -[aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1) -provided from TIER IV. +We will be modifying these `ground_plane.launch.xml` and `ground_plane_sensor_kit.launch.xml` by using TIER IV's sample sensor kit aip_x1. +So, +you should copy the contents of these two files from [aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1) to your created files. + +### Modifying launch files according to your sensor kit -Then we will continue with adding vehicle_id and sensor model names to the `ground_plane.launch.xml`. -(Optionally, values are not important. These parameters will be overridden by launch arguments) +(Optionally) Let's start with adding vehicle_id and sensor model names. +(Values are not important. These parameters will be overridden by launch arguments) ```diff + + + + + +- + + +- + ``` -??? note "i.e. vehicle_id and sensor_model definition on tutorial_vehicle (ground_plane.launch.xml)" - - ```xml - + - + - + - + - + - ``` - -After that, we will launch our sensor_kit for ground - lidar calibration, -so we must add these lines on ground_plane.launch.xml: - -```diff -+ -+ -+ -+ -+ -+ -+ -``` - The final version of the file (ground_plane.launch.xml) for tutorial_vehicle should be like this: ??? note "Sample ground_plane.launch.xml file for tutorial vehicle" @@ -109,29 +95,27 @@ which included at the end of the page) ```diff + + +- + +- + -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ + + + ``` Then, we will add all our sensor frames on extrinsic_calibration_manager as child frames. ```diff -+ + +- +- +- +- + + + @@ -164,6 +148,15 @@ After that we will add our lidar sensor configurations on ground-based calibrato to do that we will add these lines our `ground_plane_sensor_kit.launch.xml` file. ```diff +- +- +- +- +- +- +- +- +- + + + @@ -211,7 +204,7 @@ to do that we will add these lines our `ground_plane_sensor_kit.launch.xml` file ``` -The mapping_based_sensor_kit.launch.xml launch file for tutorial_vehicle should be this: +The ground_plane_sensor_kit.launch.xml launch file for tutorial_vehicle should be this: ??? note "Sample ground_plane_sensor_kit.launch.xml for tutorial_vehicle" @@ -269,6 +262,8 @@ The mapping_based_sensor_kit.launch.xml launch file for tutorial_vehicle should ``` +### Ground plane-lidar calibration process with extrinsic ground-plane calibrator + After completing mapping_based.launch.xml and mapping_based_sensor_kit.launch.xml launch files for own sensor kit; now we are ready to calibrate our lidars. First of all, we need to build extrinsic_calibration_manager package: diff --git a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-camera-calibration/index.md b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-camera-calibration/index.md index 32b287b6cbd..bdc05c7103e 100644 --- a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-camera-calibration/index.md +++ b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-camera-calibration/index.md @@ -15,7 +15,7 @@ another [Lidar-Camera calibration method](https://github.com/leo-drive/Calibrati !!! warning - Please get initial calibration results from [Manual Calibration](./manual-calibration.md) section, it is important for getting accurate results from this tool. + Please get initial calibration results from [Manual Calibration](../extrinsic-manual-calibration) section, it is important for getting accurate results from this tool. We will use initial calibration parameters that we calculated on previous step on this tutorial for lidar-camera extrinsic calibration. Your bag file must include calibration lidar topic and camera topics. @@ -42,6 +42,8 @@ we will update interactive calibrator launch argument `use_compressed` according ## Lidar-Camera calibration +### Creating launch files + We start with creating launch file four our vehicle like "Extrinsic Manual Calibration" process: @@ -52,44 +54,34 @@ cd # i.e. for our guide, it will ve cd tutorial_vehic touch interactive.launch.xml interactive_sensor_kit.launch.xml ``` -The created `interactive.launch.xml` and `interactive_sensor_kit.launch.xml` are version of sample sensor kit -[aip_xx1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_xx1) provided from TIER IV. +We will be modifying these `interactive.launch.xml` and `interactive_sensor_kit.launch.xml` by using TIER IV's sample sensor kit aip_xx1. +So, +you should copy the contents of these two files from [aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_xx1) to your created files. -Then we will continue with adding vehicle_id and sensor model names to the `mapping_based.launch.xml`. -(Optionally, values are not important. These parameters will be overridden by launch arguments) Then, -we will add camera_name for calibrating camera -(can be one of the camera0, camera1, camera_front etc. as launch argument) -and `use_concatenated_pointcloud` argument. -If you want to use concatenated pointcloud as an input cloud -(the calibration process will initiate the logging simulator, -resulting in the construction of the lidar pipeline and the appearance of the concatenated point cloud), -you must set `use_concatenated_pointcloud` value as `true`. +Then we will continue with adding vehicle_id and sensor model names to the `interactive.launch.xml`. +(Optionally, values are not important. These parameters will be overridden by launch arguments) ```diff + + + + + +- + ++ +- + -+ -+ -+ ``` -After that, we will launch our sensor_kit for lidar-camera calibration, -so we must add these lines on interactive.launch.xml (Also, you can change rviz path (args) after the saving rviz config): +If you want to use concatenated pointcloud as an input cloud +(the calibration process will initiate the logging simulator, +resulting in the construction of the lidar pipeline and the appearance of the concatenated point cloud), +you must set `use_concatenated_pointcloud` value as `true`. ```diff -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ +- ++ ``` The final version of the file (interactive.launch.xml) for tutorial_vehicle should be like this: @@ -127,145 +119,32 @@ Optionally, (don't forget, these parameters will be overridden by launch argumen you can modify sensor_kit and vehicle_id as `interactive.launch.xml`over this xml snippet. We will set parent_frame for calibration as `sensor_kit_base_link``: -```diff -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -``` - -Next, we will define `camera_name` argument. -This parameter describes which camera will be calibrated. -For example, -your bag file can contain six camera topics -(camera0, camera1, etc.) but you can calibrate one camera at a time. -After that, we will define image_topic rule. -For example at this snippet, it controlled over `camera_name` variable. -Also, if you want to use compressed image for calibration, +(Optionally) If you want to use compressed image for calibration, you need update `image_topic` and `use_compressed` value with compressed topic information. ```diff -+ -+ -+ -+ -+ -+ -+ -``` - -Then you can customize pointcloud topic for each camera, -for example, -we can add this evaluation mechanism to determining pointcloud_topic name -(in this case, all camera parent lidars are "top" lidar): - -```diff -+ -+ -+ -+ -+ -+ -+ ... -``` - -??? note "Since there is one camera on tutorial_vehicle which is named as camera0, so pointcloud topic should be like this" - - ```xml - - + - - ``` - -We will add a calibration checking mechanism -to be sure that the right camera_name parameter is set. -For example, if camera_name is set launch argument as `camera10`, -the calibration process doesn't occur. - -```diff -+ -+ -+ -+ -+ -+ -+ -+ ... -``` - -??? note "Since there is one camera on tutorial_vehicle which is named as camera0, calibrate_sensor argument structure should be like this" - - ```xml - - + - + - - ``` - -After that, we will define camera_links for each camera, -This structure checks -which camera will be calibrated and sets `camera_frame` according to the `camera_name`: - -```diff -+ -+ -+ -+ -+ -+ -+ + ... +- ++ + ... + +- ++ ``` -??? note "Since there is one camera on tutorial_vehicle which is named as camera0, camera_frame argument should be defined like this" - - ```xml - - + - + - - ``` - -Now, -we will launch the extrinsic_calibration_manager, -extrinsic_calibration_client and interactive calibrator according to the arguments -we defined before. +Then you can customize pointcloud topic for each camera. +For example, if you want to calibrate camera_1 with left lidar, +then you should change launch file like this: ```diff -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - + +- ++ + + + + + ... ``` The interactive_sensor_kit.launch.xml launch file for tutorial_vehicle should be this: @@ -356,6 +235,8 @@ The interactive_sensor_kit.launch.xml launch file for tutorial_vehicle should be ``` +### Lidar-camera calibration process with interactive camera-lidar calibrator + After completing interactive.launch.xml and interactive_sensor_kit.launch.xml launch files for own sensor kit; now we are ready to calibrate our lidars. First of all, we need to build extrinsic_calibration_manager package: diff --git a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-lidar-calibration/index.md b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-lidar-calibration/index.md index f28ccb3e4eb..5bf2554e467 100644 --- a/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-lidar-calibration/index.md +++ b/docs/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-description/calibrating-sensors/lidar-lidar-calibration/index.md @@ -28,6 +28,8 @@ CalibrationTools. ## Mapping-based lidar-lidar calibration +### Creating launch files + We start with creating launch file four our vehicle like "Extrinsic Manual Calibration" process: @@ -38,45 +40,26 @@ cd # i.e. for our guide, it will ve cd tutorial_vehic touch mapping_based.launch.xml mapping_based_sensor_kit.launch.xml ``` -The created `mapping_based.launch.xml` and `mapping_based_sensor_kit.launch.xml` are version of sample sensor kit -[aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1) -provided from TIER IV. +We will be modifying these `mapping_based.launch.xml` and `mapping_based_sensor_kit.launch.xml` by using TIER IV's sample sensor kit aip_xx1. +So, +you should copy the contents of these two files from [aip_x1](https://github.com/tier4/CalibrationTools/tree/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_xx1) to your created files. Then we will continue with adding vehicle_id and sensor model names to the `mapping_based.launch.xml`. (Optionally, values are not important. These parameters will be overridden by launch arguments) ```diff + + + + + +- + + +- + ``` -??? note "i.e. vehicle_id and sensor_model definition on tutorial_vehicle (mapping_based.launch.xml)" - - ```xml - + - + - + - + - + - ``` - -After that, we will launch our sensor_kit for mapping-based lidar-lidar calibration, -so we must add these lines on mapping_based.launch.xml: - -```diff -+ -+ -+ -+ -+ -+ -+ -+ -``` - The final version of the file (mapping_based.launch.xml) for tutorial_vehicle should be like this: ??? note "Sample mapping_based.launch.xml file for tutorial vehicle" @@ -107,33 +90,6 @@ you can modify sensor_kit and vehicle_id as `mapping_based.launch.xml`over this (You can change rviz_profile path after the saving rviz config as video which included at the end of the page) -```diff -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -``` - -We will not fill anything on camera parameters for calibrator -because we will pair lidar-lidar for the calibration process: - -```diff -+ -+ -+ -+ -+ -``` - We will add sensor kit frames for each lidar (except mapping lidar), we have one lidar for pairing to the main lidar sensor for tutorial vehicle, so it should be like: @@ -164,6 +120,21 @@ We will add lidar_calibration_service_names, calibration_lidar_base_frames and calibration_lidar_frames for calibrator. ```diff +- +- +- + ``` -??? note "i.e., If you have three lidars (one main for mapping, two others) for [aip_x1](https://github.com/tier4/CalibrationTools/blob/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1/mapping_based_sensor_kit.launch.xml)" - - ```xml - - - - - ``` - ??? note "i.e., At the tutorial_vehicle it should be like this snippet" ```xml @@ -213,46 +166,23 @@ After that, we will add the sensor topics and sensor frames in order to do that, we will continue filling the `mapping_based_sensor_kit.launch.xml` with: ```diff -+ -+ -+ + +- +- + + -+ -+ + + +- + ``` -??? note "i.e., If you have three lidars (one main for mapping, two others) for [aip_x1](https://github.com/tier4/CalibrationTools/blob/tier4/universe/sensor/extrinsic_calibration_manager/launch/aip_x1/mapping_based_sensor_kit.launch.xml)" - - ```xml - - - - - - - - - - ``` - ??? note "At the tutorial_vehicle it should be like this snippet." ```xml @@ -267,47 +197,6 @@ we will continue filling the `mapping_based_sensor_kit.launch.xml` with: /sensing/lidar/right/pointcloud_raw]"/> ``` -Then we will add the extrinsic_mapping_based_calibrator launch file with these arguments to mapping_based_sensor_kit.launch.xml: - -??? note "extrinsic_mapping_based_calibrator launch example" - - ```xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ``` - The mapping_based_sensor_kit.launch.xml launch file for tutorial_vehicle should be this: ??? note "i.e. mapping_based_sensor_kit.launch.xml for tutorial_vehicle" @@ -403,6 +292,8 @@ The mapping_based_sensor_kit.launch.xml launch file for tutorial_vehicle should ``` +### Lidar-Lidar calibration process with interactive mapping-based calibrator + After completing mapping_based.launch.xml and mapping_based_sensor_kit.launch.xml launch files for own sensor kit; now we are ready to calibrate our lidars. First of all, we need to build extrinsic_calibration_manager package: