Simulation Challenge
Example: PX4 SITL in a simple Gazebo environment:
Challenge Description
This advanced challenge poses the task of creating a simulation environment for the race course. You will run PX4 flight code on your computer to emulate a virtual drone, which can be connected to using your team’s RC controller and QGroundControl. This leverages PX4’s support of Software In the Loop (SITL) simulation, where the PX4 toolchain runs on your computer instead of on the drone’s flight controller.
Challenge Phases
Note:
This challenge entails an important technical writing component - as you complete each phase of the challenge, you must document all steps (including code comments) necessary to set up and replicate your simulated environment from scratch, in a similar style to the instructions on this website. Someone on another team should be able to reproduce your simulation environment following only the documentation and code provided, without any verbal instructions.
Phase 1
Create a simple drone simulation environment in Gazebo utilizing PX4 SITL. The PX4 website has a useful getting started guide:
https://dev.px4.io/v1.9.0/en/simulation/gazebo.html
Use an X-configuration quadrotor airframe and specify
EKF2
for thePX4_ESTIMATOR
.Command the drone to arm, and to take off by publishing commands to
MAVROS
from the terminal, e.g.,rosservice call /mavros/cmd/takeoff "{TODO}"
.
Warning:
Turn off Wi-Fi on your laptop before publishing any MAVROS commands for the first time, e.g., with rosservice call /mavros/cmd/
.
Ensure QGroundControl and your laptop are never connected to your physical drone when testing your simulation environment. Never use rosservice call /mavros/cmd/
with your physical drones.
Document all steps in this phase and all following phases. Your results should be reproducible by another team solely from following the technical guide you author in each phase.
Phase 2
Demonstrate the ability to command open-loop velocities as well as a setpoint position to the drone.
Run your skywriting challenge code in simulation.
Document any changes necessary to reproduce your results.
Phase 3
Add an LED rope to the Gazebo environment and a downward camera stream to enable line-following
Document all steps to reproduce your changes.
Phase 4
Add gate obstacles and AR Tags for your drone to test obstacle avoidance in simulation.
Document all steps to reproduce your changes.
Phase 5
Enable optical flow and a downward distance sensor. You may need to add additional texture to your simulated environment.
Disable GPS.
Can you still follow the line from Phase 3 and fly the obstacle course from Phase 4?
Document all steps.
Phase 6
Port your simulated environment to Microsoft AirSim.
Document all steps to reproduce your changes.
Microsoft AirSim: