Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ros.spinOnce() during delay

Say I have a ros rate of 10 Hz. Does ros.spinOnce() occur during ros::Duration(2).sleep() ?

Example: void main(void){

ros::nh; ros::rate r(10); while(ros::ok()){ do something; ros::Duration(2).sleep(); ros::spinOnce(); }

}

}

ros.spinOnce() during delay

Say I have a ros rate of 10 Hz. Does ros.spinOnce() occur during ros::Duration(2).sleep() ?

Example: void main(void){

ros::nh; ros::rate r(10); while(ros::ok()){ do something; ros::Duration(2).sleep(); ros::spinOnce(); }

}

}

ros.spinOnce() during delay

Say I have a ros rate of 10 Hz. Does ros.spinOnce() occur during ros::Duration(2).sleep() ?

Example: void main(void){

ros::nh; ros::nh;

ros::rate r(10); while(ros::ok()){ r(10);

while(ros::ok()){

do something; ros::Duration(2).sleep(); ros::spinOnce(); something;

ros::Duration(2).sleep();

ros::spinOnce();

}

}

ros.spinOnce() during delay

Say I have a ros rate of 10 Hz. Does ros.spinOnce() ros.spinOnce() occur during ros::Duration(2).sleep() ros::Duration(2).sleep() ?

Example: void main(void){Example:

ros::nh;

void main(void){
  ros::nh;
  ros::rate r(10);
  while(ros::ok())
  {
    do something;
  

ros::rate r(10);

while(ros::ok()){

do something;

ros::Duration(2).sleep();

ros::spinOnce();

}

}

ros::Duration(2).sleep(); ros::spinOnce(); } }