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 believe this was already covered in your other question (#q294951), but this:

while(ros :: ok)

is not correct.

It should be: ros::ok(). It's a function, not a variable.

What you have now probably checks a function pointer, which will evaluate to true, hence making your while-loop equivalent to while (true).

I believe this was already covered in your other question (#q294951), but this:

while(ros :: ok)

is not correct.

It should be: ros::ok(). It's a function, not a variable.

What you have now probably checks a function pointer, which will evaluate to true, hence making your while-loop equivalent to while (true).

In addition: you don't have a ros::Rate with a rate.sleep() in there anywhere. Adding one will probably help.