Giter VIP home page Giter VIP logo

cs-776-drone-swarm's Introduction

Drone Swarm Coordination

Develop a simulation system to coordinate and control a swarm of drones for various applications. The project could include:

  • Creating algorithms for formation flying
  • Creating algorithms for synchronized movements
  • Collaborative tasks
  • Obstacle detection and avoidance system within the drone swarm

Tentative 14-week timeline

  • Weeks 1-2: Project Planning, Research, and System Architecture Design
    • Define project scope, objectives, and requirements.
    • Research existing drone coordination systems, algorithms, and technologies.
    • Identify the specific features and functionalities to be implemented.
  • Weeks 3-4: System Architecture Design
    • Design the overall system architecture, including communication protocols and data flow.
    • Specify the components of the system and their interactions.
    • Consider the integration of simulation tools for testing.
  • Weeks 5-6: Algorithm Design and Prototyping
    • Develop algorithms for formation flying, synchronized movements, and collaborative tasks.
    • Create prototypes for individual coordination algorithms.
    • Begin testing algorithms in a simplified environment.
  • Weeks 7-8: Simulation Environment Setup
    • Choose and set up a suitable drone simulation environment (e.g., Gazebo, AirSim, or custom Python-based simulation).
    • Integrate the developed algorithms into the simulation environment.
    • Begin testing coordination algorithms within the simulated environment.
  • Weeks 9-10: Advanced Features Implementation
    • Implement additional features, such as obstacle avoidance, energy optimization, fault tolerance, and adaptive communication protocols.
    • Integrate these features into the simulation environment.
    • Test the coordinated behavior of the drone swarm with the new features.
  • Weeks 11-12: Testing and Optimization
    • Conduct thorough testing of the entire system in the simulated environment.
    • Identify and address any performance bottlenecks or issues.
    • Optimize algorithms and system components for efficiency and reliability.
  • Weeks 13-14: Integration, Documentation, and Demo Preparation
    • Integrate all components of the Drone Swarm Coordination system.
    • Document the system architecture, algorithms, and key design decisions.
    • Prepare a demo showcasing the coordinated behavior of the drone swarm.
    • Practice and refine the demo for the final presentation.
  • Week 14: Demo and Presentation
    • Conduct the final demo of the Drone Swarm Coordination system.
    • Present the project, highlighting key features, challenges faced, and lessons learned.
    • Submit any required documentation or project reports.

Reading List

Non-exhaustive list of readings that may help with the project.

cs-776-drone-swarm's People

Contributors

carrliitos avatar johnvolkers711 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

cs-776-drone-swarm's Issues

Implement Object Detection for Multi-Drone System

This task involves implementing object detection functionality for a multi-drone system, allowing the drones to detect and avoid obstacles in their shared environment. Object detection will require integrating sensor data (e.g., lidar, camera) into the DroneController class and implementing algorithms to recognize and classify objects for all drones in the system.

Tasks:

  1. Research and Design: Research object detection techniques for multi-drone systems and design an algorithm for implementing object detection in the DroneController class for each drone.
  2. Implementation: Write the code to implement object detection for the multi-drone system, using sensor data to detect objects and classify them for each drone.
  3. Testing: Test the object detection functionality in the Webots simulation environment to ensure that the drones can detect obstacles accurately and avoid collisions.
  4. Refinement: Fine-tune the object detection algorithm to improve its accuracy and reliability in a multi-drone system.

Acceptance Criteria:

  • The object detection system should allow each drone in the multi-drone system to detect obstacles and avoid collisions.
  • The drones should be able to navigate around obstacles smoothly and without colliding with each other or other objects.

Document Hovering Algorithm

This task involves documenting the algorithm used for drone hovering in the DroneController class. The documentation should include detailed explanations of the algorithm's logic, the role of each variable, and how it contributes to stabilizing the drone's vertical position.

Tasks:

  1. Algorithm Explanation: Provide a detailed explanation of how the hovering algorithm works, including the basic principles behind drone stabilization and the specific techniques used in this implementation.
  2. Variable Descriptions: Describe the purpose and significance of each variable used in the algorithm, such as K_VERTICAL_THRUST, K_VERTICAL_OFFSET, and K_VERTICAL_P.
  3. Code Comments: Add comments to the DroneController class code to explain the implementation of the hovering algorithm and make it easier for others to understand.
  4. Usage Instructions: Provide instructions on how to use the hovering algorithm in the context of the DroneController class, including any required initialization or setup steps.

