1.1.0
Description
Abstract
We started to consider road slope in lanelet2 map.
In this pull-request, we consider about gravity effect at road slope in ego vehicle simulation.
Background
In horizontal road, gravity has no effect to vehicle behavior.
But in the sloped road, the gravity has some horizontal component to the road like the figure below.
This gravity component effects to the vehicle simulation behavior especially like acceleration and deceleration.
Details
The algorithm to consider sloped road
- Do lane-matching and get s value in the lane coordinate
- Calculate road slope angle by centerpoint of the lane at matched s value.
- Calculate the road horizontal component of gravity
- Apply the acceleration calculated in step 3 to the longitudinal acceleration input of the vehicle model.
consider_acceleration_by_road_slope
flag to toggle function
It is togglable to enable and disable the consideration of sloped road in ego vehicle simulation by using consider_acceleration_by_road_slope
flag.
The flag can be set in arguments of ros2 launch
like below.
ros2 launch scenario_test_runner scenario_test_runner.launch.py \
architecture_type:=awf/universe \
record:=false \
scenario:='$(find-pkg-share scenario_test_runner)/scenario/sample.yaml' \
sensor_model:=sample_sensor_kit \
vehicle_model:=sample_vehicle \
consider_acceleration_by_road_slope:=true
To ensure backward-compatibility, this flag is set to false
defaultly.
Subsequent changes
This pull-request does not implement all consideration to sloped road.
I am implementing the remaining changes on #1103.
By the way, the flag name consider_acceleration_by_road_slope
is counterpart to consider_pose_by_road_slope
, which will be introduced in #1103.
References
pull-requests that were the basis for the change
- autowarefoundation/autoware.universe#4941
- autowarefoundation/autoware.universe#5199
- autowarefoundation/autoware.universe#5501
- autowarefoundation/autoware.universe#5616
Destructive Changes
There is no destructive changes because default behavior has not changed.
The regression test are done with default flag ( INTERNAL LINK )
Known Limitations
In this pull-request, we did not considered about lane lateral slope and lateral accelerration effect to vehicle model.
If simple_planning_simulator
in autoware.universe
started to support them, scenario_simulator_v2
will start that too.