]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - README.md
Add `dubins` files
[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
71 To disable *OpenMP*, add `-DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE` to `cmake`
72 command or to `build.sh` script.
73
74 To add address sanitizer, please update the `CMakeLists.txt` file with:
75 - `add_compile_options(-Wall -g -Wno-unknown-pragmas -fsanitize=address)`
76 - `target_link_libraries(go_car_go asan)`
77
78 [CMake]: https://cmake.org/
79
80 # Run
81 The scenarios may be run by:
82 ```bash
83 ./build/go_car_go < lpar.json > traj.json
84 ```
85
86 or by:
87 ```bash
88 ./bin/T2 < lpar.json > traj.json
89 ```
90
91 and plot with:
92 ```bash
93 python3 plot.py lpar.json traj.json
94 ```
95
96 # Scenarios
97 The `go_car_go` program expects json formatted on std input. The output is json
98 formatted to std output. Statistics are written to error output.
99
100 ## Slots technical info
101 - Street width min.: 2.75 (sometimes 2.5m).
102
103 ### Small cars (size 01)
104 - Norm: `ČSN 73 6056 s účinností od 1.8. 1988`.
105 - Perpendicular: 2.25 x 4.5m
106 - Parallel: 2.0 x 5,5m
107
108 ### Large cars (size 02)
109 - Perpendicular: 2.4 x 5.30m
110 - Parallel: 2.2 x 6.5m
111
112 ## Examples
113 - [Parallel parking example](./lpar.json)
114 - [Perpendicular parking example](./lper.json)
115
116 # Tests
117 It is possible to run automated tests for multiple planners on one scenario.
118 For this purpose there is `test.sh` script.