This GitHub page contains solutions to Project N°1 of the Distributed Autonomous Systems course.
In this task our goal is to compute the backpropagation of a Neural Network to solve a basic classification problem, but in a Distributed framework where more than a NN concur to
correctly identify the chosen digit.
Starting from the well known MNIST dataset, we developed from scratch a Neural Network able to solve the classification problem of digits given in input with an accuracy of more than 98%. The NN structure is shown in the figure below:
The basic problem has been solved using first a single NN as done in common. Then, we moved forward introducing the distributed framework (by using a communication graph) and solving the task by using
the distributed gradient tracking to reach consensus among several agents, where each one should train its own Neural Network.
The executable single_neural_network.py contains the single NN, whereas distributed_neural_network.py implements the
distributed gradient tracking simulating N different neural networks trying to reach consensus.
In-depth results may be seen in the first chapter of report.
The second part of the project, deals with a formation control of an arbitrary number of agents. First, we have to define the shape that the agents should maintain, then we have to compute appropriate control actions to make it possible.
Here a sample video of the result, agents follow the word 'DAS':
formation_DAS.-.Trim.mp4
This kind of problem distinguish between two type of agents: leaders and followers. Leaders motion are always pre-determined, instead followers implement time-varying control actions to follow the leaders and maintain the formation.
Several possibilities have been handled: integral action, time-varying leaders position, different agents formations, etc
Everything can be chosen by changing a global variable before running the simualtion.
The model formulation is taken from our reference [1] and a deeper discussion on our decisions is in the second chapter of the report.
In order to run this part of the code, it is necessary to have installed ROS2-foxy on your computer. Type the following command to source ROS2 (consider to add it to ~/.bashrc)
source /opt/ros/foxy/setup.bash
Then go inside the package folder and build it using
cd ~/Formation_Control_task/Formation_Control_task_ROS2
colcon build
If you want to make changes at the code without compiling it again use the following command instead
colcon build --symlink-install
After compiling it, let's source the install folder
source install/setup.bash
Finally, if you want to launch the simple formation just use
ros2 launch formation_control_task formations.launch.py
If you want to launch the word formation instead use
ros2 launch formation_control_task formations_letters.launch.py
NB In both launch files there are some global parameters to change, like integral action, leaders moving or not, which formation you want to perform, ecc..
Student | |
---|---|
Alessandro Cecconi | |
Marco Bugo | |
Roman Sudin |
[1] S. Zhao and D. Zelazo, “Translational and scaling formation maneuver control via a bearing-based approach,” IEEE Transactions on Control of Network Systems, vol. 4, no. 3, pp. 429–438, 2015. Link of the paper