Mission from code to SITL (ROS2)

Hi all!
I’ve been working on a project for a multi-copter SITL using ROS2 and Gazebo.
I’ve come to understand many things to exchange data back and forth via ROS2/Gazebo topics and I can now send commands to the drone (takeoff, land, offboard mode, etc…).

I understand one can simply upload a mission to the copter and make it follow the different waypoints in it, but how can I achieve this?
I’ve tried via QGroundControl and it works (of course), but I would need to create and send waypoints via code (C++ in my case).

Is there any example or reference for this?
Thank you! :slight_smile: