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

fix(pid_longitudinal_control): slope definition #5116

Closed

Conversation

TakaHoribe
Copy link
Contributor

@TakaHoribe TakaHoribe commented Sep 25, 2023

Description

Fix the wrong definition of the slope in the code coming from #5090.

To remove the ambiguity in the definitions of pitch angle and slope angle, they have been defined in the readme.

Additionally, because the function name getPitch was unclear, it has been unified to the function name getSlope.

Related links

None

Tests performed

run psim.

Notes for reviewers

None

Interface changes

None

Effects on system behavior

The wrong slope compensation is fixed coming from #5090.

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 type:documentation Creating or refining documentation. (auto-assigned) component:control Vehicle control algorithms and mechanisms. (auto-assigned) labels Sep 25, 2023
return pitch;
// The pitch angle of the posture is defined as positive when facing downward.
// Thus, the definition is the opposite of the slope.
const auto slope = -pitch;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main fix of this PR.

@TakaHoribe TakaHoribe added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Sep 26, 2023
@TakaHoribe TakaHoribe marked this pull request as ready for review September 26, 2023 13:48
@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

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

Comparison is base (71da68c) 14.99% compared to head (70975da) 14.99%.
Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5116   +/-   ##
=======================================
  Coverage   14.99%   14.99%           
=======================================
  Files        1608     1608           
  Lines      111834   111837    +3     
  Branches    34693    34694    +1     
=======================================
+ Hits        16764    16766    +2     
  Misses      76336    76336           
- Partials    18734    18735    +1     
Flag Coverage Δ *Carryforward flag
differential 41.23% <75.00%> (?)
total 14.98% <ø> (-0.01%) ⬇️ Carriedforward from 71da68c

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

Files Coverage Δ
...dinal_controller/longitudinal_controller_utils.hpp 35.00% <ø> (ø)
...l_controller/src/longitudinal_controller_utils.cpp 79.66% <100.00%> (+0.35%) ⬆️
...nal_controller/src/pid_longitudinal_controller.cpp 38.72% <100.00%> (ø)
...roller/test/test_longitudinal_controller_utils.cpp 51.19% <50.00%> (-0.01%) ⬇️

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

@TakaHoribe
Copy link
Contributor Author

FIxed in #5199

@TakaHoribe TakaHoribe closed this Oct 11, 2023
@TakaHoribe TakaHoribe deleted the fix-slope-definition branch July 31, 2024 08:05
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) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant