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

Consider road slope in ego vehicle simulation #1182

Merged
merged 25 commits into from
Feb 22, 2024

Conversation

HansRobo
Copy link
Collaborator

@HansRobo HansRobo commented Feb 1, 2024

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.
image

This gravity component effects to the vehicle simulation behavior especially like acceleration and deceleration.

Details

The algorithm to consider sloped road

  1. Do lane-matching and get s value in the lane coordinate
  2. Calculate road slope angle by centerpoint of the lane at matched s value.
  3. Calculate the road horizontal component of gravity
  4. 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

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.

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
…tity simulation

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
…pe in ego entity simulation

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
…or simple_sensor_simulator

Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
@HansRobo HansRobo self-assigned this Feb 8, 2024
…le_model

# Conflicts:
#	simulation/simple_sensor_simulator/src/vehicle_simulation/ego_entity_simulation.cpp
#	test_runner/scenario_test_runner/launch/scenario_test_runner.launch.py
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
@HansRobo HansRobo added the bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 label Feb 15, 2024
@HansRobo HansRobo added bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 and removed bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 labels Feb 15, 2024
HansRobo and others added 8 commits February 19, 2024 10:20
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
…to getMatchedLaneletPoseFromEntityStatus function
@HansRobo HansRobo marked this pull request as ready for review February 21, 2024 04:59
HansRobo and others added 5 commits February 21, 2024 16:14
Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
…entity_simulation.cpp

Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
…entity_simulation.cpp

Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
…entity_simulation.cpp

Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
…entity_simulation.cpp

Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
HansRobo and others added 3 commits February 21, 2024 16:24
…entity_simulation.cpp

Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
Co-authored-by: Masaya Kataoka <ms.kataoka@gmail.com>
@hakuturu583 hakuturu583 merged commit 52fac6f into master Feb 22, 2024
10 checks passed
@hakuturu583 hakuturu583 deleted the feature/slope_vehicle_model branch February 22, 2024 02:52
@github-actions github-actions bot restored the feature/slope_vehicle_model branch February 22, 2024 02:53
@github-actions github-actions bot deleted the feature/slope_vehicle_model branch February 22, 2024 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 wait for regression test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants