fix(simple_planning_simulator): change orger of IDX in SimModelDelayS… #9128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
During work with vehicle models from simple_planning_simulator,
I noticed that practically all models use a standardized form of the
IDX
vector - see the table below.Such approach (promise) certainly makes sense if we want to make sure, for example, that
YAW
is always at index2
of theIDX
vector.This is especially useful for the case where in one common part of the code (method) we use different vehicle models and want to use IDX vector indexes (without using enums classes).
However, this approach (promise) is broken in the case of the recently added vehicle model SimModelDelaySteerAccGearedWoFallGuard - see table below.
In SimModelDelaySteerAccGearedWoFallGuard
ACCX
is not on index5
as in any other model but on index6
.On index
5
is the newly addedPEDAL_ACCX
.This break in the
IDX
vector form standardization, makes the code prone to bugs, for this reason I propose to provide such standardization also for the SimModelDelaySteerAccGearedWoFallGuard vehicle model.In this PR, I simply change the order of the
IDX
vector in the SimModelDelaySteerAccGearedWoFallGuard model.Related links
None.
How was this PR tested?
The
Autoware
operation with modified vehicle modelSimModelDelaySteerAccGearedWoFallGuard
has been tested usingscenario_simulator_v2
, more precisely this scenario and this branch - video below. (tier4 access rights may be required).after.mp4
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
The SimModelDelaySteerAccGearedWoFallGuard model vehicle has the order of the
IDX
vector changed - in order to try to maintain the promise.