Skip to content
Matthias Faessler edited this page Mar 20, 2018 · 16 revisions

RPG Quadrotor GUI

We provide a quadrotor GUI which looks as follows:

gui

Namespace and Connecting

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.

Autopilot Commands

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 Bridge has 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 Start button makes the quadrotor take off from the ground if the frame id of the state estimate is not vision and makes the quadrotor to go to a hover state if the frame id is vision.
  • The Force Hover button 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 Land button makes the quadrotor land and switch off its propellers if its height is close to zero if the frame id of the state estimate is not vision. It will make the quadrotor go down "infinitely" if the frame id is vision.
  • The Off button 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 Pose button makes the autopilot fly the quadrotor fly to the position specified by the X, Y, and Z coordinates with the specified Heading in degrees.
Feedback

Below the buttons, you get feedback from the autopilot which helps you knowing what the system is doing.

  • The Autopilot Status provides 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 Status provides 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 Estimate provides the information about the frame id which the autopilot uses to apply different behaviours. It also provides the estimated position, velocity, orientation, and body rates.
  • The Reference State provides 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.

Gamepad

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:

gamepad

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.

Usage on Real Quadrotors

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.

How to use a Taranis Remote Control

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 SF switch 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 the SF switch up while being in a roughly hover throttle position. If you land the quadrotor manually, make sure to Off the autopilot before switching the SF switch back. If the quadrotor still has a valid state estimate and you flip the SF switch back during flight, the quadrotor goes into an autonomous hover flight at its current position.
  • The SC switch is used to select attitude or body rate control 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 use attitude mode 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 SB switch can be used to enable commanding the quadrotor with the remote control as with a gamepad (see above). For this, the SF switch must be disarmed i.e. in its default position and the SB switch 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.