Skip to content

Commit ba21287

Browse files
committed
Updates README and changes name of python binding library
1 parent ac9badc commit ba21287

4 files changed

Lines changed: 54 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ pybind11_add_module(mppi_ca_cpp python_bind/converters.hpp python_bind/converter
7171
target_link_libraries(mppi_ca_cpp PRIVATE xtensor-python Python::NumPy)
7272
target_link_libraries(mppi_ca_cpp PRIVATE controller_library ortools::ortools)
7373

74+
set_target_properties(mppi_ca_cpp PROPERTIES PREFIX "")
75+
set_target_properties(mppi_ca_cpp PROPERTIES OUTPUT_NAME "mppi_ca_cpp")
76+
set_target_properties(mppi_ca_cpp PROPERTIES SUFFIX ".so")
7477

7578
add_custom_target(mppi_all)
7679
add_dependencies(mppi_all

README.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</p>
77

88

9-
Implementation of distributed multi-agent collision avoidance algorithm based on the seminal sampling-based model predictive control algorithm, i.e., _MPPI_ [[1]()], that originally solves a single-agent problem. We enhance it by introducing safe distributions for the multi-agent setting that are derived from the _Optimal Reciprocal Collision Avoidance (ORCA)_ linear constraints [[2]()], an established approach from the multi-agent navigation domain.
9+
Implementation of distributed multi-agent collision avoidance algorithm based on the seminal sampling-based model predictive control algorithm, i.e., _MPPI_ [[1](https://homes.cs.washington.edu/~bboots/files/InformationTheoreticMPC.pdf)], that originally solves a single-agent problem. We enhance it by introducing safe distributions for the multi-agent setting that are derived from the _Optimal Reciprocal Collision Avoidance (ORCA)_ linear constraints [[2](https://gamma.cs.unc.edu/ORCA/publications/ORCA.pdf)], an established approach from the multi-agent navigation domain.
1010

1111

1212
This is supplementary code for paper "Model Predictive Path Integral for Decentralized Multi-Agent Collision Avoidance" which is under consideration in the PeerJ Computer Science journal.
@@ -28,7 +28,7 @@ To build and run the project you can use CMake, CMakeLists.txt file is available
2828

2929
### Prerequisites
3030

31-
- CMake 3.20
31+
- CMake (3.20) and make (4.4.1)
3232
- C++ compiler with C++17 standart support (e.g. GCC 13.2)
3333
- Python 3.11 with next libraries:
3434
- numpy (1.26.3)
@@ -57,12 +57,44 @@ Download current repository to your local machine. Use:
5757

5858
### Build
5959

60-
TODO
60+
Go to the directory with the project and create a subdirectory `build/release`. Go to the new subdirectory.
6161

62+
```bash
63+
mkdir -p build/release
64+
cd build/release
65+
```
66+
67+
Use the CMake and make tools to build the project. You can use the `-j` flag to improve building peroformance, but this may cause errors in case of resource deficit (in this case, it is worth specifying the number of processor cores to build, e.g. `-j4`)
68+
69+
```bash
70+
cmake ../../ -DCMAKE_BUILD_TYPE=Release
71+
make
72+
```
73+
74+
or
75+
76+
```bash
77+
cmake ../../ -DCMAKE_BUILD_TYPE=Release
78+
make -j
79+
```
6280
### Launch an Example
6381

64-
TODO
82+
Go to the example directory and run jupyter noterbook. After that choose `example.ipynb` file and run it.
83+
84+
```bash
85+
cd ../../example
86+
jupyter notebook
87+
```
88+
89+
The notebook contains a circular scenario (see figure below), the size of the circle and the number of agents can be changed by updating variables `CIRC_R` and `AGENTS_NUM`.
90+
91+
```python
92+
CIRC_R = 6 # size of the circle
93+
AGENTS_NUM = 5 # number of agents
94+
```
95+
6596

6697
## References
6798

68-
TODO
99+
1. [Williams, G., Wagener, N., Goldfain, B., Drews, P., Rehg, J. M., Boots, B., and Theodorou, E. A. (2017b). Information theoretic MPC for model-based reinforcement learning. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1714–1721](https://homes.cs.washington.edu/~bboots/files/InformationTheoreticMPC.pdf)
100+
2. [Van Den Berg, J., Guy, S. J., Lin, M., and Manocha, D. (2011). Reciprocal n-body collision avoidance. In Robotics research, pages 3–19.](https://gamma.cs.unc.edu/ORCA/publications/ORCA.pdf)

example/example.ipynb

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

example/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from params_names import *
88
from os.path import dirname
99

10-
sys.path.append(dirname("../build/release/mppi_ca_cpp.cpython-311-x86_64-linux-gnu.so"))
10+
sys.path.append(dirname("../build/release/mppi_ca_cpp.so"))
1111
import mppi_ca_cpp
1212

1313

0 commit comments

Comments
 (0)