ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found the solution and added 2 lines in pseudo code which includes add !

The reason why callback was not called was that subprocess("rosrun package node") didn't return. So the node couldn't receive a message and start the callback function.

On the other hand, the reason why the node could receive the topic published by command "rostopic pub" might be due to their priorities. That is, the priority of topic published by command-line may be higher than published by a node. This is my opinion and I don't check whether it is correct or not.