Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vehicle_cmd_gate): variable filter limits for different ego speed #4599

Merged
merged 15 commits into from
Aug 23, 2023

Conversation

TakaHoribe
Copy link
Contributor

@TakaHoribe TakaHoribe commented Aug 11, 2023

Description

Add a variable filter limit based on the ego velocity.
This PR enables the different filter limits (max steering angle, max jerk, etc) for the different ego velocities

For example, you can set

  • max_acceleration = 1.0 when ego_velocity <= 1.0
  • max_acceleration = 0.5 when ego_velocity > 1.0

image

Related links

None

Tests performed

Notes for reviewers

None

Interface changes

None

Effects on system behavior

The filter

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

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

@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Aug 11, 2023
@TakaHoribe TakaHoribe marked this pull request as ready for review August 11, 2023 18:46
@TakaHoribe TakaHoribe requested a review from tkimura4 as a code owner August 11, 2023 18:46
@TakaHoribe TakaHoribe added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 12, 2023
@TakaHoribe TakaHoribe force-pushed the adaptive_vehicle_cmd_filter branch from ef43894 to ea70a1c Compare August 12, 2023 13:07
@codecov
Copy link

codecov bot commented Aug 12, 2023

Codecov Report

Patch coverage: 48.40% and project coverage change: +0.22% 🎉

Comparison is base (9dc104f) 14.89% compared to head (d7ae89b) 15.12%.
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4599      +/-   ##
==========================================
+ Coverage   14.89%   15.12%   +0.22%     
==========================================
  Files        1549     1550       +1     
  Lines      106942   107295     +353     
  Branches    32777    32968     +191     
==========================================
+ Hits        15934    16226     +292     
+ Misses      73617    73389     -228     
- Partials    17391    17680     +289     
Flag Coverage Δ *Carryforward flag
differential 42.61% <48.40%> (?)
total 14.89% <ø> (-0.01%) ⬇️ Carriedforward from eccab7c

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
...ontrol/vehicle_cmd_gate/src/vehicle_cmd_filter.hpp 66.66% <0.00%> (-11.12%) ⬇️
control/vehicle_cmd_gate/src/vehicle_cmd_gate.hpp 0.00% <ø> (ø)
control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp 24.65% <10.52%> (+24.36%) ⬆️
...icle_cmd_gate/test/src/test_vehicle_cmd_filter.cpp 45.94% <30.08%> (-24.73%) ⬇️
...ontrol/vehicle_cmd_gate/src/vehicle_cmd_filter.cpp 71.63% <58.51%> (+0.20%) ⬆️
.../test/src/test_filter_in_vehicle_cmd_gate_node.cpp 61.07% <61.07%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Aug 16, 2023
@TakaHoribe TakaHoribe force-pushed the adaptive_vehicle_cmd_filter branch from 11e8004 to db914a2 Compare August 17, 2023 02:50
@TakaHoribe TakaHoribe added the run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label Aug 17, 2023
@TakaHoribe
Copy link
Contributor Author

Note: Filter is active on speed and acceleration when the vehicle is stopping and starting.
image

…speed

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
@TakaHoribe TakaHoribe force-pushed the adaptive_vehicle_cmd_filter branch from 41a2cd6 to 693abad Compare August 20, 2023 06:33
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
@@ -33,10 +33,14 @@
<depend>tier4_vehicle_msgs</depend>
<depend>vehicle_info_util</depend>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my environment,
<build_depend>rosidl_default_generators</build_depend>
is needed for ros2 topic echo /control/vehicle_cmd_gate/is_filter_activated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Copy link
Contributor

@tkimura4 tkimura4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkimura4 tkimura4 merged commit 5c21c05 into autowarefoundation:main Aug 23, 2023
@tkimura4 tkimura4 deleted the adaptive_vehicle_cmd_filter branch August 23, 2023 03:16
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Aug 23, 2023
autowarefoundation#4599)

* feat(vehicle_cmd_gate): variable filter limits for different vehicle speed

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add steer diff test

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add node test for vehicle_cmd_gate

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update readme

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add is_filter_activated msg

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update is_activate for each field

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update control/vehicle_cmd_gate/src/vehicle_cmd_filter.cpp

* add function test for interpolation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* remove unused file

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add missing depend

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

---------

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
tkimura4 pushed a commit to tier4/autoware.universe that referenced this pull request Sep 5, 2023
autowarefoundation#4599)

* feat(vehicle_cmd_gate): variable filter limits for different vehicle speed

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add steer diff test

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add node test for vehicle_cmd_gate

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update readme

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add is_filter_activated msg

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update is_activate for each field

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update control/vehicle_cmd_gate/src/vehicle_cmd_filter.cpp

* add function test for interpolation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* remove unused file

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add missing depend

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

---------

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
TakaHoribe added a commit to tier4/autoware.universe that referenced this pull request Oct 16, 2023
autowarefoundation#4599)

* feat(vehicle_cmd_gate): variable filter limits for different vehicle speed

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add steer diff test

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add node test for vehicle_cmd_gate

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update readme

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add is_filter_activated msg

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update is_activate for each field

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* update

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update control/vehicle_cmd_gate/src/vehicle_cmd_filter.cpp

* add function test for interpolation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix format

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* remove unused file

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add missing depend

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

---------

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants