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(simple_planning_simulator): add control_mode server #1061

Merged

Conversation

TakaHoribe
Copy link
Contributor

@TakaHoribe TakaHoribe commented Jun 8, 2022

Description

  • Add server for control_mode_request.srv.
  • Add Auto/Manual mode handling
  • Add manual control command subscriber
  • Add getGear() function in vehicle_model

Related links

Tests performed

Run planning_simulator.launch

How to test:

  1. merge message PR: feat(tier4_vehicle_msgs): add new msgs for engage-on-driving tier4/tier4_autoware_msgs#36
  2. run planning_simulator
  3. run the vehicle in autonomous mode
  4. publish manual control topics like below:
ros2 topic pub /simulation/input/manual_ackermann_control_command autoware_auto_control_msgs/msg/AckermannControlCommand "{}" -r 10

ros2 topic pub /simulation/input/manual_gear_command autoware_auto_vehicle_msgs/msg/GearCommand "{command: 2}" -r 10
  1. call ControlMdeRequest service to change Manual as below:
ros2 service call /simulation/control_mode_request tier4_vehicle_msgs/srv/ControlModeRequest "{mode: {data: 2}}"
  1. See the vehicle motion is overrode by the manual command.

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 force-pushed the feature/simulator-control-mode branch from 263ddd5 to feb5017 Compare June 9, 2022 10:19
@TakaHoribe TakaHoribe marked this pull request as ready for review June 9, 2022 13:22
@TakaHoribe
Copy link
Contributor Author

cc. @yamacir-kit

@yukkysaito
Copy link
Contributor

Good
Just comment.

  • update readme
  • pass CI

@TakaHoribe
Copy link
Contributor Author

@yukkysaito thanks. The CI failure is due to the lack of the required messages. Need to merge the message first.

Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Takamasa Horibe <[email protected]>
@TakaHoribe TakaHoribe force-pushed the feature/simulator-control-mode branch from 41f2d18 to aff04ea Compare June 30, 2022 08:31
Signed-off-by: Takamasa Horibe <[email protected]>
@codecov
Copy link

codecov bot commented Jun 30, 2022

Codecov Report

Merging #1061 (4683515) into main (ce6ccec) will increase coverage by 0.11%.
The diff coverage is 40.42%.

@@           Coverage Diff            @@
##            main   #1061      +/-   ##
========================================
+ Coverage   9.59%   9.70%   +0.11%     
========================================
  Files       1045    1045              
  Lines      71821   71945     +124     
  Branches   15590   15681      +91     
========================================
+ Hits        6889    6985      +96     
+ Misses     58693   58686       -7     
- Partials    6239    6274      +35     
Flag Coverage Δ *Carryforward flag
differential 56.90% <31.42%> (?)
total 9.57% <38.46%> (ø) Carriedforward from aff04ea

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

Impacted Files Coverage Δ
...nning_simulator/simple_planning_simulator_core.hpp 76.92% <ø> (-0.86%) ⬇️
...ulator/vehicle_model/sim_model_delay_steer_acc.hpp 100.00% <ø> (ø)
...vehicle_model/sim_model_delay_steer_acc_geared.hpp 100.00% <ø> (ø)
...ulator/vehicle_model/sim_model_ideal_steer_acc.hpp 100.00% <ø> (ø)
...vehicle_model/sim_model_ideal_steer_acc_geared.hpp 100.00% <ø> (ø)
...ulator/vehicle_model/sim_model_ideal_steer_vel.hpp 100.00% <ø> (ø)
...nning_simulator/simple_planning_simulator_core.cpp 49.03% <37.77%> (+7.76%) ⬆️
...ng_simulator/vehicle_model/sim_model_interface.hpp 75.00% <100.00%> (+8.33%) ⬆️
...ng_simulator/vehicle_model/sim_model_interface.cpp 50.00% <100.00%> (+2.63%) ⬆️
... and 3 more

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 ce6ccec...4683515. Read the comment docs.

@TakaHoribe TakaHoribe merged commit 791fd51 into autowarefoundation:main Jun 30, 2022
@TakaHoribe TakaHoribe deleted the feature/simulator-control-mode branch June 30, 2022 12:51
shmpwk pushed a commit to shmpwk/autoware.universe that referenced this pull request Jul 2, 2022
…ndation#1061)

* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
Signed-off-by: Shumpei Wakabayashi <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
…ndation#1061)

* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
* add control-mode in simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* precommit

Signed-off-by: Takamasa Horibe <[email protected]>

* update

Signed-off-by: Takamasa Horibe <[email protected]>

* update readme

Signed-off-by: Takamasa Horibe <[email protected]>

* update simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* fix typo

Signed-off-by: Takamasa Horibe <[email protected]>
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