]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/blob - README.md
Update changelog, readme
[hubacji1/iamcar.git] / README.md
1 # I am car
2 Autonomous car architecture
3
4 # Build
5 [CMake] is used for project build.
6
7 ##  Prerequisities
8 - cmake
9 - libjsoncpp-dev
10
11 ## Commands
12 ```bash
13 mkdir build
14 cd build
15 cmake ../
16 make
17 ```
18
19 ## Compile Macros
20 Macros that affects output binary may be used with the cmake commands as
21 follows:
22 ```
23 cmake -DPLANNER=LaValle1998 ../
24 make
25 ```
26
27 The list of available macros with values:
28 - `PLANNER`
29         - `LaValle198` - RRT framework.
30         - `Kuwata2008` - RRT with changing cost and steering to goal.
31         - `Karaman2011` - RRT* framework.
32 - `TMAX` - Specify the upper time bound in seconds.
33 - `NN`
34         - `nn1` - Nearest neighbour basic DFS procedure.
35 - `NV`
36         - `nv1` - Near vertices basic DFS procedure.
37 - `SA`
38         - `sa1` - Basic sample procedure.
39 - `ST`
40         - `st1` - Steer directly to goal.
41         - `st2` - Steer with maximum turning radius and direction in mind.
42         - `st3` - Reeds and Shepp steer procedure.
43         - `st4` - Very basic closed-loop simulator.
44 - `CO`
45         - `co1` - Euclidean distance cost.
46         - `co2` - Reeds and Shepp distance.
47 - `CCO`
48         - `co3` - Cumulative cost based on Euclidean distance.
49         - `co4` - Cumulative cost based on Reeds and Shepp distance.
50
51 [CMake]: https://cmake.org/
52
53 # Run
54 The scenarios may be run and plot by the following example command from root:
55 ```
56 SC=lpar && cat $SC.json | ./build/go_car_go > traj.json &&
57 python plot.py $SC.json traj.json
58 ```
59
60 # Scenarios
61 The `go_car_go` program expects json formatted on std input. The output is json
62 formatted to std output.
63
64 - Street width min.: 2.75 (sometimes 2.5m).
65
66 ## Small cars (size 01)
67 - Norm: `ČSN 73 6056 s účinností od 1.8. 1988`.
68 - Perpendicular: 2.25 x 4.5m
69 - Parallel: 2.0 x 5,5m
70
71 ## Large cars (size 02)
72 - Perpendicular: 2.4 x 5.30m
73 - Parallel: 2.2 x 6.5m
74
75 ## Parallel parking example (large cars)
76 ```json
77 {
78         "init": [1.1, 6.5, 1.5707963267948966],
79         "goal": [-1.1, 14.37, 1.5707963267948966],
80         "obst": [
81                 {
82                         "segment": [
83                                 [0, 0],
84                                 [0, 13]
85                         ]
86                 },
87                 {
88                         "segment": [
89                                 [0, 13],
90                                 [-2.2, 13]
91                         ]
92                 },
93                 {
94                         "segment": [
95                                 [-2.2, 13],
96                                 [-2.2, 19.5]
97                         ]
98                 },
99                 {
100                         "segment": [
101                                 [-2.2, 19.5],
102                                 [0, 19.5]
103                         ]
104                 },
105                 {
106                         "segment": [
107                                 [0, 19.5],
108                                 [0, 26]
109                         ]
110                 },
111                 {
112                         "segment": [
113                                 [2.75, 0],
114                                 [2.75, 26]
115                         ]
116                 },
117                 {
118                         "segment": [
119                                 [0, 0],
120                                 [2.75, 0]
121                         ]
122                 },
123                 {
124                         "segment": [
125                                 [0, 26],
126                                 [2.75, 26]
127                         ]
128                 }
129         ]
130 }
131 ```
132
133 ## Perpendicular parking example
134 ```json
135 {
136         "init": [1.1, 6.5, 1.5707963267948966],
137         "goal": [-0.37, 14.2, 3.141592653589793],
138         "obst": [
139                 {
140                         "segment": [
141                                 [0, 0],
142                                 [0, 13]
143                         ]
144                 },
145                 {
146                         "segment": [
147                                 [0, 13],
148                                 [-5.3, 13]
149                         ]
150                 },
151                 {
152                         "segment": [
153                                 [-5.3, 13],
154                                 [-5.3, 15.4]
155                         ]
156                 },
157                 {
158                         "segment": [
159                                 [-5.3, 15.4],
160                                 [0, 15.4]
161                         ]
162                 },
163                 {
164                         "segment": [
165                                 [0, 15.4],
166                                 [0, 26]
167                         ]
168                 },
169                 {
170                         "segment": [
171                                 [5.5, 0],
172                                 [5.5, 26]
173                         ]
174                 },
175                 {
176                         "segment": [
177                                 [0, 0],
178                                 [5.5, 0]
179                         ]
180                 },
181                 {
182                         "segment": [
183                                 [0, 26],
184                                 [5.5, 26]
185                         ]
186                 }
187         ]
188 }
189 ```