ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It needs a second to generate a new topic. Adding a sleep after this line:
ros::Publisher pub_aux = nh->advertise<std_msgs::String>(topic_name.c_str(), 1);
sleep(3);
I used to generate new topics and add them to a std::map on ros-kinetic. In my case it works.