Skip to content

Commit

Permalink
update generic_calibration with new video
Browse files Browse the repository at this point in the history
Signed-off-by: ismetatabay <[email protected]>
  • Loading branch information
ismetatabay committed Sep 8, 2023
1 parent dec6115 commit 48fb69d
Showing 1 changed file with 100 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,23 @@ Let's start with adding vehicle_id and sensor model names. (Optionally, values a
```diff
+ <?xml version="1.0" encoding="UTF-8"?>
+ <launch>
+ <arg name="vehicle_id" default="tutorial_vehicle"/>
+ <arg name="vehicle_id" default="<YOUR_VEHICLE_ID>"/>
+
+ <let name="sensor_model" value="tutorial_vehicle_sensor_kit"/>
+ <let name="sensor_model" value="<YOUR_SENSOR_KIT_NAME>"/>
```

??? note "i.e. tutorial_vehicle"
```xml
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="vehicle_id" default="tutorial_vehicle"/>

<let name="sensor_model" value="tutorial_vehicle_sensor_kit"/>
```

After that, we will launch our sensor_kit for manual sensor calibration,
so we must add these lines on manual.launch.xml:
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
+ <group>
Expand Down Expand Up @@ -98,18 +108,20 @@ 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:

Optionally, you can modify sensor_model and vehicle_id over this xml snippet:
Optionally, you can modify sensor_model and vehicle_id over this xml snippet as well:

```diff
+ <?xml version="1.0" encoding="UTF-8"?>
+ <launch>
+ <arg name="vehicle_id" default="tutorial_vehicle"/> <!-- You can update with your own vehicle_id -->
+ <arg name="vehicle_id" default="<YOUR_VEHICLE_ID>"/>
+
+ <let name="sensor_model" value="tutorial_vehicle_sensor_kit"/> <!-- You can update with your own sensor_kit -->
+ <let name="sensor_model" value="<YOUR_SENSOR_KIT_NAME>"/>
+ <let name="parent_frame" value="sensor_kit_base_link"/>
+
+ <!-- extrinsic_calibration_client -->
+ <arg name="src_yaml" default="$(find-pkg-share individual_params)/config/$(var vehicle_id)/$(var sensor_model)/sensor_kit_calibration.yaml"/>
+
+ <!-- you can shange the destination for saving calibration results -->
+ <arg name="dst_yaml" default="$(env HOME)/sensor_kit_calibration.yaml"/>
+
+ <node pkg="extrinsic_calibration_client" exec="extrinsic_calibration_client" name="extrinsic_calibration_client" output="screen">
Expand All @@ -118,53 +130,108 @@ Optionally, you can modify sensor_model and vehicle_id over this xml snippet:
+ </node>
```

Then, we will add all our sensor frames on extrinsic_calibration_manages as child frames.
For tutorial_vehicle there are four sensors (two lidar, one camera, one gnss/ins), so it will be like this:
??? note "i.e. vehicle_id and sensor_model definition on tutorial_vehicle"

```xml
+ <?xml version="1.0" encoding="UTF-8"?>
+ <launch>
+ <arg name="vehicle_id" default="tutorial_vehicle"/>
+
+ <let name="sensor_model" value="tutorial_vehicle_sensor_kit"/>
+ <let name="parent_frame" value="sensor_kit_base_link"/>
+
+ <!-- extrinsic_calibration_client -->
+ <arg name="src_yaml" default="$(find-pkg-share individual_params)/config/$(var vehicle_id)/$(var sensor_model)/sensor_kit_calibration.yaml"/>
+ <arg name="dst_yaml" default="$(env HOME)/sensor_kit_calibration.yaml"/>
+
+ <node pkg="extrinsic_calibration_client" exec="extrinsic_calibration_client" name="extrinsic_calibration_client" output="screen">
+ <param name="src_path" value="$(var src_yaml)"/>
+ <param name="dst_path" value="$(var dst_yaml)"/>
+ </node>
```

