Simulation

Gazebo Simulation Environment

Since we will utilize simulation for the spring, we will use Gazebo that takes in the transformation of the drone as well as the velocity command from the software to process and send out the state estimation and camera images from the simulated world back to the drone.

Magnetic field simulation

We uses the magnetic dipole-dipole model to compute the force and torque between multiple magnets to simulate the gripper mechanism.

Rviz Trajectory Visualization

DJI Hardware-in-the-loop simulation

Building an Octomap for the new environment

Because our drone depends on the Octomap for planning and navigation, we need to build an Octomap for every environment that it operates. To compromise between the size of the map to optimize memory and the accuracy of the planning such that our drone can operate sufficiently and flying to the correct location without collision, we tried several node sizes for the map and run test on the simulation to ensure that the drone can plan and navigate efficiently with the new Octomap.

Wind Simulation in Gazebo

After the field test, we found out that the wind affects the accuracy of our visual servoing drastically. Without the wind, our visual serving accuracy is close to 100%, but the accuracy is reduced by more than half with winds. As a result, we went back to the simulation and simulated the wind to test out thoroughly improvements for the visual servoing to tackle the wind. We simulated both constant wind and wind gust to test out different scenarios. The wind configurations are conveniently defined in xacro file

Simulation Diagram

After the fall semester, as we enhanced the simulation from the Spring, our complete simulation system would look like below