]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - README.md
Update readme with using T2 note
[hubacji1/iamcar.git] / README.md
1 # I am car
2 Autonomous car architecture. For now, this project is base for RRT-based
3 planners testing.
4
5 This project is developed under [GNU GPLv3 license][]. For brief project
6 history see [changelog][].
7
8 [GNU GPLv3 license]: ./LICENSE
9 [changelog]: ./CHANGELOG.md
10
11 # Build
12 [CMake][] is used for the project build.
13
14 ## Default planner
15 The default planner is `T3`. Only `T3` is compatible with `USE_PTHREAD` macro
16 in `base/main.cc` file. When other planner than `T3` is going to be used the
17 `USE_PTHREAD` must not be set and `RRTBase` destructor in `base/rrtbase.cc`
18 must be uncommented. Furthermore, for `T2` commit `360ad9e` must be reverted.
19
20 ##  Prerequisities
21 - `cmake`
22 - `libjsoncpp-dev`
23 - `libomp-dev`
24 - `libsdl2-dev`
25 - `freeglut3-dev`
26
27 ## Commands
28 For building the project run:
29 ```bash
30 mkdir build
31 cd build
32 cmake ../
33 make
34 ```
35
36 Or the build script may be used:
37 ```bash
38 bash build.sh
39 ```
40
41 ## Compile Macros
42 Macros that affects output binary may be used with the cmake commands as
43 follows:
44 ```bash
45 cmake -DPLANNER=LaValle1998 ../
46 make
47 ```
48
49 The list of available macros with values:
50 - `PLANNER`
51         - `LaValle198` - RRT framework.
52         - `Kuwata2008` - RRT with changing cost and steering to goal.
53         - `Karaman2011` - RRT* framework.
54         - `T1` - testing planner.
55         - `T2` - testing planner based on RRT*.
56         - `T3` - testing planner, update `T2` to bidirectional.
57         - `Klamm2015` - RRT*-Connect planner.
58 - `TMAX` - Specify the upper time bound in seconds.
59
60 Implemented Steering procedures:
61 - `st1` - Steer directly to goal, no constraints.
62 - `st2` - Steer with maximum turning radius and direction in mind.
63 - `st3` - Reeds and Shepp steer procedure.
64 - `st4` - Very basic closed-loop simulator.
65
66 To disable *OpenMP*, add `-DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE` to `cmake`
67 command or to `build.sh` script.
68
69 To add address sanitizer, please update the `CMakeLists.txt` file with:
70 - `add_compile_options(-Wall -g -Wno-unknown-pragmas -fsanitize=address)`
71 - `target_link_libraries(go_car_go asan)`
72
73 [CMake]: https://cmake.org/
74
75 # Run
76 The scenarios may be run by:
77 ```bash
78 ./build/go_car_go < lpar.json > traj.json
79 ```
80
81 or by:
82 ```bash
83 ./bin/T2 < lpar.json > traj.json
84 ```
85
86 and plot with:
87 ```bash
88 python3 plot.py lpar.json traj.json
89 ```
90
91 # Scenarios
92 The `go_car_go` program expects json formatted on std input. The output is json
93 formatted to std output. Statistics are written to error output.
94
95 ## Slots technical info
96 - Street width min.: 2.75 (sometimes 2.5m).
97
98 ### Small cars (size 01)
99 - Norm: `ČSN 73 6056 s účinností od 1.8. 1988`.
100 - Perpendicular: 2.25 x 4.5m
101 - Parallel: 2.0 x 5,5m
102
103 ### Large cars (size 02)
104 - Perpendicular: 2.4 x 5.30m
105 - Parallel: 2.2 x 6.5m
106
107 ## Examples
108 - [Parallel parking example](./lpar.json)
109 - [Perpendicular parking example](./lper.json)
110
111 # Tests
112 It is possible to run automated tests for multiple planners on one scenario.
113 For this purpose there is `test.sh` script.