CubeGUI: a ground station in MATLAB¶
CubeGUI is a MATLAB window for bench and wind-tunnel testing with your Cube: live plots of pitch and the servos, sliders to move the control surfaces, logs of everything, and a Setup tab that checks the Cube's parameters for you and can flash ArduPlane onto it over USB. It's a tool of its own, with its own documentation and videos. This page tells you where to find them.
Not for flight
CubeGUI has been lightly tested, on ArduPilot's simulator and on the bench. It's suitable for careful wind-tunnel and bench testing of a model held on a rig, and not for anything that flies. It was written with the help of an AI assistant; its README says how.
Before you start
Getting started¶
-
Get it from GitHub, ideally with git, so you can update it later. MATLAB can do this itself, on Windows or a Mac: in MATLAB's Command Window (the
>>prompt in MATLAB, not Windows' Command Prompt), go to the folder you want CubeGUI in withcd, then type(Or, with git installed,
git clone https://github.com/AVDASI2/CubeGUI.gitin a terminal; or Code > Download ZIP.) -
Watch the demonstration above. More introduction videos are to follow.
- Read the README. It covers running it, connecting to your Cube, logging, and changing CubeGUI to suit your team.
You can try it straight away with no hardware: type CubeGUI in MATLAB, choose Simulated, and click Connect.
Levels¶
CubeGUI's features arrive in stages as the unit goes on. All four levels are released: 0 (Simulate), 1 (Connect and log, over the Wi-Fi or a USB cable), 2 (RC) and 3 (Closed loop). For level 2, set up your transmitter first: see RC. For level 3, see Closed Loop.
Levels 2 and 3 use their own Lua script, cubegui.lua, which takes the place of avdasi2.lua from Mode switch: they use the same transmitter switches, so run one or the other, not both. CubeGUI tells you if avdasi2.lua is still running.
On a Mac
Mission Planner's Mac build can't flash firmware (see Mission Planner). CubeGUI can, over a USB cable: Setup tab > Firmware over USB > Flash ArduPlane.... Its Reset to a fresh Cube... does the same job as flashing Sub then Plane. You'll still need a ground station for the calibrations on the earlier pages.
Other ways to talk to the Cube¶
CubeGUI isn't the only option. Mission Planner does almost everything, including the calibrations on the earlier pages, which CubeGUI can't do. PyMAVLink lets you write your own ground station in Python. CubeGUI sits in between: one window built for this test, that you can change without starting from scratch.
