ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Thanks for all your answers!
As ahendrix said, the node really needs the topics to be published before starting the node. However it is not possible to start nodes in a specific order in a launch file. For now we found a solution in letting the node sleep 5 seconds before trying to get the topics (with ros::Duration(5).sleep();
directly in the constructor). This works in simulation as well at our real robot. But it is not a very clean solution. So I will try to get the PR from the link ahendrix posted and look at it again.
Thanks so for :)