ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Why is your publisher in a while loop? You should use timers to schedule when each publisher runs publish(). See here: http://wiki.ros.org/roscpp_tutorials/Tutorials/Timers Also, make sure that all the calls to spin() are removed from your subscriber definitions, and then perhaps insert one single spin() at the end of your code
2 | No.2 Revision |
Why is your publisher in a while loop? You should use timers to schedule when each publisher runs publish(). publish().
3 | No.3 Revision |
Why is your publisher in a while loop? You should use timers to schedule when each publisher runs publish().publish() so your code doesn't stay in the first while loop forever
See here: http://wiki.ros.org/roscpp_tutorials/Tutorials/Timers
Also, make sure that all the calls to spin() are removed from your subscriber definitions, and then perhaps insert one single spin() at the end of your code