Rqt_myPlugin can't subscribe node
Hello guys,
I have a GUI as a rqt plugin and I want to subscribe a topic but I can't see my rqt_plugin node on the rqt_graph. The topic which i want to subscribe is in the same machine, which I want to start my rqt_plugin. I have muliple machines and I start the rqt_graph at the another machine. At the another machine I see all the other topics and I see also the topic which I want to subscribe with my rqt_plugin.
Here is the creation of the publisher at machine A:
pubCmd = n.advertise<std_msgs::String>("/sci/cmd", 10);
Here is the subscribing of the topic /sci/cmd at my rqt_plugin also at machine A:
ros::Subscriber sub = getNodeHandle().subscribe("/sci/cmd", 10, &ccgui::receiveSC, this);
If now I published something, my rqt plugin receives nothing. I know that the publisher works correctly because I subscribed the topic with a normal node and I receive the messages. https://github.com/Mosa-/rqt_ccgui
I hope someone can help me :)
If your plugin doesn't appear in rqt_graph or in rostopic list, it's likely that the ROS node in rqt isn't getting initialized properly. That said, I don't see anything wrong with your code.
I follow this instruction to create the rqt plugin: http://wiki.ros.org/rqt/Tutorials/Cre... in C++. How I can check in which "node universum" i am? Because I have access of the node handle... What should i do?
if I do rosnode list I can see the node /rqt_gui_cpp_node_7081, but where I should create the publisher/subscriber. I do it but it wont show...
May be it would help if you share your code (e.g. through GitHub) so that other people can take a look. Otherwise it might be difficult to give any specific advice.
Yeah he you can find the code; https://github.com/Mosa-/rqt_ccgui