Acceptance Criteria:

  • The documentation should be clear, concise, and easy to understand for team members who may need to work with or modify the hovering algorithm in the future.
  • The comments added to the code should provide sufficient explanation of the algorithm's implementation and logic.

Implement Collision Avoidance

Completion of task #12 is required before implementing this functionality.

This task involves implementing collision avoidance functionality for the drone to detect and avoid obstacles in its path. Collision avoidance will require integrating sensor data (e.g., lidar, ultrasonic) into the DroneController class and implementing algorithms to navigate around obstacles.

Tasks:

  1. Research and Design: Research collision avoidance techniques for drones and design an algorithm for implementing collision avoidance in the DroneController class.
  2. Implementation: Write the code to implement collision avoidance, using sensor data to detect obstacles and adjust the drone's path to avoid collisions.
  3. Testing: Test the collision avoidance functionality in the Webots simulation environment to ensure the drone can navigate around obstacles effectively.
  4. Refinement: Fine-tune the collision avoidance algorithm to improve its effectiveness and reliability.

Acceptance Criteria:

  • The drone should be able to detect obstacles and adjust its path to avoid collisions.
  • Collision avoidance should work reliably in various scenarios and environments.

Test cases are creating a new directory outside of `src`

The test cases that are currently ran using mvn commands are creating a new directory called nonexistent-directory outside of src.

drwxrwxr-x 7 carlitos carlitos 4096 Apr  8 22:58 .
drwxrwxr-x 5 carlitos carlitos 4096 Apr  8 22:50 ..
drwxrwxr-x 4 carlitos carlitos 4096 Apr  6 21:51 documentation
drwxrwsr-x 8 carlitos carlitos 4096 Apr  8 22:48 .git
-rw-rw-r-- 1 carlitos carlitos 3480 Apr  6 21:51 .gitignore
drwxrwxr-x 2 carlitos carlitos 4096 Apr  8 22:58 nonexistent-directory    <--- This directory
-rw-rw-r-- 1 carlitos carlitos 5537 Apr  6 21:51 notes.txt
-rw-rw-r-- 1 carlitos carlitos 2772 Apr  6 22:19 pom.xml
-rw-rw-r-- 1 carlitos carlitos 3698 Apr  6 21:51 README.md
drwxrwxr-x 4 carlitos carlitos 4096 Apr  6 21:51 src
drwxrwxr-x 8 carlitos carlitos 4096 Apr  8 22:58 target
carlitos@PC:~/Documents/Projects/Java/cs-776-drone-swarm$ 

Implement Collision Avoidance for Multi-Drone System

Completion of task #19 is required before implementing this functionality.

This task involves implementing collision avoidance functionality for a multi-drone system, allowing the drones to detect and avoid collisions with each other. Collision avoidance will require integrating sensor data (e.g., lidar, ultrasonic) into the DroneController class and implementing algorithms to navigate around other drones.

Tasks:

  1. Research and Design: Research collision avoidance techniques for multi-drone systems and design an algorithm for implementing collision avoidance in the DroneController class.
  2. Implementation: Write the code to implement collision avoidance for the multi-drone system, using sensor data to detect other drones and adjust the drone's path to avoid collisions.
  3. Testing: Test the collision avoidance functionality in the Webots simulation environment to ensure that the drones can avoid collisions with each other effectively.
  4. Refinement: Fine-tune the collision avoidance algorithm to improve its effectiveness and reliability in a multi-drone system.

Acceptance Criteria:

  • The collision avoidance system should allow the drones to detect and avoid collisions with each other.
  • The drones should be able to navigate around each other smoothly and without colliding.

Possible Test Cases for `DroneController` class.

Discussed in #31

