]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blob - README.md
Update readme
[hubacji1/iamcar2.git] / README.md
1 # I am car, too
2 *I am car, too* puts together multiple libraries and run some automated parking
3 tests.
4
5 # License
6 The project is published under [MIT License][1].
7
8 [1]: ./LICENSE
9
10 # Build
11 To build the project run the following commands:
12 ```
13 mkdir build
14 cd build
15 cmake ../
16 make
17 ```
18
19 To build with ninja:
20 ```
21 mkdir build
22 cd build
23 cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../
24 ninja -v
25 ```
26
27 ## Required libraries
28 - libjsoncpp-dev (`apt install libjsoncpp-dev`)
29 - [libpsp](http://rtime.felk.cvut.cz/gitweb/hubacji1/psp.git)
30   - [libbcar](http://rtime.felk.cvut.cz/gitweb/hubacji1/bcar.git)
31   - libpslot (part of libbcar repository)
32 - [librrts](http://rtime.felk.cvut.cz/gitweb/hubacji1/rrts.git)
33   - libbcar (see above)
34
35 # Tests
36 Files in `src/` folder named `testX.cc` where `X` is integer are tests. All
37 tests expects JSON fromatted *scenario* on standard input and outputs JSON
38 formatted *plan* on standard output. Both, *scenario* and *plan* can be plotted
39 with `plot_json_objects_scenario.py` script.
40
41 ## JSON formatted *scenario*
42 The following properties are expected:
43 - `init`: list of 3 numbers (`x`, `y`, `heading`).
44 - `obst`: list of polygon obstacles, where polygon obstacle is list of
45   coordinates, and coordinate is a list of 2 numbers (`x`, `y`).
46 - `slot`: list of parking slots, where parking slot is a list of 4 coordinates,
47   and coordinate is a list of 2 numbers (`x`, `y`).
48
49 ## JSON formatted *plan*
50 The following properties are expected to extend *scenario* properties:
51 - `goal`: list of 3 numbers (`x`, `y`, `heading`).
52 - `goals`: list of possible goals `[(x, y, h), ...]`.
53 - `path`: list of poses, where pose is list of 3 numbers (`x`, `y`, `heading`).
54
55 ## JSON formatted *stats*
56 The following are expected in the output along with *plan*:
57 - `time`: elapsed time.
58 - `iterations`: number of iterations of algorithm.
59 - `cost`: path cost.
60 - `cusps-in-path`: the number of nodes with direction change in path.
61 - `connecteds-in-path`: the number of nodes almost same (connected) in path.
62 - `nodes`: overall number of nodes.
63
64 ## Test files
65 There is a list of test files and what they include:
66 - `test25.cc`: *RRTCE16*: psp, cute, Dijkstra, RS-H, 3D grid.
67 - `test24.cc`: *RRTCE15*: psp, cute, Dijkstra, RS-RS, 3D grid.
68 - `test23.cc`: *RRTCE14*: psp, cute, Dijkstra, RS-H, 3D tree.
69 - `test22.cc`: *RRTCE13*: psp, cute, Dijkstra, RS-RS, 3D tree.
70 - `test21.cc`: *RRTCE16*: cute, Dijkstra, 3D grid, RS-heur.
71 - `test20.cc`: *RRTCE15*: cute, Dijkstra, 3D grid, RS-RS.
72 - `test19.cc`: *RRTCE14*: cute, Dijkstra, 3D k-d tree, RS-heur.
73 - `test18.cc`: *RRTCE13*: cute, Dijkstra, 3D k-d tree, RS-RS.
74 - `test17.cc`: *RRTCE12*: cute, Dijkstra, 2D k-d tree, RS-heur.
75 - `test16.cc`: *RRTCE11*: cute, Dijkstra, 2D k-d tree, RS-Euclid.
76 - `test15.cc`: *RRTCE10*: cute, Dijkstra, 2D k-d tree, RS-RS.
77 - `test14.cc`: *RRTCE9*: cute, grid, RS-heur, dijkstra (`ce9`).
78 - `test13.cc`: *RRTCE8*: cute, grid, RS-RS, dijkstra (`ce8`).
79 - `test12.cc`: *RRTCE6*: cute, grid, RS-RS.
80 - `test11.cc`: *RRTCE4*: cute, grid, RS-heur.
81 - `test10.cc`: [behavior tree][] w/*RRTCE7*: cute, grid, RS-Euclid, Dijkstra.
82 - `test9.cc`: *RRTCE7*: cute, grid, RS-Euclid, Dijkstra.
83 - `test8.cc`: *RRTCE5*: cute, grid, RS-Euclid.
84 - `test7.cc`: *RRTS*: pure RRT\* run in 1 second interval multiple times.
85 - `test6.cc`: *RRTCE3*: cute, RS-RS.
86 - `test5.cc`: *RRTCE2*: cute, RS-Euclid.
87 - `test4.cc`: *RRTCE1*: cute, RS-heur.
88 - `test3.cc`: *RRTExt2*: RRT\* w/[cute c2][] library for collision detection.
89 - `test2.cc`: *RRTS*: rapidly-exploring random tree star.
90 - `test1.cc`: *PSPlanner*: parking slot planner.
91 - `test-template.cc`: template for tests.
92
93 [cute c2]: https://github.com/RandyGaul/cute_headers/blob/master/cute_c2.h
94 [behavior tree]: https://github.com/arvidsson/BrainTree
95
96 # Contribute
97 Use [OneFlow][3] branching model and keep the [changelog][4].
98
99 Write [great git commit messages][5]:
100 1. Separate subject from body with a blank line.
101 2. Limit the subject line to 50 characters.
102 3. Capitalize the subject line.
103 4. Do not end the subject line with a period.
104 5. Use the imperative mood in the subject line.
105 6. Wrap the body at 72 characters.
106 7. Use the body to explain what and why vs. how.
107
108 When adding feature or hotfix, use [Test-driven development (TDD)][2]:
109 1. Add tests to `ut` folder, add methods declaration, basic structure.
110 2. Run tests (just `make` in `build` folder), check that tests *fail*.
111 3. Implement functionality.
112 4. Run tests, check that tests *pass*.
113 5. Refactor.
114
115 [2]: https://en.wikipedia.org/wiki/Test-driven_development
116 [3]: https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow
117 [4]: ./CHANGELOG.md
118 [5]: https://chris.beams.io/posts/git-commit/
119
120 # Documentation
121 The documentation is generated by Doxygen, at least version `1.8.15` is needed.
122 Just run `doxygen` in the project root directory.