The Software Subdivision is responsible for making Matsya Autonomous! The software stack
is written majorly in C,
C++ and Python. The main packages in the software stack include drivers, localisation,
controller, navigator, simulator,
state machine, mission planner, vision and acoustics, all of which have been written
from scratch with the help of
libraries such as Robot Operating System (ROS) for inter-process communication
and OpenCV for image processing.
All these packages combined provide autonomous capabilities to the vehicle, making it
capable of taking its own decisions. The overall architecture of the stack is highly
object-oriented and majorly independent of the vehicles. The code
conforms to the LLVM standard and PEP 8 style guide, supported by inbuilt tests and
extensive documentation. The tasks and environment are simulated in Gazebo to
test any code we write. Post testing in the simulator, another important task for the
subdivision is real-life testing, where the code is physically tested on the vehicle
in-water. Thus, the main aim of the software subdivision is to write software that is
generic and error-free, in order to get the vehicles working at their full potential.
Controller and Navigator
This module is responsible for autonomous control of the vehicle's motion. The
Controller is responsible for the vehicle achieving
given positions and velocities in all 6 Degrees Of Freedom using feedback from
localization. The controller uses a PID
Controller (Proportional-Integral-Derivative) and an allocator which divides the forces
among our thrusters. We are currently working
on more advanced Optimal Control Laws and Improved Modelling of Vehicle’s Dynamics.
The Navigator helps our vehicle traverse the pool via complex paths. It features an
Artificial Potential Fields Based Obstacle
Avoidance and Trajectory Following Algorithms. It is responsible for commanding the
required positions and velocities from the controller.
This module allows our vehicle to navigate complex underwater environments.