Originally posted by carrliitos April 7, 2024
Here are 18 test case ideas for the DroneController class:

  • Test that all motors are initialized correctly.
  • Test that the LED states alternate correctly.
  • Test that the clamp method clamps values correctly.
  • Test that the GPS values are read correctly.
  • Test that the gyro values are read correctly.
  • Test that the CSV files are created and written to correctly.
  • Test that the RealTimeDataApp is initialized correctly.
  • Test that the position headers are set correctly.
  • Test that the input headers are set correctly.
  • Test that the drone lifts off when the vertical thrust is applied.
  • Test that the drone moves in the correct direction when roll and pitch inputs are applied.
  • Test that the drone rotates correctly when yaw input is applied.
  • Test that the drone maintains altitude when position control adjustments are applied.
  • Test that the drone's actuators are activated correctly.
  • Test that the welcome message is displayed correctly.
  • Test that the drone blinks LEDs correctly.
  • Test that the drone computes inputs correctly.
  • Test that the drone's position data is visualized correctly.

Implement Synchronization Mechanism for Multi-Drone System

This task involves implementing a synchronization mechanism that allows two drones to synchronize their actions, such as starting and stopping movement at the same time. The synchronization mechanism should ensure that both drones are in sync and coordinate their actions effectively.

Tasks:

  1. Research and Design: Research synchronization mechanisms for multi-drone systems and design a mechanism suitable for synchronizing actions between two drones.
  2. Implementation: Write the code to implement the synchronization mechanism in the DroneController class for both drones, including mechanisms for starting, stopping, and coordinating movement.
  3. Testing: Test the synchronization mechanism in the Webots simulation environment to ensure that the drones can synchronize their actions effectively.
  4. Refinement: Fine-tune the synchronization mechanism to improve its reliability and precision in coordinating actions between the drones.

Acceptance Criteria:

  • The synchronization mechanism should allow two drones to synchronize their actions, such as starting and stopping movement, effectively.
  • The drones should be able to coordinate their actions smoothly and without delays.

Implement Point-and-Click Navigation

Completion of task #9 is required before implementing this functionality. Essentially, this is an improvement of the keyboard movement.

This task involves implementing point-and-click navigation functionality for the drone to move to a specified point on the environment by clicking on a location. Point-and-click navigation will require integrating mouse input into the DroneController class and implementing algorithms to translate the clicked position into movement commands for the drone.

Tasks:

  1. Research and Design: Research point-and-click navigation techniques for drones and design an algorithm for implementing point-and-click navigation in the DroneController class.
  2. Implementation: Write the code to implement point-and-click navigation, using mouse input to determine the target position and calculating the drone's movement commands to reach that position.
  3. Testing: Test the point-and-click navigation functionality in the Webots simulation environment to ensure the drone can move to the specified point accurately.
  4. Refinement: Fine-tune the point-and-click navigation algorithm to improve its accuracy and responsiveness.

Acceptance Criteria:

  • The drone should be able to move to a specified point on the environment accurately by clicking on that point.
  • Point-and-click navigation should work reliably in various scenarios and environments.

Implement Communication Protocol for Multi-Drone Interaction

This task involves implementing a communication protocol that allows two drones to communicate and coordinate their actions. The protocol should enable the drones to share information such as position, velocity, and commands, allowing them to work together effectively.

Tasks:

  1. Research and Design: Research communication protocols for multi-drone systems and design a protocol suitable for coordinating actions between two drones.
  2. Implementation: Write the code to implement the communication protocol in the DroneController class for both drones, including message formatting and parsing.
  3. Testing: Test the communication protocol in the Webots simulation environment to ensure that the drones can exchange information and coordinate their actions.
  4. Refinement: Fine-tune the communication protocol to improve its reliability and efficiency.

Acceptance Criteria:

  • The communication protocol should allow two drones to exchange information such as position, velocity, and commands.
  • The drones should be able to use the communication protocol to coordinate their actions, such as avoiding collisions or performing synchronized maneuvers.

Convert project to Maven Project

We currently have a Java project that is not managed with Maven. We would like to convert this project to a Maven project to take advantage of Maven's dependency management and build capabilities. This will help streamline our development process and improve project maintainability.

Implement Basic Movement Functionality

The goal of this task is to implement basic movement functionality for the drone, including forward, backward, left, and right movements. This will involve adjusting the thrust of the propellers to generate the desired movement without losing stability.

Tasks:

  1. Research and Design: For the purposes of this task, implement keyboard movements
  2. Implementation: Write the code to implement basic movement controls in the DroneController class, allowing the drone to move in different directions.
  3. Testing: Test the movement functionality in the Webots simulation environment to ensure the drone can move as expected without losing stability.
  4. Refinement:

Acceptance Criteria:

  • The drone should be able to move forward, backward, left, and right smoothly and without losing stability.
  • The movement should be simple and efficient, ensuring the drone responds accurately to control inputs.

