subscribe callback c not called (c++ )
I have a node publishing a topic in one computer(A). In another computer(B), I am running roscore and a node subscribing to the topic. I can echo the topic in computer B with no problems. I modified copy of listenner.cpp to make a subscriber. The callback never gets fired. Here are the relevant snippets: Publishing:
ros::Publisher level_pub = n.advertise<water_tank::Level>("Level", 1000);
Subscriber:
ros::Subscriber sub = n.subscribe("Level", 1000, chatterCallback);
I appreciate your help.
Please check and verify the NetworkSetup Guide in the wiki. Note that you need to set any environment variables in each terminal. Thus, if
rostopic echo
works, make sure it does in the same terminal as the node.Also, additionally with
rosnode info
androstopic info
that everything is connected correctlly.roswtf
might also help.report back with the relevant findings (output, if you missed something in the guide, ...)