ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Trying to write simple PyQt node that uses topics for I/O? [closed]

asked 2014-05-23 09:05:51 -0600

billtecteacher gravatar image

updated 2014-05-23 09:08:41 -0600

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by billtecteacher
close date 2014-06-07 17:48:22.222210

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)?

billtecteacher gravatar image billtecteacher  ( 2014-05-23 10:28:00 -0600 )edit

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()

billtecteacher gravatar image billtecteacher  ( 2014-05-23 10:52:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-23 11:43:42 -0600

billtecteacher gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-23 09:05:51 -0600

Seen: 470 times

Last updated: May 23 '14