-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tier4/universe' into feat/apply-flexible-lpf
- Loading branch information
Showing
35 changed files
with
6,752 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,42 @@ | ||
## PR Type | ||
|
||
<!-- Select one and remove others. If an appropriate one is not listed, please write by yourself. --> | ||
|
||
- New Feature | ||
- Improvement | ||
- Bug Fix | ||
|
||
## Related Links | ||
|
||
<!-- Please write related links to GitHub/Jira/Slack/etc. --> | ||
|
||
## Description | ||
|
||
<!-- Describe what this PR changes. --> | ||
<!-- Write a brief description of this PR. --> | ||
|
||
## Related links | ||
|
||
## Review Procedure | ||
<!-- Write the links related to this PR. --> | ||
|
||
<!-- Explain how to review this PR. --> | ||
## Tests performed | ||
|
||
## Remarks | ||
<!-- Describe how you have tested this PR. --> | ||
|
||
<!-- Write remarks as you like if you need them. --> | ||
## Notes for reviewers | ||
|
||
## Pre-Review Checklist for the PR Author | ||
<!-- Write additional information if necessary. It should be written if there are related PRs that should be merged at the same time. --> | ||
|
||
**PR Author should check the checkboxes below when creating the PR.** | ||
## Pre-review checklist for the PR author | ||
|
||
- [ ] Code follows [coding guidelines][coding-guidelines] | ||
- [ ] Assign PR to reviewer | ||
The PR author **must** check the checkboxes below when creating the PR. | ||
|
||
## Checklist for the PR Reviewer | ||
- [ ] I've confirmed the [contribution guidelines]. | ||
- [ ] The PR follows the [pull request guidelines]. | ||
|
||
**Reviewers should check the checkboxes below before approval.** | ||
## In-review checklist for the PR reviewers | ||
|
||
- [ ] Commits are properly organized and messages are according to the guideline | ||
- [ ] Code follows [coding guidelines][coding-guidelines] | ||
- [ ] (Optional) Unit tests have been written for new behavior | ||
- [ ] PR title describes the changes | ||
The PR reviewers **must** check the checkboxes below before approval. | ||
|
||
## Post-Review Checklist for the PR Author | ||
- [ ] The PR follows the [pull request guidelines]. | ||
- [ ] The PR has been properly tested. | ||
- [ ] The PR has been reviewed by the code owners. | ||
|
||
**PR Author should check the checkboxes below before merging.** | ||
## Post-review checklist for the PR author | ||
|
||
- [ ] All open points are addressed and tracked via issues or tickets | ||
- [ ] Write [release notes][release-notes] | ||
The PR author **must** check the checkboxes below before merging. | ||
|
||
## CI Checks | ||
- [ ] There are no open discussions or they are tracked via tickets. | ||
- [ ] The PR is ready for merge. | ||
|
||
- **Build and test for PR**: Required to pass before the merge. | ||
- **Check spelling**: NOT required to pass before the merge. It is up to the reviewer(s). See [here][spell-check-dict] if you want to add some words to the spell check dictionary. | ||
After all checkboxes are checked, anyone who has write access can merge the PR. | ||
|
||
[coding-guidelines]: https://tier4.atlassian.net/wiki/spaces/AIP/pages/1194394777/T4 | ||
[release-notes]: https://tier4.atlassian.net/l/c/X1p69s6B | ||
[spell-check-dict]: https://github.com/tier4/autoware-spell-check-dict#how-to-contribute | ||
[contribution guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/ | ||
[pull request guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: sync-tier4-universe-to-humble | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync-branches: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate token | ||
id: generate-token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: Run sync-branches | ||
uses: autowarefoundation/autoware-github-actions/sync-branches@v1 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
base-branch: humble | ||
sync-target-repository: git@github.com:tier4/CalibrationTools.git | ||
sync-target-branch: tier4/universe | ||
sync-branch: sync-tier4-universe-to-humble | ||
pr-title: "chore: sync tier4/universe to humble" | ||
auto-merge-method: merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...evaluator/config/deviation_evaluator.yaml → ...tor/config/deviation_evaluator.param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
parameter_estimator: | ||
/**: | ||
ros__parameters: | ||
# Parameters that you want to evaluate | ||
stddev_vx: 0.3 # [m/s] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,94 @@ | ||
# Sensor Calibration Tools | ||
|
||
## Calibration tools installation (alongside autoware) | ||
Sensor calibration can be split into two categories: intrinsic sensor calibration and extrinsic sensor calibration. In our calibration tools, we implement different methods for both categories. | ||
|
||
After cloning autoware, execute the following commands: | ||
## Extrinsic Calibration | ||
|
||
```sh | ||
mkdir src | ||
vcs import src < autoware.proj.repos | ||
vcs import src < src/autoware/calibration_tools/calibration_tools.repos | ||
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
``` | ||
Extrinsic calibration refers to the relative poses among sensors that are provided to ROS2 nodes using the TF interface. Our calibration tools assume a TF diagram like the one presented in Figure 1. | ||
|
||
## Extrinsic Calibration | ||
<figure align="center"> | ||
<img src="docs/design/sensor_calibration.svg" width="600"> | ||
<figcaption align="center">Figure 1. Extrinsic calibration diagram</figcaption> | ||
</figure> | ||
|
||
In our design, `base_link` corresponds to the projection on the ground of the vehicle's rear axis and each vehicle may possess one or more sensor kits, which is a physical location on the vehicle where sensors are mounted. For example, a normal car would possess one sensor kit mounted on its top, whereas larger vehicles (e.g., a bus) would have several sensor kits distributed along the vehicle. | ||
|
||
Although in the diagram present in Figure 1 the TFs from the base to the sensor kits, and from each kit to its sensors are provided, these are not the calibration targets. Instead, we calibrate from the `base_link` to a particular lidar, then from said lidar to the rest of the lidars, and finally from lidars to cameras. In order to comply with the diagram from Figure 1, the final output of the calibration process becomes: | ||
|
||
$T(\text{sensor⎽kit⎽base⎽link}, \text{lidar0⎽base⎽link}) = T(\text{base⎽link}, \text{sensor⎽kit⎽base⎽link})^{-1} \times T(\text{base⎽link}, \text{lidar0⎽base⎽link})$ | ||
|
||
$T(\text{sensor⎽kit⎽base⎽link}, \text{lidar1⎽base⎽link}) = T(\text{sensor⎽kit⎽base⎽link}, \text{lidar0⎽base⎽link}) \times T(\text{lidar0⎽base⎽link}, \text{lidar1⎽base⎽link})$ | ||
|
||
$T(\text{sensor⎽kit⎽base⎽link}, \text{camera0/camera⎽link}) = T(\text{sensor⎽kit⎽base⎽link}, \text{lidar0⎽base⎽link}) \times T(\text{lidar0⎽base⎽link}, \text{camera0/camera⎽link})$ | ||
|
||
where the $T(\text{base⎽link}, \text{sensor⎽kit⎽base⎽link})$ is usually provided by a CAD model or can be simply approximated since it is a convenient frame and does not affect other computations. | ||
|
||
Looking at the diagram from Figure 1, we could also directly calibrate all the sensors with respect to the `base_link`. However, we believe that sensor-sensor calibration provides more accurate and consistent results so we only use one `base_link` to sensor calibration and from then all other calibrations are performed via pairs of sensors. | ||
|
||
### Generic calibration | ||
|
||
- [Extrinsic manual calibration](docs/how_to_extrinsic_manual.md) | ||
|
||
Intended as a proof-of-concept of our calibration API and as a baseline to which to compare automatic calibration tools, this method allows us to directly modify the values of the TF tree with a rviz view to evaluate the tfs and calibration. | ||
|
||
<figure align="center"> | ||
<img src="docs/images/rviz_lidar.png" width="400"> | ||
<figcaption align="center">Figure 2. Manual calibration</figcaption> | ||
</figure> | ||
|
||
### Base-lidar calibration | ||
|
||
- [How to Extrinsic Manual Calibration](docs/how_to_extrinsic_manual.md) | ||
- [Ground-plane base-lidar calibration](docs/how_to_extrinsic_ground_plane.md) | ||
|
||
- [How to Extrinsic Automatic Calibration](docs/how_to_extrinsic_auto.md) | ||
This calibration method assumes the floor around the vehicle forms a plane and adjusts the calibration tf so that the points corresponding to the ground of the point cloud lie on the XY plane of the `base_link`. As such, only the `z`, `roll`, and `pitch` values of the tf are calibrated, with the remaining `x`, `y`, and `yaw` values needing to be calibrated via other methods such as manual calibration. | ||
|
||
- [How to Extrinsic Interactive Calibration](docs/how_to_extrinsic_interactive.md) | ||
<figure align="center"> | ||
<img src="docs/images/base-lidar/initial_calibration.png" width="250"> | ||
<img src="docs/images/base-lidar/final_calibration.png" width="250"> | ||
<figcaption align="center">Figure 3. Ground-plane base-lidar calibration (before and after calibration)</figcaption> | ||
</figure> | ||
|
||
- [How to Extrinsic Tag-based Calibration](docs/how_to_extrinsic_tag_based.md) | ||
### Lidar-lidar calibration | ||
|
||
- [How to Extrinsic Ground-plane Calibration](docs/how_to_extrinsic_ground_plane.md) | ||
- [Map-based lidar-lidar calibration](docs/how_to_extrinsic_map_based.md) | ||
|
||
To calibrate pairs of lidars, this method uses standard point cloud registration. However, due to the sparsity of traditional lidars, direct registration proves difficult. To address this issue, this method uses an additional point cloud map and a localization system to solvent this limitation during registration. | ||
|
||
<figure align="center"> | ||
<img src="docs/images/map_based_calibration_results.png" width="400"> | ||
<figcaption align="center">Figure 4. Map-based calibration</figcaption> | ||
</figure> | ||
|
||
### Camera-lidar calibration | ||
|
||
- [Extrinsic interactive camera-lidar calibration](docs/how_to_extrinsic_interactive.md) | ||
|
||
To calibrate camera-lidar pairs of sensors, a common practice is to compute corresponding pairs of points and then minimize their reprojection error. This calibration method implements a UI to help the selection of these pairs and evaluate their performance interactively. | ||
|
||
<figure align="center"> | ||
<img src="docs/images/camera-lidar/interactive_calibration_ui.png" width="400"> | ||
<figcaption align="center">Fig 5. Interactive camera-lidar calibration UI</figcaption> | ||
</figure> | ||
|
||
- [Tag-based camera-lidar calibration](docs/how_to_extrinsic_tag_based.md) | ||
|
||
This calibration method extends the interactive calibration by performing the corresponding points acquisition automatically via moving a known tag (lidartag) through the shared field of view. | ||
|
||
<figure align="center"> | ||
<img src="docs/images/camera-lidar/correct_calibration.png" width="400"> | ||
<figcaption align="center">Fig 6. Tag-based camera-lidar calibration</figcaption> | ||
</figure> | ||
|
||
## Intrinsic Calibration | ||
|
||
- [How to Camera Calibration](docs/how_to_camera.md) | ||
Intrinsic calibration is the process of obtaining the parameters that allow us to transform raw sensor information into a coordinate system. In the case of cameras, it refers to the camera matrix and the distortion parameters, whereas in lidars it can refer to the offset and spacing of beams. In our repository, we focus only on camera calibration, since lidar intrinsic calibration is usually vendor-specific (and either the direct parameters or instructions are usually provided by them). | ||
|
||
### Intrinsic camera calibration | ||
|
||
- [Camera calibration](docs/how_to_camera.md) | ||
|
||
Based on the traditional ROS camera calibration procedure, we add extra visualizations to aid the calibration process and support for apriltag boards. | ||
|
||
- [Camera calibration via camera-lidar calibration](docs/how_to_extrinsic_interactive.md) | ||
|
||
- [How to Camera Calibration via camera-lidar calibration (Experimental)](docs/how_to_extrinsic_interactive.md) | ||
Traditionally, camera calibration is performed by detecting several views of planar boards in an image, and so, by knowing the board's dimensions, the camera matrix and distortion can be computed. However, this same process can also be performed by obtaining generic camera-object pairs, like the ones obtained during camera-lidar calibration. By reutilizing the calibration points from camera-lidar calibration, we can perform camera intrinsic calibration and camera-lidar extrinsic calibration simultaneously. |
Oops, something went wrong.