I've built a Qt GUI in python from code (not from the Qt editor, so I don't use qml files).
I want it to be able to subscribe to ROS2 topics and update the GUI according to the messages received, and publish data when a button is clicked.
The problem is that Qt requires app.exec()
, and ROS requires node.spin()
to be run, both of which are infinite loops.
There seem to be some tutorials online for ROS + Qt, but all of them are focused on ROS1.
I can't find any example code for ROS2 + Qt.
How can I integrate my Qt GUI with ROS2?