-
Notifications
You must be signed in to change notification settings - Fork 639
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 VGR sim model #8415
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
a4e3f1f
to
f806d46
Compare
f806d46
to
89bc4c3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8415 +/- ##
==========================================
+ Coverage 23.90% 23.96% +0.05%
==========================================
Files 1381 1383 +2
Lines 101923 102054 +131
Branches 38808 38866 +58
==========================================
+ Hits 24363 24453 +90
- Misses 75116 75144 +28
- Partials 2444 2457 +13
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
89bc4c3
to
2e74fdc
Compare
2e74fdc
to
422b138
Compare
simulator/simple_planning_simulator/test/test_simple_planning_simulator.cpp
Outdated
Show resolved
Hide resolved
publish_steering(current_steer_); | ||
} | ||
|
||
if (vehicle_model_type_ == VehicleModelType::ACTUATION_CMD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VehicleModelType
should not be used here for extensibility. Please define steering_publish_type in constructor, use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in ed78398
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added virtual bool shouldPublishActuationStatus() const { return false; }
if (vehicle_model_type_ != VehicleModelType::ACTUATION_CMD) { | ||
return; | ||
} | ||
const auto model = std::dynamic_pointer_cast<SimModelActuationCmd>(vehicle_model_ptr_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of dynamic_pointer_cast
should be avoided as much as possible. In this case, you can add a getActuationStatus() in a base class with returning zero by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in ed78398
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returning zero by default.
I return not zoro but null
Signed-off-by: kosuke55 <[email protected]>
a8b3bc3
to
8dbdd04
Compare
Signed-off-by: kosuke55 <[email protected]>
Signed-off-by: kosuke55 <[email protected]>
…n#8415) * feat(simple_planning_simulator): add VGR sim model Signed-off-by: kosuke55 <[email protected]> * Update simulator/simple_planning_simulator/test/test_simple_planning_simulator.cpp * move to interface Signed-off-by: kosuke55 <[email protected]> * add const Signed-off-by: kosuke55 <[email protected]> --------- Signed-off-by: kosuke55 <[email protected]>
…n#8415) * feat(simple_planning_simulator): add VGR sim model Signed-off-by: kosuke55 <[email protected]> * Update simulator/simple_planning_simulator/test/test_simple_planning_simulator.cpp * move to interface Signed-off-by: kosuke55 <[email protected]> * add const Signed-off-by: kosuke55 <[email protected]> --------- Signed-off-by: kosuke55 <[email protected]>
…n#8415) * feat(simple_planning_simulator): add VGR sim model Signed-off-by: kosuke55 <[email protected]> * Update simulator/simple_planning_simulator/test/test_simple_planning_simulator.cpp * move to interface Signed-off-by: kosuke55 <[email protected]> * add const Signed-off-by: kosuke55 <[email protected]> --------- Signed-off-by: kosuke55 <[email protected]>
Description
As shown in #8504, add conversion from steer angle to handle angle by variable gear ratio to raw_vehicle_cmd_converter.
To simulate this, implement a model that works with handle angle. And add atuation status publishing.
raw_vehicle_cmd_converter
sim
vgr_sim-2024-08-08_21.18.15.mp4
vgr_sim-2024-08-08_23.04.50.mp4
Related links
Parent Issue:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.