-
Notifications
You must be signed in to change notification settings - Fork 205
Basic Usage
We provide a quadrotor GUI which looks as follows:

This gui can be launch as it is done in our basic simulation launch file.
We typically give every quadrotor a unique name and launch all quadrotor related nodes in a quad namespace to avoid interference between different quadrotors.
The quadrotor namespace needs to be set in the gui but should be loaded correctly already if the nodes are launched as in the basic simulation launch file.
If the quad namespace is correct, press the Connect button to have the gui connecting.
Once the GUI is connected you should see some feedback appearing below.
Below the namespace, you have some buttons available to directly command the quadrotor. Check out the Overview and Concepts page for more details what is happening behind the scenes once you use these buttons.
- The
Arm Bridgehas technically nothing to do with the autopilot but with whatever bridge is used. The bridge is the node that receives control commands from the autopilot and communicates them to a low level flight controller (e.g. SBUS bridge or RPG Rotors Interface). By arming the bridge you allow it to actually send commands to the low level controller. This has to be pressed only once and is a safety feature. - The
Startbutton makes the quadrotor take off from the ground if theframe idof the state estimate is notvisionand makes the quadrotor to go to a hover state if theframe idisvision. - The
Force Hoverbutton forces the autopilot go to a hover state. If necessary, it will first break the quadrotor's velocity down to go smoothly to hover. - The
Landbutton makes the quadrotor land and switch off its propellers if its height is close to zero if theframe idof the state estimate is notvision. It will make the quadrotor go down "infinitely" if theframe idisvision. - The
Offbutton switches the motors of at any time it is pressed. So be careful when using this during flight, the quadrotor might drop out of the sky if it is pressed unintentionally. - The
Go To Posebutton makes the autopilot fly the quadrotor fly to the position specified by theX,Y, andZcoordinates with the specifiedHeadingin degrees.
Below the buttons, you get feedback from the autopilot which helps you knowing what the system is doing.
- The
Autopilot Statusprovides the autopilot's state which is among the states defined here, it tells you how many trajectories the autopilot has in its queue and how long their total execution still lasts. Finally, it tells you what control command delay is set and how long the control computation took (This is typically way below a millisecond for the position controller). - The
Low-Level Statusprovides information from the low level controller which is published by the used bridge. It tells you the battery voltage as well as the battery state and the low level control mode as defined in the LowLevelFeedback message. - The
State Estimateprovides the information about theframe idwhich the autopilot uses to apply different behaviours. It also provides the estimated position, velocity, orientation, and body rates. - The
Reference Stateprovides information about the current reference state that is used, together with the state estimate, to compute the control commands in the autopilot. It tells you the reference position, velocity, acceleration (from a reference trajectory, i.e., without gravity), and heading.
We are using Logitech F710 Gamepads to command quadrotors manually.
For the gamepad to work as intended it requires a joy_node and a manual_flight_assistant to be started as it is e.g. the case in our basic simulation launch file.
The gamepad needs to be set to XInput and then the inputs are mapped as follows:

With the joysticks you are effectively sending velocity commands to the autopilot. Once you let go, the quadrotor will smoothly go back to a hover state.
To fly a real quadrotor that is assembled and connected as described on the Components and Wiring one can launch the provided example launch files to get started. They might need some adaptation to your setup so go through the nodes that are started and check the parameters. The base_computer_example.launch launch file starts the gamepad driver and the quadrotor GUI on your base computer. The real_quad_example.launch launch file is an example for starting all the necessary nodes on the quadrotor's onboard computer including an autpilot and an SBUS bridge.
This requires a Taranis remote control to be set up as explained on the RC Setup page, the flight controller to be set up as explained on the Betaflight Firmware page, and a running SBUS bridge with components connected as described on the Wiring page. One this is set up as explained you may use the two sticks and the following three switches for contorlling the quadrotor:
- The
SFswitch is the arm switch that enables you to fly the quadrotor manually or take over during autonomous flight. If the quadrotor is off you can flip this switch up and fly it manually. Note that as soon as you flip it up, the propellers start spinning in idle. Also note that if you flip it up while the throttle is not in its zero position, the flight controller will not arm. During autonomous flight you may take over manual control by flipping theSFswitch up while being in a roughly hover throttle position. If you land the quadrotor manually, make sure toOffthe autopilot before switching theSFswitch back. If the quadrotor still has a valid state estimate and you flip theSFswitch back during flight, the quadrotor goes into an autonomous hover flight at its current position. - The
SCswitch is used to selectattitudeorbody ratecontrol during manual flight. If the switch is in its default position, the quadrotor is controlled in attitude mode whereas if it is at the maximum position the quadrotor is controlled in body-rate mode. We recommend to always useattitudemode since the default settings use a linear command-to-body-rate mapping in the Betaflight Firmware which makes it difficult to fly in body-rate mode. Experienced pilots who only fly manually may change this mapping according to their preferences in the Betaflight Firmware. - The
SBswitch can be used to enable commanding the quadrotor with the remote control as with a gamepad (see above). For this, theSFswitch must be disarmed i.e. in its default position and theSBswitch must be fully flipped up. However, before you can command the quadrotor as with the gamepad, both sticks once need to be at their center position with both axes together. The easiest way to achieve this is to slowly move the throttle stick slowly through its center position while not deflecting the other axes.
We make use of "Mode 2" transmitters so throttle and yaw are on the left stick and roll and pitch are on the right stick.