Trying to write simple PyQt node that uses topics for I/O?
Was wondering if anyone knows of or has a simple example of a node that uses PyQt that works in hydro? Trying to teach students about framework and thought they would find using it with their own node that display and gets input from gui interesting.
Asked by billtecteacher on 2014-05-23 09:05:51 UTC
Answers
OK think I answered by own question or rather a package qt_ros does. Looks like it sets up a thread for Qt so qt does not block ros node. I am thinking could also use any inter-process communication or perhaps ros bridge if not using threads.
Asked by billtecteacher on 2014-05-23 11:43:42 UTC
Comments
I can publish from gui user interface handler for a event like pushing a button but not sure yet if I can listen to a topic (because the gui takes control and won't give it back to node software main loop)?
Asked by billtecteacher on 2014-05-23 10:28:00 UTC
Of course its not check rospy.is_shutdown() since its not returning from guy_app while not rospy.is_shutdown(): str = "hello world %s"%rospy.get_time() pub.publish(str) gui_app() rospy.loginfo(str) r.sleep()
Asked by billtecteacher on 2014-05-23 10:52:04 UTC