]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blobdiff - README.md
Fix private member name
[hubacji1/iamcar2.git] / README.md
index 1aee69e617cee9533cb11b1ee2e5163bfbb0ec52..6d550704dfe5fa68c463a8a0ad406e309677c503 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,75 +1,43 @@
-# 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
-```
+Build
+-----
 
-## Required libraries
-- `libjsoncpp-dev`
-- `libpsp` (depends on `libbcar`, `libpslot`)
-- `librrts` (depends on `libbcar`)
+To build the project run the following commands:
 
-# 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.
+    mkdir build
+    cd build
+    cmake ../
+    make
 
-## 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 with ninja:
 
-## JSON formatted *plan*
-The following properties are expected to extend *scenario* properties:
-- `goal`: list of 3 numbers (`x`, `y`, `heading`).
-- `path`: list of poses, where pose is list of 3 numbers (`x`, `y`, `heading`).
-- `time`: elapsed time.
-- `cost`: path cost.
+    mkdir build
+    cd build
+    cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../
+    ninja -v
 
-## Test files
-There is a list of test files and what they include:
-- `test-template.cc`: template for tests.
+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.