3D Robotics

As we prepare to migrate our current LabVIEW groundstation from ArduPilot to supporting ArduPilot Mega, we're taking the opportunity to rethink its architecture and code base.


Right now it's written in LabVIEW, a visual programming environment that has the advantage of rapid development and easy-to-make instrument displays, as well as being cross-platform. But the problem with it is that the development tools aren't free (indeed, the ones that can create an executable file start at $1,249!), and distributing the files requires users to download a runtime engine and serial driver. As a result, we don't have as much community participation in the ground station as we do in most of our other projects.


Over the past year, we've been looking for an alternative with free and good development tools. It needs to be cross-platform, compatible with open source code standards, and appropriate for a ground station (ie, able to handle a rich visual environment and to talk directly with the serial port). Eventually a good candidate emerged in Nokia's Qt application and UI framework, and I'd like to present it here for community feedback.


You can see a glimpse of Qt above, but here's the description from the site:


"Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.


Features


Note that it's cross platform on more than just computers--it will also run on phones, too, which introduces the possibility of an ArduPilot GCS on Android or some other smartphone, which would be very cool. Also, we intend to integrate the current ArduPilot configuration utility into the GCS, so one desktop program can handle all the ArduPilot functions, from mission planning to real-time data display, including integrated Google Earth and video handling and image processing.


So what do you think? Is this a good code foundation for a full-featured groundstation? Does Qt look like something you'd adopt for the right project?


[UPDATE: See this Swiss team's MAV groundstation for an example of what Qt can do. Nice! It's open source, so we can build on it if we want.]

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • If you are talking about building something like this... I'm in.

    http://qgroundcontrol.org/videos
  • 3D Robotics
    We're going to stick with LabView for the initial release of Mega, but still plan to migrate to QT for V2.
  • That sounds like a relief :) Looking forward to it very much
  • It does look good and trying to find a multi platform solution is a very good idea. Certainly NOT labview please!

    The MAVLink Onboard Integration Tutorial looks like it would allow you to easily make an ardupilot link to the existing MAV Groundstation? If so this seems like an opportunity for someone to make an initial version work very quickly.

    http://qgroundcontrol.org/doku.php?id=mavlink_onboard_integration_t...

    In terms of embedded devices, I used a Nexus for the first time today and immediately checked out the spec. It has a 1ghz processor, accel, gps, a 5mp camera ++. I have shunned the idea of a google phone but I have to admit it was quite interesting. If it had some serial ports if would make a great ground station, if it had ppmand giros it would make a great imu! or maybe not :)

    I managed to get my Tahoe II board working today as a functional ardupiliot compatible groundstation. It works well but the microsoft SPOT stuff is heavy and the 100mhz processor could not rotate images smoothly whilst the ardupilot was sending telemetry at such a rapid rate. I had to slow down the sending of the telemetry from the ardupilot to about 5 a second.

    Initially I liked the idea of building an ardupilot/arduIMU ground station using the microsoft micro framework because it provides a windows compatible emulator that could be tuned for the aurpilot/imu. The microsoft system does provide a porting kit making it very flexible and allowing for high speed native code/add-ons. Maybe the new range of processors due for release will make it more viable however, whist free support is available on the micro framework site, I have found it very difficult to find examples and a good community.

    In conclusion, hardware and embedded op systems are developing rapidly so jumping on the back of the brilliant MAV system and holding off investing huge effort in creating a new ground station from scratch seems to me to be the most sensible thing to do.
  • 3D Robotics
    Okay, as soon as I get the PixHawk source we can mess around with it. If it seems good, Qt it is...
  • Developer
    I will go for QT... ArduPilot is programmed in C/C++. Actually i was thinking on apply myself on Visual C++ or C#, but QT is very similar to Visual C++ plus is multi platform. So i will start something very simple without OpenGL, simple numeric gauges and buttons to program mission's and telemetry. From there the community will start to improve it and add features as before.
  • PyQt would be a great place to start. Who should I contact to get involved with this?
  • 3D Robotics
    I asked Lorenz Meier of the PixHawk team (who have a Qt groundstation) for his advice. Here's his response, with his permission. BTW, they're sending me a zip file of the source code, which we can post here:

    "In general I think your readers are right that Python is a way easier choice and that more people will be able to contribute that way.

    However I think that the discussion has ben led away from the right focus: It is not the question, wether Python or C/C++ is easier to learn and handle. It is also not the question how many developers exist for each language.

    Because eventually the development will be carried out by a small group of 2..5 enthusiastic developers, not dozens of people of the community. The reason for this is quite simple: A ground control station with significant functionality will require time to understand the basic structure and concepts (independent of the choice of language and toolkit) and only few people will be willing to invest that.

    The questions are merely, like in any application development:

    - What does the use case require (What is the best toolkit and programming language)
    - What is a user, what is a developer?
    - What are the requirements of users?
    - What are the requirements of developers?

    I have also some guesses on the answers:

    - The use case requires complete operating system abstraction. It requires a really, really good UI toolkit with hardware acceleration through OpenGL (HUD rendering on CPU is just too slow). It should also support multithreading

    - My educated guess: 95% of ArduPilot users will not want to touch the GCS code at all, so we are looking at 95% pure-users and 5% more intense developers

    - Users want: Easy deployment (download an executable and double-click it, no additional libraries, no compiling of code), Low hardware requirements, and then implementation, not language specific stuff like look and feel, good interaction concepts, etc.

    - Developers want: Clean separation of individual UI parts, separation of communication and visualization layers, assistants for UI elements like forms, an object oriented general setup and multithreading support (critical for using serial, OpenGL and still having a responsive UI).


    In general Python and C++ fulfill all these requirements, except that deployment for Python applications on Windows requires to install the whole toolkit or to pack the python code into an C/C++ executable with in-built interpreter. Now many points are not that new or surprising, but some things are worth to notice:

    - Because of the hardware access to serial and OpenGL interfaces, implementing this kind of application is not trivial, because it involves multithreading and requires careful implementation. This eventually implies that it will require either significant time to learn these concepts or a computer science background

    - These requirements imply "experts" either by profession or interest. Those experts typically prefer an object oriented architecture and are, if they come from the application development domain, usually trained in C/C++ or Java (because those applications can be deployed easily on Windows). Of course any of them can pick up Python quickly, if he/she doesn't know it already as well.


    To conclude, I would say the more important concerns should be to select a language and toolkit that supports multithreading, OpenGL hardware acceleration, object oriented programming and easy deployment. I think it is pretty clear that Qt is the right toolkit. Now C/C++ vs Python will more depend on what developers prefer and how well the deployment with py2exe works in practice.

    Our decision to go with C/C++ was eventually driven by the easier deployment in Windows and the fact that our developers here write C/C++ code on the MCU and single board computer and thus can easily understand the ground control station code."
  • 3D Robotics
    For those interested in Qt, this looks like a good book.
This reply was deleted.