This repository contains a ROS2 package for simulating an ArduPilot Iris drone in Gazebo Classic. The setup is built using ROS2 Humble and is integrated with SLAM for autonomous navigation and mapping.
- Drone Simulation: Simulates the ArduPilot Iris drone in Gazebo Classic.
- ROS2 Humble Integration: Fully compatible with ROS2 Humble.
- SLAM Integration: Incorporates SLAM algorithms for real-time mapping and localization.
Before running the simulation, ensure you have the following installed:
- ROS2 Humble: Follow the official installation guide.
- Gazebo Classic: Install Gazebo Classic as described here.
- ArduPilot: Set up ArduPilot following the official documentation.
Make sure you have installed ardupilot_gazebo and ardupilot :
ardupilot_gazebo
ArduPilot
Clone this repository into your ROS2 workspace:
cd ~/ros2_ws/src
git clone https://github.com/your-username/iris_drone.git
cd ~/ros2_ws
colcon build
Set environment variables:
echo 'source $HOME/ardupilot/Tools/completion/completion.bash' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/ardupilot/Tools/autotest' >> ~/.bashrc
echo 'export GAZEBO_MODEL_PATH=~/ros2_ws/src/iris_drone/models' >> ~/.bashrc
echo 'export GAZEBO_RESOURCE_PATH=~/ros2_ws/src/iris_drone/worlds:${GAZEBO_RESOURCE_PATH}' >> ~/.bashrc
-
Launch the Simulation: Navigate to your workspace and source the setup file:
cd ~/ros2_ws source install/setup.bash
Then, launch the simulation:
ros2 launch iris_drone iris.launch.py
-
Control the Drone: You can control the drone using ROS2 topics or integrate your SLAM package to enable autonomous navigation.
This package is designed to work seamlessly with various SLAM algorithms. To integrate SLAM:
- Launch your SLAM node alongside the drone simulation.
- Ensure the SLAM node subscribes to the appropriate topics (e.g., /odom, /scan).
- Adjust the parameters as necessary for optimal performance.
- ArduPilot: For providing a powerful and flexible open-source platform for drone control and simulation.
- Gazebo Simulator: For offering a robust simulation environment that allows for realistic testing of robotic systems.
- ROS2: For enabling seamless integration of robotics software, making complex robot applications more accessible.
- SLAM Community: For continuous contributions to the development of SLAM algorithms that enhance autonomous navigation capabilities.