Then, we will add all our sensor frames on extrinsic_calibration_manager as child frames.

```diff
+ <!-- extrinsic_calibration_manager -->
+ <node pkg="extrinsic_calibration_manager" exec="extrinsic_calibration_manager" name="extrinsic_calibration_manager" output="screen">
+ <param name="parent_frame" value="$(var parent_frame)"/>
+ <!-- add your sensor frames here -->
+ <param name="child_frames" value="
+ [rs_helios_top_base_link,
+ rs_bpearl_front_base_link,
+ camera0/camera_link,
+ gnss_link]"/>
+ [<YOUE_SENSOR_BASE_LINK>,
+ YOUE_SENSOR_BASE_LINK,
+ YOUE_SENSOR_BASE_LINK,
+ YOUE_SENSOR_BASE_LINK
+ ...]"/>
+ </node>
```

For tutorial_vehicle there are four sensors (two lidar, one camera, one gnss/ins), so it will be like this:

??? note "i.e extrinsic_calibration_manager child_frames for tutorial_vehicle"

```xml
+ <!-- extrinsic_calibration_manager -->
+ <node pkg="extrinsic_calibration_manager" exec="extrinsic_calibration_manager" name="extrinsic_calibration_manager" output="screen">
+ <param name="parent_frame" value="$(var parent_frame)"/>
+ <!-- add your sensor frames here -->
+ <param name="child_frames" value="
+ [rs_helios_top_base_link,
+ rs_bpearl_front_base_link,
+ camera0/camera_link,
+ gnss_link]"/>
+ </node>
```

Lastly, we will launch a manual calibrator each frame for our sensors,
please update namespace (ns) and child_frame argument on `tutorial_vehicle` example:
please update namespace (ns) and child_frame argument on calibrator.launch.xml launch file argument:

```diff
+ <!-- extrinsic_manual_calibrator -->
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/rs_helios_top_base_link"/>
+ <arg name="ns" value="$(var parent_frame)/<YOUR_SENSOR_BASE_LINK>"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="rs_helios_top_base_link"/>
+ <arg name="child_frame" value="<YOUR_SENSOR_BASE_LINK>""/>
+ </include>
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/rs_bpearl_front_base_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="rs_bpearl_front_base_link"/>
+ </include>
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/camera0/camera_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="camera0/camera_link"/>
+ </include>
+ ...
+ ...
+ ...
+ ...
+ ...
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/gnss_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="gnss_link"/>
+ </include>
+ </launch>
```

??? note "i.e. calibrator.launch.xml for each tutorial_vehicle's sensors"

```xml
+ <!-- extrinsic_manual_calibrator -->
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/rs_helios_top_base_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="rs_helios_top_base_link"/>
+ </include>
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/rs_bpearl_front_base_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="rs_bpearl_front_base_link"/>
+ </include>
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/camera0/camera_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="camera0/camera_link"/>
+ </include>
+
+ <include file="$(find-pkg-share extrinsic_manual_calibrator)/launch/calibrator.launch.xml">
+ <arg name="ns" value="$(var parent_frame)/gnss_link"/>
+ <arg name="parent_frame" value="$(var parent_frame)"/>
+ <arg name="child_frame" value="gnss_link"/>
+ </include>
+ </launch>
```

The final version of the manual_sensor_kit.launch.xml for tutorial_vehicle should be like this:

??? note "Sample manual_sensor_kit.launch.xml for tutorial_vehicle"
Expand Down Expand Up @@ -265,4 +332,4 @@ we will update calibrations by hand according to the rviz2 results.
approximately (it not must be perfect) calibration pairs between sensors.

Here is the video for demonstrating a manual calibration process on tutorial vehicle:
![type:video](https://youtube.com/embed/ZJZ48vrVaNg)
![type:video](https://youtube.com/embed/axHILP0PiaQ)

0 comments on commit 48fb69d

Please sign in to comment.