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(motion_velocity_smoother): reverse velocity handling #1465

Merged

Conversation

TakaHoribe
Copy link
Contributor

@TakaHoribe TakaHoribe commented Jul 29, 2022

Description

Fixed the negative velocity handling.

The correct process must be

flipSpeedIfNegative();
planVelocity();
re-flipSpeedIfNegative();

Before this PR:

planVelocity_1();
flipSpeedIfNegative();
planVelocity_2();
re-flipSpeedIfNegative();
planVelocity_3();

where, the negative velocity was not considered in the process 1 and 3.

The old process causes unintentional sudden stop or low speed for backward motion.

Additionaly, the calcInitialMotion() function was fixed.
before:

  const auto prev_output_closest_point =
    trajectory_utils::calcInterpolatedTrajectoryPoint(prev_traj, input_traj.at(input_closest).pose);

after:

  const auto prev_output_closest_point =
    trajectory_utils::calcInterpolatedTrajectoryPoint(prev_traj, current_pose_ptr_->pose);

which was critical to driving at a slow speed.

Related links

Tests performed

Run in the parking scenario (or something that requires backward motion) and check if it runs correctly.

image

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.

  • 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.

@TakaHoribe TakaHoribe requested a review from purewater0901 July 29, 2022 05:29
@TakaHoribe TakaHoribe changed the title Fix/smoother reverse velocity fix(motion_velocity_smoother): reverse velocity handling Jul 29, 2022
@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #1465 (da714f7) into main (141b7a9) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1465      +/-   ##
==========================================
- Coverage   10.29%   10.27%   -0.03%     
==========================================
  Files        1119     1119              
  Lines       77647    77816     +169     
  Branches    17876    17876              
==========================================
  Hits         7997     7997              
- Misses      62155    62324     +169     
  Partials     7495     7495              
Flag Coverage Δ *Carryforward flag
differential 3.96% <0.00%> (?)
total 10.28% <0.00%> (ø) Carriedforward from 141b7a9

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

Impacted Files Coverage Δ
...ity_smoother/src/motion_velocity_smoother_node.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f4c833...da714f7. Read the comment docs.

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

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
@TakaHoribe TakaHoribe force-pushed the fix/smoother-reverse-velocity branch from da389f7 to da714f7 Compare July 29, 2022 09:38
@TakaHoribe TakaHoribe marked this pull request as ready for review July 29, 2022 09:38
@TakaHoribe TakaHoribe requested review from kosuke55 and rej55 July 29, 2022 09:38
@kosuke55
Copy link
Contributor

thanks very much. It also works fine with pull_out.

fix_smoother_back-2022-07-29_19.53.13.mp4

@TakaHoribe TakaHoribe enabled auto-merge (squash) July 29, 2022 10:57
@TakaHoribe TakaHoribe merged commit bedc68f into autowarefoundation:main Jul 29, 2022
@TakaHoribe TakaHoribe deleted the fix/smoother-reverse-velocity branch July 29, 2022 10:57
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
1222-takeshi referenced this pull request in tier4/autoware.universe Oct 7, 2022
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
…ndation#1465)

* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
kosuke55 referenced this pull request in tier4/autoware.universe Jan 24, 2023
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
kosuke55 referenced this pull request in tier4/autoware.universe Jan 24, 2023
* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 24, 2023
…ckward driving (#18)

* feat(obstacle_cruise_planner): deal with backward driving (autowarefoundation#1334)

* feat(obstacle_cruise_planner): deal with backward driving

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* minor change

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* use isDrivingForward in motion_utils

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* refactor(motion_velocity_smoother): clean up code (autowarefoundation#1464)

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

* fix(motion_velocity_smoother): reverse velocity handling (autowarefoundation#1465)

* fix(motion_velocity_smoother): negative velocity handling

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

* add reverse velocity handling for debug trajectories, and fix initialmotion calculation

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

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
saka1-s pushed a commit to saka1-s/autoware.universe that referenced this pull request Aug 21, 2024
…r_0.29

fix(goal_planner): fix lane departure check not working correctly due to uninitialized variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants