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(mpc_lateral_controller): reset ctrl_cmd_prev during manual mode #6541

Conversation

kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Mar 4, 2024

Description

Fix the reported issue

reset m_ctrl_cmd_prev during manual mode.

problem is described in the issue.

How to reproduce the problem in local environment

  1. run logging_simulator with enabling only control module with following command
ros2 launch autoware_launch logging_simulator.launch.xml map_path:=/path_to_your_map/ vehicle_model:=your_vehicle sensor_model:=aip_xx1 perception:=false sensing:=false control:=true planning:=false localozation:=false
  1. play rosbag
    To remap topics related to the trajectory_follower_node stored in a rosbag to the control topics used by autoware, you can use the following option command
--remap /control/trajectory_follower/control_cmd:=/exclude/control_cmd /control/trajectory_follower/controller_node_exe/lateral/debug/processing_time_ms:=/exclude/lateral_processing_time_ms /control/trajectory_follower/controller_node_exe/longitudinal/debug/processing_time_ms:=/exclude/longitudinal_processing_time_ms /control/trajectory_follower/controller_node_exe/output/debug_marker:=/exclude/debug_marker /control/trajectory_follower/controller_node_exe/output/estimated_steer_offset:=/exclude/estimated_steer_offset /control/trajectory_follower/lateral/predicted_trajectory:=/exclude/lateral/predicted_trajectory

Tests performed

Effects on system behavior

Not applicable.

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.

  • There are no open discussions or they are tracked via tickets.

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 Mar 4, 2024
if (!m_is_ctrl_cmd_prev_initialized) {
if (
!m_is_ctrl_cmd_prev_initialized ||
!input_data.current_operation_mode.is_autoware_control_enabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be like this !(is_autoware_control_enabled && mode==AUTONOMOUS)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I addressed in 0516f5a

@kyoichi-sugahara kyoichi-sugahara force-pushed the fix/reset_prev_cmd_while_manual_driving branch from c1fb741 to 89b7b9c Compare March 5, 2024 05:36
Signed-off-by: kyoichi-sugahara <[email protected]>
@kyoichi-sugahara kyoichi-sugahara marked this pull request as ready for review March 5, 2024 07:02
Copy link
Contributor

@TakaHoribe TakaHoribe left a comment

Choose a reason for hiding this comment

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

LGTM

@kyoichi-sugahara kyoichi-sugahara added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 14.78%. Comparing base (59f7031) to head (0516f5a).
Report is 4 commits behind head on main.

Files Patch % Lines
..._lateral_controller/src/mpc_lateral_controller.cpp 0.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6541      +/-   ##
==========================================
- Coverage   14.78%   14.78%   -0.01%     
==========================================
  Files        1917     1917              
  Lines      132038   132040       +2     
  Branches    39228    39230       +2     
==========================================
  Hits        19523    19523              
- Misses      90726    90727       +1     
- Partials    21789    21790       +1     
Flag Coverage Δ *Carryforward flag
differential 44.96% <0.00%> (?)
total 14.78% <ø> (+<0.01%) ⬆️ Carriedforward from 59f7031

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

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

@kyoichi-sugahara kyoichi-sugahara merged commit 48d20f1 into autowarefoundation:main Mar 5, 2024
35 of 38 checks passed
@kyoichi-sugahara kyoichi-sugahara deleted the fix/reset_prev_cmd_while_manual_driving branch March 5, 2024 18:29
kyoichi-sugahara added a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Mar 5, 2024
…utowarefoundation#6541)

* reset ctrl_cmd_prev during manual mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix manual driving condition

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
…6541)

* reset ctrl_cmd_prev during manual mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix manual driving condition

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: Kotaro Yoshimoto <[email protected]>
kaigohirao pushed a commit to kaigohirao/autoware.universe that referenced this pull request Mar 22, 2024
…utowarefoundation#6541)

* reset ctrl_cmd_prev during manual mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix manual driving condition

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
Signed-off-by: kaigohirao <[email protected]>
h-ohta pushed a commit to tier4/autoware.universe that referenced this pull request May 31, 2024
…utowarefoundation#6541)

* reset ctrl_cmd_prev during manual mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix manual driving condition

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…utowarefoundation#6541)

* reset ctrl_cmd_prev during manual mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix manual driving condition

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants