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