Contents
Functionalities
This node offers a simple QT GUI to control the drone_autopilot node, the drone_stateestimation node and fly the drone manually via keyboard or joystick. It has a couple of functionalities:
Monitor used Topics
On the top-right, the current publish-frequency of important topics is displayed:
Drone Navdata: monitors /ardrone/navdata. Should be around 150 to 200Hz with a connected drone, and running (and correctly configured) ardrone_autonomy node.
Drone Control: monitors /cmd_vel. This is the frequency of how often control commands are published (and sent to the drone).
Pose Estimates: monitors /ardrone/predictedPose. These are the state predictions generated by the drone_stateestimation node. By default, this should be 30Hz.
Joy Input: monitors /joy. If you have a connected game-pad and running joy_node, this should be different from 0Hz.
- Pings (RTT): current wireless LAN latency (RTT in ms) for 500B and 20kB packages. If these are too high, reduce Wlan clutter.
Monitor Autopilot and Stateestimation Nodes
On the middle-right, the current status of the autopilot and the stateestimation node are displayed (refreshed once a second).
Choose current Control Source
Here, you can choose how the drone is controlled. The autopilot node will only send control commands, if this is set to Autopilot.
Joystick Control
Joystick control requires a connected joystick and running rosrun joy joy_node. We use a PS3 six-axis controller.
- left joystick is horizontal position control; right joystick is height and yaw control.
- L1 to take off, release L1 to land.
- R1 to toggle emergency state.
By moving any of the two joysticks, the Control Source is immediately sent to Joystick. This can be used for safety (autopilot does wired stuff -> immediately take over by hand, disabling the autopilot and enabling manual control).
Keyboard Control
KB control requires the GUI window to have focus, but NOT the upper-left text field (press ECS)
q,a: fly up & down.
- i,j,k,l: fly horizontally.
- u,o: rotate yaw.
- F1: toggle emergency
- s: takeoff
- d: land
Focus the GUI window and press ESC to immediately enable KB control and set focus such that KB control works properly. This can be used for safety (autopilot does wired stuff -> press ESC and immediately take over, disabling the autopilot and enabling manual control).
Buttons
Buttons Land, Takeoff, Toggle Cam, Flat trim, Emergency (toggles emergency state).
Autopilot Control
Using the text-field on the left side, commands can be sent to the autopilot node, for example a given trajectory of way-points.
- write commands in top-left text field (or load an example from one of the files). You can simply add .txt files to flightplans/.
- click Send to transmit commands to the autopilot's command queue (automatically sets Control Source to Autopilot).
- click Clear to clear autopilot command queue and current target.
- click Reset to reset Autopilot, PTAM and EKF.
Node Parameters
none
Used Topics
reads & writes /cmd_vel
reads & writes /tum_ardrone/com
reads & writes /ardrone/takeoff
reads & writes /ardrone/land
reads & writes /ardrone/reset
- reads /ardrone/predictedPose
- reads /ardrone/navdata
- reads /joy
- calls /ardrone/togglecam
- calls /ardrone/flattrim
Dynamic Parameters
none