Skip to content

Commit 682ad45

Browse files
authored
Merge pull request #150 from krishauser/s2025_teamA_planning
Planning-A into s2025_teamA
2 parents 5fdfde8 + 40743a6 commit 682ad45

10 files changed

Lines changed: 762 additions & 785 deletions

File tree

GEMstack/knowledge/defaults/computation_graph.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ components:
3131
inputs: [vehicle, roadgraph, agents]
3232
outputs: agent_intents
3333
- relations_estimation:
34-
inputs: [vehicle, roadgraph, agents, obstacles]
34+
inputs: all
3535
outputs: relations
3636
- predicate_evaluation:
3737
inputs: [vehicle, roadgraph, agents, obstacles]

GEMstack/knowledge/defaults/current.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ control:
2020
pid_p: 0.8
2121
pid_i: 0.03
2222
pid_d: 0.0
23+
planning:
24+
longitudinal_plan:
25+
mode: 'real' # 'real' or 'sim'
26+
yielder: 'expert' # 'expert', 'analytic', or 'simulation'
27+
planner: 'dt' # 'milestone', 'dt', or 'dx'
28+
desired_speed: 1.0
29+
acceleration: 0.5
30+
max_deceleration: 6.0
31+
deceleration: 2.0
32+
min_deceleration: 0.5
33+
yield_deceleration: 0.5
34+
2335

2436
#configure the simulator, if using
2537
simulator:

GEMstack/mathutils/quadratic_equation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import math
22

33
def quad_root(a : float, b : float, c : float) -> float:
4+
"""Calculates the roots of a quadratic equation
5+
6+
Args:
7+
a (float): coefficient of x^2
8+
b (float): coefficient of x
9+
c (float): constant term
10+
11+
Returns:
12+
float: returns all valid roots of the quadratic equation
13+
"""
414
x1 = (-b + max(0,(b**2 - 4*a*c))**0.5)/(2*a)
515
x2 = (-b - max(0,(b**2 - 4*a*c))**0.5)/(2*a)
616

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Planning-A HW1 Document
2+
3+
This document serves as an overview for integrating pedestrian yielder into longitudinal planner. It describes how parameters from `pedetrian_detecion.yaml` are used in the planning system along with references to the `longitudinal_planning.py` script and the `pedestrian_yield_logic.py` script.
4+
5+
Details on the algorithm and demos are availavle at the link below:<br>
6+
https://drive.google.com/drive/folders/1aSOWIrqXjf9-j6i1S_MJksATMyyoP31_?usp=sharing
7+
8+
9+
## Contribution
10+
Each member contributed to:
11+
### longitudinal_planning.py Contributions
12+
13+
| Algorithm | Contributor |
14+
| :--------- | :-------------- |
15+
| milestone | Simon (sk106) |
16+
| dt | Rohit (srm17) |
17+
| dx | Hansen (hl58) |
18+
19+
### pedestrian_yield_logic.py Contributions
20+
21+
| Algorithm | Contributor |
22+
| :--------- | :------------------------------------------ |
23+
| expert | Patrick (bohaowu2), Animesh (animesh8) |
24+
| analytic | Henry (weigang2) |
25+
| simulation | Yudai (yyamada2) |
26+
27+
28+
## Configuration Details
29+
The `pedetrian_detecion.yaml` file includes:
30+
```
31+
args:
32+
mode: 'real'
33+
params: {
34+
'yielder': 'expert', # 'expert', 'analytic', or 'simulation'
35+
'planner': 'milestone', # 'milestone', 'dt', or 'dx'
36+
'desired_speed': 1.0, # m/s
37+
'acceleration': 0.75 # m/s2
38+
}
39+
```
40+
41+
42+
## Usage
43+
### pedetrian_detecion.yaml
44+
Algorithm can be chosen from the above in this file. Also contains parameters for the logic.
45+
### Execution: Simulator
46+
`python3 main.py --variant=fake_sim launch/pedestrian_detection.yaml`
47+
### Testing
48+
- `testing/test_longitudinal_plan.py`
49+
- `testing/test_yield_logic_analytic.ipynb`
50+
- `testing/test_collision_detection.py`

0 commit comments

Comments
 (0)