You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decides which speed is the right one to pass through a certain situation and
176
-
also checks if an overtake is necessary.
177
-
Everything is based on the data from the Perception [Perception](#Perception). More about the behavior tree can be found [here](../planning/Behavior_tree.md)
175
+
Decides which situation occurs and how the car reacts to it, e.g. checks for intersection, overtake, lanechange and more.
176
+
Everything is based on the data from the [Perception](#Perception) and Intermediate Layer. More about the behavior tree can be found [here](../planning/Behavior_tree.md)
-[Collision Check](../planning//Collision_Check.md): Checks for collisions based on objects recieved from [Perception](#perception)
226
-
-[ACC](../planning/ACC.md): Generates a new speed based on a possible collision recieved from Collision Check and speedlimits recieved from [Global Planner](#global-planning)
227
-
-[Motion Planning](../planning/motion_planning.md): Decides the target speed and modifies trajectory if signal recieved from [Behavior Agent](#behavior-agent-behavior_agent)
217
+
-[ACC](../planning/ACC.md): Generates a new speed based on a possible collision received from Collision Check and speedlimits received from [Global Planner](#global-planning)
218
+
-[Motion Planning](../planning/motion_planning.md): Decides the target speed and modifies trajectory if signal received from [Behavior Agent](#behavior-agent-behavior_agent)
- Collision Check: Checks for collisions based on objects recieved from [Perception](#perception)
171
169
- ACC: Generates a new speed based on a possible collision recieved from Collision Check and speedlimits recieved from [Global Planner](#global-planning)
172
170
- Motion Planning: Decides the target speed and modifies trajectory if signal recieved from [Decision Making](#decision-making)
Copy file name to clipboardExpand all lines: doc/planning/Behavior_tree.md
+21-34
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Behavior Tree
2
2
3
-
**Summary:** This page contains a simple explanation for the behavior tree. For more technical insights have a look at the [code](../../code/planning/src/behavior_agent/behaviours) itself.
3
+
**Summary:** This page contains a simple explanation for the behavior tree. For more technical insights have a look at the [code](../../code/planning/src/behavior_agent/behaviors) itself.
4
4
5
5
**Disclaimer**: As we mainly built our decision tree on the previous projects [psaf2](https://github.com/ll7/psaf2) and [paf22](https://github.com/ll7/paf22) , most part of the documentation was added here and adjusted to the changes we made.
6
6
@@ -11,9 +11,7 @@
11
11
-[Sequence](#sequence)
12
12
-[Condition](#condition)
13
13
-[Subtree](#subtree)
14
-
-[Intersection](#intersection)
15
-
-[Legend](#legend)
16
-
-[Other Behaviors](#other-behaviors)
14
+
-[Our behaviors](#our-behaviors)
17
15
-[Developing guide](#developing-guide)
18
16
-[Tree Definition](#tree-definition)
19
17
-[Behaviors](#behaviors)
@@ -26,6 +24,7 @@
26
24
-[`initialise()`](#initialise)
27
25
-[`update()`](#update)
28
26
-[`terminate()`](#terminate)
27
+
-[Dynamic Reconfigure](#dynamic-reconfigure)
29
28
30
29
## About
31
30
@@ -63,49 +62,30 @@ Is always the first child of a sequence. It decides if the sequence should be ex
63
62
64
63
Represents a specific task/scenario which is handled by the decision tree.
65
64
66
-
### Intersection
65
+
##Our behaviors
67
66
68
-
#### Legend
67
+
Every behavior is documented detailed in the 'behavior' subfolder:
69
68
70
-

71
-
72
-

73
-
74
-
If there is an intersection coming up, the agent executes the following sequence of behaviors:
75
-
76
-
- Approach Intersection
77
-
78
-
Slows down and stops at line if a yellow or red traffic light is detected
79
-
80
-
- Wait at Intersection
81
-
82
-
Waits for traffic lights or higher priority traffic
83
-
84
-
- Enter Intersection
85
-
86
-
Enters the intersection and follows it predetermined path through the intersection
87
-
88
-
- Leave Intersection
89
-
90
-
Leaves the intersection in the right direction
91
-
92
-
### Other Behaviors
93
-
94
-
Lane Change and Overtake are built just like Intersection. So there is always an Approach, Wait, Enter and Leave part.
The tree is defined in the `grow_a_tree()`-function inside `code/planning/src/behavior_agent/behavior_tree.py`, which is also the main node. It can be visualized using an [rqt-Plugin](https://wiki.ros.org/rqt_py_trees).
80
+
The tree is defined in the `grow_a_tree()`-function inside the [behavior_tree.py](../../code/planning/src/behavior_agent/behavior_tree.py), which is also the main node. It can be visualized using an [rqt-Plugin](https://wiki.ros.org/rqt_py_trees).
101
81
102
82
### Behaviors
103
83
104
-
`Behaviors` are implemented in the `code/planning/src/behavior_agent/behaviors/` directory. All the behaviors used in the current version of the tree are contained as skeletons.
84
+
`Behaviors` are implemented in the [behaviors/](../../code/planning/src/behavior_agent/behaviors/) subdirectory. All the behaviors used in the current version of the tree are contained as skeletons.
105
85
106
86
#### Blackboard
107
87
108
-
To deal with the asynchronicity of ROS, all the topics this tree subscribes to, should be written to the Blackboard at the beginning of each tick. A node is available, that automates this task. Just add your node to the list in `code/planning/src/behavior_agent/behaviors/topics2blackboard.py`:
88
+
To deal with the asynchronicity of ROS, all the topics this tree subscribes to, should be written to the Blackboard at the beginning of each tick. A node is available, that automates this task. Just add your node to the list in the [topics2blackboard.py](../../code/planning/src/behavior_agent/behaviors/topics2blackboard.py):
109
89
110
90
```python
111
91
...
@@ -161,3 +141,10 @@ Main function of a behavior, that gets called everytime the behavior is ticked.
161
141
##### `terminate()`
162
142
163
143
This gets called, whenever a behavior is cancelled by a higher priority branch. Use to terminate middleware connections or asynchronous Calculations, whose results are not needed anymore.
144
+
145
+
### Dynamic Reconfigure
146
+
147
+
Dynamic Reconfigure is implemented in the Behavior Tree. This allows variables to be changed at runtime, which is good for debugging etc. \
148
+
If you want to add a new parameter, you need to include them in the
149
+
[behavior_config.yaml](../../code/planning/config/behavior_config.yaml) and in the [BEHAVIOR.cfg](../../code/planning/config/BEHAVIOR.cfg) in the `/code/planning/config` subfolder. \
150
+
New parameters are added automatically into the blackboard and are available as topic `/params/*parameter_name*`.
0 commit comments