qt message fail

asked 2014-10-28 16:00:30 -0500

blakeh gravatar image

updated 2014-10-30 12:44:59 -0500

I have a large ROS package including python and C++ nodes and also a C++ GUI in QT. The QT node interacts with other ROS nodes via service calls and that works great. Ros::spinOnce is being called in a loop in a separate QThread and I've confirmed with log statements that that loop is running. However when I try to instantiate a msg publisher on the same node handle as used successfully for the service client, the following happens:

1) ROS logs and rqt shows that the publisher is properly advertised 2) publisher.publish() statments result in no output (either to console or to ROS logs).

My non-QT C++ nodes publish and receive messages without difficulty in the standard manner.

Any ideas??

edit retag flag offensive close merge delete


nh.publish() or publisher.publish() ?

ahendrix gravatar image ahendrix  ( 2014-10-28 17:11:08 -0500 )edit

If you subscribe to the topic in question, do your receive messages? Are all of your nodes running on the same machine?

ahendrix gravatar image ahendrix  ( 2014-10-28 17:12:45 -0500 )edit

Sorry - my bad --- yes it was publisher.publish() ... thanks

blakeh gravatar image blakeh  ( 2014-10-28 17:53:55 -0500 )edit