ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi! Try something like this:
...
ros::Rate rate(<yourFrequency>);
...
while (ros::ok())
{
ros::spinOnce();
rate.sleep();
}
2 | No.2 Revision |
Hi! Try something like this:
...
ros::Rate rate(<yourFrequency>);
...
while (ros::ok())
{
ros::spinOnce();
rate.sleep();
}
3 | No.3 Revision |
Hi! Try something like this:
...
ros::Rate rate(<yourFrequency>);
...
while (ros::ok())
{
ros::spinOnce();
rate.sleep();
}
Also, be sure to set the right buffer length for your subscriber.
4 | No.4 Revision |
Hi! Try something like this:
...
ros::Rate rate(<yourFrequency>);
...
while (ros::ok())
{
ros::spinOnce();
rate.sleep();
}
Also, be sure to set the right buffer length for your subscriber.subscriber, in order to prevent your node to elaborate old data.