Skip to content

Manohara-Ai/Military_Drones

Repository files navigation

Military Drones Simulation

Simulation setup for multi-drone surveillance using ROS 2 and the Gazebo simulator.


Workspace Structure Assumption

This project assumes the following ROS 2 workspace layout:

~/ros2_ws/
├── src/
│   └── Military_Drones/
├── build/
├── install/
└── log/

If you do not already have a workspace:

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws
colcon build

Included packages

  • military_drones_description - URDF/SDF drone models and mesh files.

  • military_drones_gazebo - Gazebo Sim plugins and world configurations.

  • military_drones_application - Holds ros2 specific code and configurations.

  • military_drones_bringup - Holds launch files and high level utilities.


System Requirements

Component Version
OS Ubuntu 22.04 LTS
ROS 2 Humble Hawksbill
Gazebo Harmonic (8.10.0)
Python 3.10.x

Using other versions may require modifications.


Installation

1. Clone Repository (Inside src/)

cd ~/ros2_ws/src
git clone https://github.com/Manohara-Ai/Military_Drones

2. Install ROS 2 Dependencies

All commands below must be run from the workspace root:

cd ~/ros2_ws
source /opt/ros/humble/setup.bash

Initialize rosdep (only once per system):

sudo rosdep init
rosdep update

Install dependencies:

rosdep install --from-paths src --ignore-src -r -i -y --rosdistro humble

3. Install Build Tools

sudo apt update
sudo apt install -y python3-colcon-common-extensions

4. Gazebo Harmonic Configuration

ROS 2 Humble does not default to Gazebo Harmonic.

Ensure Gazebo Harmonic is installed.

Export the version before building or launching:

export GZ_VERSION=harmonic

(Optional) Add to your ~/.bashrc:

echo "export GZ_VERSION=harmonic" >> ~/.bashrc

Build Instructions

cd ~/ros2_ws
source /opt/ros/humble/setup.bash
colcon build

If build issues occur:

cd ~/ros2_ws
rm -rf build/ install/ log/
colcon build

Source the Workspace

Every new terminal must run:

cd ~/ros2_ws
source /opt/ros/humble/setup.bash
source install/setup.bash

(Optional) Add to ~/.bashrc:

echo -e "source /opt/ros/humble/setup.bash\nsource ~/ros2_ws/install/setup.bash" >> ~/.bashrc

Running the Simulation

Launch Gazebo Simulation

ros2 launch military_drones_bringup military_drones.launch.py

Launch with RVIZ

ros2 launch military_drones_bringup military_drones.launch.py rviz:=true

Development Workflow

After modifying any package:

cd ~/ros2_ws
colcon build
source install/setup.bash

Known Issue: Gazebo Hanging at "Requesting world names"

Gazebo may hang at:

Requesting world names

Possible causes:

  • Stale build artifacts
  • Plugin load timing issue
  • Corrupted install space

Recommended fix:

cd ~/ros2_ws
rm -rf build/ install/ log/
colcon build
source install/setup.bash

Then relaunch the simulation.


Contributing

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/AmazingFeature
  3. Commit changes:
    git commit -m "Add AmazingFeature"
  4. Push branch:
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Authors

Developed by Manohara & Vibhashree.


About

A ROS 2 Humble + Gazebo Harmonic based drone surveillance simulation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors