LorenzoBalandi / Robot-Formation-Control

Formation control for a multi-agent system in a bidimensional space. Various types of formations available. Implementation in ROS2 Foxy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Robot-Formation-Control

Formation control for a multi-agent system in a bidimensional space. Various types of formations available. The implemented control laws are described in this paper. The approach is a bearing-based one. This project was developed as course project for the course Distributed Autonomous Systems at University of Bologna.

The main files of the project are the launch file, which launchs all the agents as ROS nodes, and the agent_i.py, which is is executed by each agent. The agents are divided into leaders and followers, the system is distributed because each agent uses only information from its neighbors. The communication is described by a fixed graph.

To define the formation type, modify the following line in the launch file:

formation_type = 'square' # <---- modify this to change formation type

Formation types:

  • square <--- square formation, fixed
  • moving_square <--- square formation, leaders move with constant velocity (piecewise constant)
  • letters <--- the agents forms, one, after the other, the letters of the word BALA
  • moving_square_circle <--- square formation, leaders move following circular pattern (TIME-VARYING LEADERS VELOCITY CASE)

To compile and execute:

source /opt/ros/foxy/setup.bash
. install/setup.bash
colcon build && ros2 launch my_bearing_formation bearing_formation.launch.py

Visualization: each simulation will generate a csv file for each agent, by executing the plot_cvs.py file these files are read and the trajectories are plotted using matplotlib. For alle the formation types except letters, also Rviz visualizaion is available during the simulation execution.

Some videos:

square_rviz.mp4
letters_csv.mp4
moving_square_circle_csv.mp4

Further improvements:

  • each agent computes the bearings relative to neighbors only
  • the uniqueness of the formation is verified in a reliable way also in the letters case
  • control with integral action

About

Formation control for a multi-agent system in a bidimensional space. Various types of formations available. Implementation in ROS2 Foxy.


Languages

Language:Python 100.0%