I am a newbie to this field and is stuck in SITL and HITL using Gazebo. My question is what is the exact function of the OffBoard API like MAVROS/MAVSDK being used by PX4 in SITL/HITL?
Also are these API needed for real world flying of the Quadrotor?
You can send position or velocity setpoints from ROS (I am not familiar with the Mavsdk but I would assume it’s the same). Offboard mode is available both in simulation and real world flying.
I see. So if I do not want to use offboard mode then can I skip using this Offboard API? Will it create any problem with manual and mission mode through QGC if I stop using this API ?
Offboard mode is only used to receive and track setpoints from a companion computer.
All the other modes, e.g. manual and mission, do not require a companion computer and the setpoint generation is completely handled on the Flight Controller side.