Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Gongsta committed Dec 8, 2023
1 parent c41de03 commit 5cc32b3
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ more computation time. Please look into the `main_globaltraj.py` for all possibl
# List of components
* `frictionmap`: This package contains the functions related to the creation and handling of friction maps along the
race track.
* `helper_funcs_glob`: This package contains some helper functions used in several other functions when
* `helper_funcs_glob`: This package contains some helper functions used in several other functions when
calculating the global race trajectory.
* `inputs`: This folder contains the vehicle dynamics information, the reference track csvs and friction maps.
* `opt_mintime_traj`: This package contains the functions required to find the time-optimal trajectory.
* `opt_mintime_traj`: This package contains the functions required to find the time-optimal trajectory.

It also includes the powertrain components in `opt_mintime_traj/powertrain_src` used to calculate power losses and
thermal behavior of the powertrain and to consider the state of charge of the battery.
* `params`: This folder contains a parameter file with optimization and vehicle parameters.
Expand Down Expand Up @@ -45,15 +45,31 @@ Install the required python packages
```bash
pip install -r requirements.txt
```

# Steps
Consult https://stevengong.co/notes/Raceline-Optimization.

### For `slam_toolbox`
If you generated the map through `slam_toolbox`, consult https://stevengong.co/notes/Raceline-Optimization.
You might need to photoshop the map first to remove any artifacts and have clear track boundaries.

First, run `map_converter.ipynb`, and then run `sanity_check.ipynb` to make sure the line generated is correct.

Then, modify the variables in `main_globaltraj_f110.py` to load in the correct centerline and run it to generate the trajectory.
This will export a `.csv` file of the map to `inputs/tracks`.

### For Waypoint Generator
Alternatively, if you generated the map by storing a set of waypoints, you can directly store it inside `inputs/tracks`.

### Common steps
Then, run `main_globaltraj_f110.py` with the map name to generate the trajectory (expects the map to be inside `inputs/tracks`). By default, the generated raceline will be stored inside `outputs/<map_name>`. Optionally, you can specify a `--map_path` and `--export_path`.

```bash
python3 main_globaltraj_f110.py --map_name e7_floor5_square
```

Example with a specific map path and export path:

```bash
python3 main_globaltraj_f110.py
python3 main_globaltraj_f110.py --map_name e7_floor5_square --map_path ~/workspaces/racetracks/e7_floor5_square.csv --export_path /tmp/traj_race_cl.csv
```

The code is developed with Ubuntu 20.04 LTS and Python 3.8.
Expand Down

0 comments on commit 5cc32b3

Please sign in to comment.