-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from una-auxme/143-feature-create-a-simple-mo…
…tion-planning-node 143 feature create a simple motion planning node
- Loading branch information
Showing
9 changed files
with
463 additions
and
62 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
code/planning/behavior_agent/src/behavior_agent/behaviours/behavior_speed.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
from collections import namedtuple | ||
|
||
|
||
def convert_to_ms(speed): | ||
return speed / 3.6 | ||
|
||
|
||
Behavior = namedtuple("Behavior", ("name", "speed")) | ||
|
||
# Changed target_speed_pub to curr_behavior_pub | ||
|
||
# Intersection - Behaviors | ||
|
||
# Approach | ||
|
||
int_app_init = Behavior("int_app_init", convert_to_ms(30.0)) | ||
|
||
# No Traffic Light or Sign -> stop dynamically at Stopline | ||
int_app_no_sign = Behavior("int_app_no_sign", -2) | ||
|
||
int_app_green = Behavior("int_app_green", convert_to_ms(30.0)) | ||
|
||
# Wait | ||
|
||
int_wait = Behavior("int_wait", 0) | ||
|
||
# Enter | ||
|
||
int_enter_no_light = Behavior("int_enter_no_light", convert_to_ms(50.0)) | ||
|
||
int_enter_empty_str = Behavior("int_enter_empty_string", convert_to_ms(18.0)) | ||
|
||
int_enter_light = Behavior("int_enter_light", convert_to_ms(50.0)) | ||
|
||
# Exit | ||
|
||
int_exit = Behavior("int_exit", -1) # Get SpeedLimit dynamically | ||
|
||
|
||
# Lane Change | ||
|
||
# Approach | ||
|
||
lc_app_init = Behavior("lc_app_blocked", convert_to_ms(30.0)) | ||
|
||
|
||
# TODO: Find out purpose of v_stop in lane_change (lines: 105 - 128) | ||
lc_app_blocked = Behavior("lc_app_blocked", 0.5) | ||
|
||
# Wait | ||
|
||
# Has a publisher but doesnt publish anything ?? | ||
|
||
# Enter | ||
|
||
lc_enter_init = Behavior("lc_enter_init", convert_to_ms(20.0)) | ||
|
||
# Exit | ||
|
||
lc_exit = Behavior("lc_exit", -1) # Get SpeedLimit dynamically | ||
|
||
|
||
# Cruise | ||
|
||
cruise = Behavior("Cruise", -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.