Skip to content

Commit 80d16b6

Browse files
committed
update readme
1 parent 7c0382c commit 80d16b6

File tree

1 file changed

+60
-20
lines changed

1 file changed

+60
-20
lines changed

README.md

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,69 @@
1-
# README #
21

3-
This README would normally document whatever steps are necessary to get your application up and running.
2+
# gmm_coverage #
43

5-
### What is this repository for? ###
4+
65

7-
* Quick summary
8-
* Version
9-
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
6+
This repository contains C++ and Python code to define and handle Gaussian Mixture Models for robots formation control.
107

11-
### How do I get set up? ###
8+
129

13-
* Summary of set up
14-
* Configuration
15-
* Dependencies
16-
* Database configuration
17-
* How to run tests
18-
* Deployment instructions
10+
## What is this repository for? ###
1911

20-
### Contribution guidelines ###
12+
2113

22-
* Writing tests
23-
* Code review
24-
* Other guidelines
14+
* Definition of Gaussian Mixture Models from a polygon drawn on a graphical interface.
15+
* Control software to drive robots towards the region of interest.
2516

26-
### Who do I talk to? ###
17+
2718

28-
* Repo owner or admin
29-
* Other community or team contact
19+
## Requirements ##
20+
21+
### General ###
22+
* Install custom ROS msgs for the definition of Gaussian Mixture Models:
23+
24+
`git clone git@bitbucket.org:mcatellani96/gmm_msgs.git`
25+
26+
27+
### C++ implementation ###
28+
29+
* Install ***SFML*** libray (for further information: https://www.sfml-dev.org/tutorials/2.5/start-linux.php):
30+
31+
`sudo apt-get install libsfml-dev`
32+
33+
### Python implementation ###
34+
* Install ***roipoly*** library for the definition of a region of interest (see https://github.com/jdoepfert/roipoly.py):
35+
`git clone https://github.com/jdoepfert/roipoly.py`
36+
* Install ***scikit-learn*** library for (for further information: https://scikit-learn.org/stable/index.html):
37+
`pip install -U scikit-learn`
38+
39+
40+
41+
42+
## How to use ##
43+
44+
* Launch an empy Gazebo world with desired number of robots spawning in random positions:
45+
46+
`ros2 launch gmm_coverage world_gmm.launch.py`
47+
48+
* Define the region of interest and calculate the Gaussian Mixture Model fitting the desired shape. Left click with the mouse to define a vertex of the polygon, right click to define the last vertex, stop drawing and calculate the Gaussian Mixture Model.
49+
* **Python implementation**
50+
`ros2 run gmm_coverage interface.py`
51+
52+
* **C++ implementation**
53+
`ros2 run gmm_coverage hs_interface`
54+
55+
*Note:* when using the C++ implementation, a warning window may appear. Don't close the window, otherwise the interface will consider the mouse click as the definition of a new vertex.
56+
57+
* Check if the GMM is being published by the interface node on the `/gaussian_mixture_model` topic:
58+
`ros2 topic list`
59+
60+
* Launch control nodes to drive robots:
61+
`ros2 launch gmm_coverage distributed_gmm.launch.py` (1 node for each robot)
62+
or
63+
`ros2 launch gmm_coverage centralized_gmm.launch.py`(1 node controlling every robot)
64+
65+
*Note:* Before launching nodes to control robots, make sure to check that parameters inside the launch file match the number of robots and environment size defined when spawning robots.
66+
67+
68+
A visualization tool is also provided to visualize Gaussian components of the Mixture. Set the `GUI` parameter in the launch file to `True` to launch it together with control nodes. A predefined RViz configuration will be loaded, showing each component as an ellipse colored according to its weight (green for small values, red for high values), and tracking robots during the mission. If you want to launch it separately:
69+
`ros2 run gmm_coverage gmm_visualizer`

0 commit comments

Comments
 (0)