Implement Altitude Control

This task involves implementing altitude control for the drone to maintain a constant altitude while moving. Altitude control will require integrating sensor data (e.g., barometer) into the DroneController class and implementing algorithms to adjust the drone's thrust to maintain the desired altitude.

Webots Sensors List

Tasks:

  1. Research and Design: Research altitude control techniques for drones and design an algorithm for implementing altitude control in the DroneController class.
  2. Implementation: Write the code to implement altitude control, using sensor data to adjust the drone's thrust to maintain the desired altitude.
  3. Testing: Test the altitude control functionality in the Webots simulation environment to ensure the drone can maintain a constant altitude while moving.
  4. Refinement: Fine-tune the altitude control algorithm to improve its responsiveness and stability.

Acceptance Criteria:

  • The drone should be able to maintain a constant altitude while moving in various directions.
  • Altitude control should be stable and responsive to changes in altitude.

Test Cases

Here are 18 test case ideas for the DroneController class:

  • Test that all motors are initialized correctly.
  • Test that the LED states alternate correctly.
  • Test that the clamp method clamps values correctly.
  • Test that the GPS values are read correctly.
  • Test that the gyro values are read correctly.
  • Test that the CSV files are created and written to correctly.
  • Test that the RealTimeDataApp is initialized correctly.
  • Test that the position headers are set correctly.
  • Test that the input headers are set correctly.
  • Test that the drone lifts off when the vertical thrust is applied.
  • Test that the drone moves in the correct direction when roll and pitch inputs are applied.
  • Test that the drone rotates correctly when yaw input is applied.
  • Test that the drone maintains altitude when position control adjustments are applied.
  • Test that the drone's actuators are activated correctly.
  • Test that the welcome message is displayed correctly.
  • Test that the drone blinks LEDs correctly.
  • Test that the drone computes inputs correctly.
  • Test that the drone's position data is visualized correctly.

Implement Waypoint Navigation

Completion of task #12 is required before implementing this functionality.

This task involves implementing waypoint navigation for the drone to follow a predefined path or set of waypoints. Waypoint navigation will require integrating GPS data into the DroneController class and implementing algorithms to navigate to each waypoint in the correct sequence.

Tasks:

  1. Research and Design: Research waypoint navigation techniques for drones and design an algorithm for implementing waypoint navigation in the DroneController class.
  2. Implementation: Write the code to implement waypoint navigation, using GPS data to navigate to each waypoint in the correct sequence.
  3. Testing: Test the waypoint navigation functionality in the Webots simulation environment to ensure the drone can follow the predefined path accurately.
  4. Refinement: Fine-tune the waypoint navigation algorithm to improve its accuracy and reliability.

Acceptance Criteria:

  • The drone should be able to follow a predefined path or set of waypoints accurately and reliably.
  • Waypoint navigation should work in various environments and scenarios.

Possible Test Cases for `CsvWriter` class.

Discussed in #32

Originally posted by carrliitos April 7, 2024

  • Test that the CsvWriter initializes a FileWriter correctly when given a valid output file path.
  • Test that the CsvWriter throws an IOException when given an invalid output file path.
  • Test that writeHeaders() correctly writes the headers to the CSV file.
  • Test that writeData() correctly writes the data array to the CSV file.
  • Test that the close() method successfully closes the FileWriter and releases any resources, such as file locks, associated with it. This can be verified by attempting to write to the file after closing it and ensuring that it throws an IOException or that the write operation fails in some expected way.

Tune PID Constants for Drone Hovering

