Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GEMstack/knowledge/defaults/computation_graph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ components:
inputs: [vehicle, roadgraph, agents]
outputs: agent_intents
- relations_estimation:
inputs: [vehicle, roadgraph, agents, obstacles]
inputs: all
outputs: relations
- predicate_evaluation:
inputs: [vehicle, roadgraph, agents, obstacles]
Expand Down
12 changes: 12 additions & 0 deletions GEMstack/knowledge/defaults/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ control:
pid_p: 0.8
pid_i: 0.03
pid_d: 0.0
planning:
longitudinal_plan:
mode: 'real' # 'real' or 'sim'
yielder: 'expert' # 'expert', 'analytic', or 'simulation'
planner: 'dt' # 'milestone', 'dt', or 'dx'
desired_speed: 1.0
acceleration: 0.5
max_deceleration: 6.0
deceleration: 2.0
min_deceleration: 0.5
yield_deceleration: 0.5


#configure the simulator, if using
simulator:
Expand Down
10 changes: 10 additions & 0 deletions GEMstack/mathutils/quadratic_equation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import math

def quad_root(a : float, b : float, c : float) -> float:
"""Calculates the roots of a quadratic equation

Args:
a (float): coefficient of x^2
b (float): coefficient of x
c (float): constant term

Returns:
float: returns all valid roots of the quadratic equation
"""
x1 = (-b + max(0,(b**2 - 4*a*c))**0.5)/(2*a)
x2 = (-b - max(0,(b**2 - 4*a*c))**0.5)/(2*a)

Expand Down
50 changes: 50 additions & 0 deletions GEMstack/onboard/planning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Planning-A HW1 Document

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.

Details on the algorithm and demos are availavle at the link below:<br>
https://drive.google.com/drive/folders/1aSOWIrqXjf9-j6i1S_MJksATMyyoP31_?usp=sharing


## Contribution
Each member contributed to:
### longitudinal_planning.py Contributions

| Algorithm | Contributor |
| :--------- | :-------------- |
| milestone | Simon (sk106) |
| dt | Rohit (srm17) |
| dx | Hansen (hl58) |

### pedestrian_yield_logic.py Contributions

| Algorithm | Contributor |
| :--------- | :------------------------------------------ |
| expert | Patrick (bohaowu2), Animesh (animesh8) |
| analytic | Henry (weigang2) |
| simulation | Yudai (yyamada2) |


## Configuration Details
The `pedetrian_detecion.yaml` file includes:
```
args:
mode: 'real'
params: {
'yielder': 'expert', # 'expert', 'analytic', or 'simulation'
'planner': 'milestone', # 'milestone', 'dt', or 'dx'
'desired_speed': 1.0, # m/s
'acceleration': 0.75 # m/s2
}
```


## Usage
### pedetrian_detecion.yaml
Algorithm can be chosen from the above in this file. Also contains parameters for the logic.
### Execution: Simulator
`python3 main.py --variant=fake_sim launch/pedestrian_detection.yaml`
### Testing
- `testing/test_longitudinal_plan.py`
- `testing/test_yield_logic_analytic.ipynb`
- `testing/test_collision_detection.py`
Loading