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): add multiple pause source ability #3435

Closed

Conversation

brkay54
Copy link
Member

@brkay54 brkay54 commented Apr 17, 2023

Description

Before this be merged, msg file should be merged.
tier4/tier4_autoware_msgs#82

🤖 Generated by Copilot at 8030a11

Summary

✨♻️📝

Improved the pause interface for the vehicle command gate by allowing multiple sources of pause requests and publishing the pause state. Refactored the PauseInterface class and added a new method update_pause_state to handle the pause logic. Modified pause_interface.cpp and pause_interface.hpp accordingly.

We are the masters of the pause interface
We control the sources of the halt
We update and publish the state of grace
We defy the forces of default

Walkthrough

  • Add a feature that allows multiple sources to request a pause of the vehicle command gate, and shows which sources are requesting it (link, link, link, link, link)
  • Modify the constructor of the PauseInterface class to initialize the pause_state_ message and remove the is_paused_ and prev_is_paused_ variables (link)
  • Modify the publish method to use the pause_state_ and pause_map_ variables, and call the update_pause_state method before publishing (link)
  • Modify the on_pause callback to store the pause request and the source in the pause_map_ variable, and call the update_pause_state method (link)
  • Add the update_pause_state method that updates the pause_state_ message based on the pause_map_ variable (link, link)
  • Add the pause_state_, pause_map_, and prev_pause_map_ variables to the PauseInterface class, and remove the is_paused_ and prev_is_paused_ variables (link)
  • Include the header file for the unordered_map container in the pause_interface.hpp file (link)

Related links

Tests performed

Notes for reviewers

Interface changes

After this PR, requests should include the node's name.

Effects on system behavior

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.

@brkay54 brkay54 requested review from TakaHoribe, tkimura4 and a team as code owners April 17, 2023 01:22
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Apr 17, 2023
@brkay54 brkay54 self-assigned this Apr 17, 2023
@brkay54 brkay54 force-pushed the pause_interface_improvement branch from c4ae0e4 to f86b47d Compare April 17, 2023 01:29
Signed-off-by: Berkay Karaman <brkay54@gmail.com>
@brkay54 brkay54 force-pushed the pause_interface_improvement branch from f86b47d to 7cca1d0 Compare April 27, 2023 22:48
@brkay54 brkay54 closed this May 22, 2023
@brkay54 brkay54 deleted the pause_interface_improvement branch May 30, 2023 21:15
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant