The future of robotics development, including drones, is powerful simulation, which makes it possible to achieve faster development and better performance by reducing the "trial and error" process of testing everything with physical machines. The Dronecode projects have long used a number of powerful drone-specific simulators, including both "hardware-in-the-loop" (HITL) and "software-in-the-loop" (SITL) programs.
But as drone simulation goes beyond simply simulating the drone itself and extends to simulating an entire robotic system, including swarming, pathfinding, environmental awareness and autonomous mapping and navigation without GPS, you need even more powerful tools.
The gold standard for advanced robotics simulation is the ROS/Gazebo package, which is now supported by ArduPilot as part of the Dronecode project (ROS is the Robot Operating System, created by the Open Source Robotics Foundation, which is part of Dronecode).
The APM Dev wiki now has a great page on how to use it. Here's a sample, but click through for the whole thing.
ROS and Gazebo are a well-known and respected robotics framework and simulator:
- The ROS framework contains many “packets” of software for performing robotics tasks. It allows you to model the environment (including indoor environments with walls, doors etc) and run your own control algorithms for autonomous flight.
- Gazebo supports several different Copter models (at time of writing there are 6 URDF models in the rotors_simulator package). These can be extended to include support for additional sensors and other behaviours.
Tip:The ROS/Gazebo is particularly useful for defining autonomous indoor flights.This article shows how you can replace the default SITL Copter simulation with one supplied by Gazebo and control the autopilot using the ROS framework (instead of Mavproxy or some other Ground Control System).
An architectural overview of how ROS/Gazebo integrate with SITL is shown below:

Comments
Hello Chris,
Now the ArduCopter has been supported for HILS test?
Thanks
This thread is a bit old now but...
I am researching what our options are for building an autonomous rover. I am trying to reduce our workload and and avoiding writing anything from a blank page as much as possible.
Currently I am thinking a combination of Ardupilot and ROS is the best way to go as I have a functioning pixhawk used to build a quad. We are going to adapt it to our rover vehicle and use Ardurover assuming this is the best choice.
I would also like to make use of some ROS packages.
This link you provided for architectural overview of how ROS/Gazebo integrate with SITL is now dead. It is something I would like to look at if I could.
Cheers
Alex
Great!
Great stuff! Thanks for sharing Chris!