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

Revision history [back]

Everytime spinOnce() is called, callbacks in the queue are processed. If you put a spinOnce() call into your while loops, things should thus work as you expect. Note that this is ok for a toy example, but generally this kind of open loop motion will be highly inaccurate.

Everytime spinOnce() is called, callbacks in the queue are processed. If you put a spinOnce() call into your while loops, things should thus work as you expect. Note that this is ok for a toy example, but generally this kind of open loop motion will be highly inaccurate.

/edit: No, you should not use callOne(). You can add spinOnce() in each of your two while loops however and it should work.