Summary
In this chapter, we demonstrated how to simulate aerial robots and their hardware. Specifically, we used the Software-In-The-Loop (SITL) feature of the PX4 control stack, widely used control software for UAVs, to enable simulation in Gazebo. We also showed how to integrate aerial systems in Gazebo with ROS 2, where control inputs and other information from the autopilot are directly linked to the ROS 2 network. Additionally, we implemented a ROS 2 node to control the UAV’s position, illustrating how to program basic operations such as starting the propellers and taking off.
In the next chapter, we will explore programming another robotic platform—a mobile robot based on a microcontroller—using ROS 2.