Ask Your Question

Can I write an rqt plugin with QML?

asked 2016-11-25 23:03:05 -0500

AndyZe gravatar image


I'm interested in writing a virtual gauge plugin for rqt. It seems the easiest way to do this would be the "Circular Gauge" QML type. And I have seen that @Boris wrote a ROS interface for QML. But, I haven't seen anybody use QML for an rqt plugin yet. Is that possible?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-26 01:13:22 -0500

ahendrix gravatar image

It looks like ros_qml is a python script that loads QML as python QT application: , so it might be possible to adapt that to run inside of an rqt plugin instead of as a standalone application.

I'm not sure what else rqt_qml is doing during the setup (the setup documentation refers to running scripts that don't exist, which makes it hard to follow), but it looks like there may be some quirks that are required to get the ros_qml plugins available within QML.

The dependency on Qt 5.4 is also much newer than the default version of QT that is used by most versions of ROS. (Versions before Kinetic used QT 4.x , and Kinetic uses QT 5.3: ). It's not possible to use multiple versions of QT in the same application, so you'll want to make sure that QML is compatible with the version of QT that's used by rqt before you start experimenting too much.

edit flag offensive delete link more



@ahendrix Which missing scripts are you referring to? To me everything seems in place. Anyway, the shell scripts are only used to set up correct development environment. The python init script is basically doing the same: it inserts appropriate paths to QT environment.

Boris gravatar image Boris  ( 2016-11-26 06:39:02 -0500 )edit

The first section of the directions refer to a, but there's no in ros_qml.

ahendrix gravatar image ahendrix  ( 2016-11-26 16:10:26 -0500 )edit

Right, but that refers to PyQt installation, not ros_qml. Namely, the line before shell snippet reads To install PyQt with Python 2.7 bindings configure and build it with the following parameters (actual paths may differ).

Boris gravatar image Boris  ( 2016-11-26 16:42:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-11-25 23:03:05 -0500

Seen: 612 times

Last updated: Nov 26 '16