tier4 / CalibrationTools

GNU General Public License v3.0
98 stars 35 forks source link

feat: added deviation_estimator unit_tool #149

Closed SakodaShintaro closed 6 months ago

SakodaShintaro commented 6 months ago

Description

I created a unit tool of deviation_estimator that loads rosbag and performs calibration.

Context

The current deviation_estimator is implemented as a ros2 node, so it takes the same amount of time as the rosbag used for calibration.

Also, since it is a ros2 node, there is a problem that slight variations occur depending on the execution, making it impossible to reproduce same results.

By implementing it as a unit tool that directly loads rosbag, it runs in seconds and deterministically.

I think migration (removal of ros2 node version and rewriting of README) will be done in another PR in the future.

Tests performed

I ran deviation_estimator on several rosbags and confirmed that results close to conventional ones were obtained.

Example

as a ros2 node

# Estimated by deviation_estimator
/**:
  ros__parameters:
    angular_velocity_offset_x: -0.00030
    angular_velocity_offset_y: -0.00238
    angular_velocity_offset_z: 0.00599
    angular_velocity_stddev_xx: 0.00596
    angular_velocity_stddev_yy: 0.00596
    angular_velocity_stddev_zz: 0.00596
# Estimated by deviation_estimator
/**:
  ros__parameters:
    speed_scale_factor: 0.99283
    velocity_stddev_xx: 0.59143
    angular_velocity_stddev_zz: 0.1 # Default value
    frame_id: base_link # Default value

as a unit tool

# Estimated by deviation_estimator
/**:
  ros__parameters:
    angular_velocity_offset_x: -0.00033
    angular_velocity_offset_y: -0.00241
    angular_velocity_offset_z: 0.00594
    angular_velocity_stddev_xx: 0.00673
    angular_velocity_stddev_yy: 0.00673
    angular_velocity_stddev_zz: 0.00673
# Estimated by deviation_estimator
/**:
  ros__parameters:
    speed_scale_factor: 0.99414
    velocity_stddev_xx: 0.49194
    angular_velocity_stddev_zz: 0.1 # Default value
    frame_id: base_link # Default value

Notes for reviewers

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

After all checkboxes are checked, anyone who has write access can merge the PR.

codecov-commenter commented 6 months ago

Codecov Report

Attention: 185 lines in your changes are missing coverage. Please review.

Comparison is base (6af0d0d) 0.94% compared to head (9dc9794) 14.09%.

Files Patch % Lines
...viation_estimator/src/deviation_estimator_main.cpp 0.00% 185 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## tier4/universe #149 +/- ## =================================================== + Coverage 0.94% 14.09% +13.14% =================================================== Files 269 15 -254 Lines 21149 738 -20411 Branches 383 297 -86 =================================================== - Hits 200 104 -96 + Misses 20792 556 -20236 + Partials 157 78 -79 ``` | [Flag](https://app.codecov.io/gh/tier4/CalibrationTools/pull/149/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tier4) | Coverage Δ | | |---|---|---| | [differential](https://app.codecov.io/gh/tier4/CalibrationTools/pull/149/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tier4) | `14.09% <0.00%> (?)` | | | [total](https://app.codecov.io/gh/tier4/CalibrationTools/pull/149/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tier4) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tier4#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.