]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blobdiff - README.md
Fix private member name
[hubacji1/iamcar2.git] / README.md
index 3795439d9b8b9a1c5abdeb09e201be58cdff241b..6d550704dfe5fa68c463a8a0ad406e309677c503 100644 (file)
--- a/README.md
+++ b/README.md
-# I am car, too
-*I am car, too* puts together multiple libraries and run some automated parking
-tests.
+__I am car, too__ puts together some libraries to run some tests on some
+scenarios.
 
-# License
-The project is published under [MIT License][1].
+The project is published under [GNU GPLv3][1].
 
 [1]: ./LICENSE
 
-# Build
-To build the project run the following commands:
-```
-mkdir build
-cd build
-cmake ../
-make
-```
-
-To build with ninja:
-```
-mkdir build
-cd build
-cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../
-ninja -v
-```
-
-## Required libraries
-- `libjsoncpp-dev`
-- `libpsp` (depends on `libbcar`, `libpslot`)
-- `librrts` (depends on `libbcar`)
+Build
+-----
 
-# Tests
-Files in `src/` folder named `testX.cc` where `X` is integer are tests. All
-tests expects JSON fromatted *scenario* on standard input and outputs JSON
-formatted *plan* on standard output. Both, *scenario* and *plan* can be plotted
-with `plot_json_objects_scenario.py` script.
-
-## JSON formatted *scenario*
-The following properties are expected:
-- `init`: list of 3 numbers (`x`, `y`, `heading`).
-- `obst`: list of polygon obstacles, where polygon obstacle is list of
-  coordinates, and coordinate is a list of 2 numbers (`x`, `y`).
-- `slot`: list of parking slots, where parking slot is a list of 4 coordinates,
-  and coordinate is a list of 2 numbers (`x`, `y`).
+To build the project run the following commands:
 
-## JSON formatted *plan*
-The following properties are expected to extend *scenario* properties:
-- `goal`: list of 3 numbers (`x`, `y`, `heading`).
-- `goals`: list of possible goals `[(x, y, h), ...]`.
-- `path`: list of poses, where pose is list of 3 numbers (`x`, `y`, `heading`).
+    mkdir build
+    cd build
+    cmake ../
+    make
 
-## JSON formatted *stats*
-The following are expected in the output along with *plan*:
-- `time`: elapsed time.
-- `iterations`: number of iterations of algorithm.
-- `cost`: path cost.
-- `cusps-in-path`: the number of nodes with direction change in path.
-- `connecteds-in-path`: the number of nodes almost same (connected) in path.
-- `nodes`: overall number of nodes.
+To build with ninja:
 
-## Test files
-There is a list of test files and what they include:
-- `test14.cc`: cute, grid, RS-heur, dijkstra (`ce9`).
-- `test13.cc`: cute, grid, RS-RS, dijkstra (`ce8`).
-- `test12.cc`: cute collision, grid structure, RS for both -- build and search
-  cost (`ce6`).
-- `test11.cc`: cute collision, grid structure, RS for build, Matej's heuristics
-  for search cost (`ce4`).
-- `test10.cc`: use [behavior tree][].
-- `test9.cc`: cute collision, grid structure, RS for build, Euclidean for
-  search, path optimization (`ce7`).
-- `test8.cc`: cute collision, grid structure, RS for build, Euclidean for
-  search (`ce5`).
-- `test7.cc`: pure RRT\* run in 1 second interval multiple times.
-- `test6.cc`: cute collision, Reeds and Shepp for both -- build and search
-  cost (`ce3`).
-- `test5.cc`: cute collision, Reeds and Shepp for build cost, Euclidean
-  distance for search cost (`ce2`).
-- `test4.cc`: cute collision, Reeds and Shepp for build cost, Matej's
-  heuristics for search cost (`ce1`).
-- `test3.cc`: RRT\* with [cute c2][] library for collision detection.
-- `test2.cc`: rapidly-exploring random tree star.
-- `test1.cc`: parking slot planner.
-- `test-template.cc`: template for tests.
+    mkdir build
+    cd build
+    cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../
+    ninja -v
 
-[cute c2]: https://github.com/RandyGaul/cute_headers/blob/master/cute_c2.h
-[behavior tree]: https://github.com/arvidsson/BrainTree
+Scenarios
+=========
 
-# Contribute
-Use [OneFlow][3] branching model and keep the [changelog][4].
+All the scenarios are in the directories named `scenarios-*`. Each scenario
+contains at least `init`, `slot`, and the list of `obst`acles.
 
-Write [great git commit messages][5]:
-1. Separate subject from body with a blank line.
-2. Limit the subject line to 50 characters.
-3. Capitalize the subject line.
-4. Do not end the subject line with a period.
-5. Use the imperative mood in the subject line.
-6. Wrap the body at 72 characters.
-7. Use the body to explain what and why vs. how.
+Tests
+=====
 
-When adding feature or hotfix, use [Test-driven development (TDD)][2]:
-1. Add tests to `ut` folder, add methods declaration, basic structure.
-2. Run tests (just `make` in `build` folder), check that tests *fail*.
-3. Implement functionality.
-4. Run tests, check that tests *pass*.
-5. Refactor.
+Tests are build from within the cmake file. Tests are named `testN` where `N` is
+the test's identifier. All tests expects JSON fromatted scenario on standard
+input and outputs JSON that can vary, but at minimum contains `goal` computed
+for the parking `slot`, `path` from `init` to `goal` that avoid `obst`acles, if
+such a path exists, `goal_cc` (cumulative cost), and elapsed `time`.
 
-[2]: https://en.wikipedia.org/wiki/Test-driven_development
-[3]: https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow
-[4]: ./CHANGELOG.md
-[5]: https://chris.beams.io/posts/git-commit/
+Input and/or otput of the tests can be plotted with
+`plot_json_objects_scenario.py` script.
 
-# Documentation
-The documentation is generated by Doxygen, at least version `1.8.15` is needed.
-Just run `doxygen` in the project root directory.
+`src/` directory contains templates used to build tests.