Once the basic hovering functionality is implemented (#6), this next task involves experimenting with different PID constants (K_VERTICAL_P, K_ROLL_P, K_PITCH_P) in the drone's controller to achieve stable hovering. PID (Proportional-Integral-Derivative) control is used to adjust the drone's thrust based on the error between the desired and actual positions. Once the basic hovering functionality is implemented, the focus shifts to optimizing the drone's behavior by adjusting these constants. The goal is to reduce oscillations, improve responsiveness, and achieve smoother hovering.

Tasks:

  1. Research and Analysis: Research the effects of PID constants on drone stability and analyze the current values in the DroneController class.
  2. Parameter Adjustment: Modify the PID constants in the DroneController class to improve hovering performance.
  3. Testing: Test the drone's hovering behavior in the Webots simulation environment after adjusting the PID constants.
  4. Evaluation: Evaluate the performance of the drone with different PID constants and compare the results to determine the optimal values.

Acceptance Criteria:

  • The drone should be able to hover in place with minimal oscillations and maintain a stable altitude.
  • The tuned PID constants should provide smooth and responsive control of the drone's vertical position.

Integrate PID Control for Movement

Task #9 must be completed before this task.

This task involves integrating PID control for movement (e.g., forward, backward, left, right) into the DroneController class to improve the drone's movement stability and responsiveness. PID control will adjust the drone's thrust based on the error between the desired and actual movement directions.

Tasks:

  1. Research and Design: Research PID control for drone movement and design an algorithm to integrate PID control for movement into the DroneController class.
  2. Implementation: Write the code to implement PID control for movement, using the drone's sensors to calculate the error and adjust the motor commands.
  3. Testing: Test the drone's movement stability and responsiveness with PID control in the Webots simulation environment.
  4. Refinement: Fine-tune the PID parameters (if necessary) to improve the drone's movement performance.

Acceptance Criteria:

  • The drone should be able to move smoothly and accurately in the desired direction with PID control.
  • PID control should improve the drone's ability to maintain stability while moving.

Implement Object Detection

This task involves implementing object detection functionality for the drone to detect objects in its surroundings. Object detection will require integrating sensor data (e.g., lidar, camera) into the DroneController class and implementing algorithms to recognize and classify objects.

Tasks:

  1. Research and Design: Research object detection techniques for drones and design an algorithm for implementing object detection in the DroneController class.
  2. Implementation: Write the code to implement object detection, using sensor data to detect objects and classify them.
  3. Testing: Test the object detection functionality in the Webots simulation environment to ensure the drone can detect objects accurately.
  4. Refinement: Fine-tune the object detection algorithm to improve its accuracy and reliability.

Acceptance Criteria:

  • The drone should be able to detect objects in its surroundings and classify them accurately.
  • Object detection should work reliably in various scenarios and environments.

Implement Basic Hover Functionality

The goal of this task is to implement a basic algorithm to stabilize the drone's vertical position, allowing it to hover in place. The algorithm should use the drone's sensors (IMU, GPS) to measure its current position and velocity, and apply appropriate thrust to the propellers to maintain a constant altitude.

Tasks:

  1. Research and Design: Research existing algorithms for drone hovering and design a simple algorithm suitable for our drone simulator.
  2. Implementation: Write the code to implement the hovering algorithm in the DroneController class.
  3. Testing: Test the hover functionality in the Webots simulation environment to ensure the drone can maintain a stable altitude.
  4. Refinement: Fine-tune the algorithm and adjust parameters (e.g., K_VERTICAL_THRUST, K_VERTICAL_OFFSET) for better performance if necessary.

Acceptance Criteria:

  • The drone should be able to hover in place at a specified altitude without drifting.
  • The hovering algorithm should be stable and not cause the drone to oscillate or lose altitude over time.

Implement Logging Instead of System.out.println() for Improved Debugging and Maintenance

This task involves replacing the use of System.out.println() statements with a proper logging framework to improve the debugging and maintenance of the codebase. Logging allows for more flexible and configurable output, making it easier to track the execution flow and identify issues in the code.

Tasks:

  1. Choose Logging Framework: Research and choose a suitable logging framework for the project, such as Log4j, SLF4J, or java.util.logging.
  2. Integrate Logging Framework: Modify the DroneController class to use the chosen logging framework instead of System.out.println() statements.
  3. Replace Print Statements: Replace all System.out.println() statements with appropriate logging statements, such as logger.info() or logger.debug().
  4. Configure Logging: Configure the logging framework to output logs to the console and/or log files, and set the desired log level (e.g., INFO, DEBUG, ERROR).
  5. Test Logging: Test the logging functionality in the Webots simulation environment to ensure that logs are generated correctly and contain relevant information.
  6. Update Documentation: Update any relevant documentation or README files to reflect the use of the new logging framework for debugging and maintenance purposes.

Acceptance Criteria:

  • All System.out.println() statements have been replaced with appropriate logging statements.
  • Logs are generated correctly and provide relevant information for debugging and maintenance purposes.
  • The logging framework is properly configured and integrated into the project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.