- optimized cpu usage by spin loop (by astumpf)

This commit is contained in:
ROBOTIS-zerom
2016-09-21 15:05:16 +09:00
parent 176c64ec67
commit d0de3171d0

View File

@ -660,11 +660,9 @@ void RobotisController::msgQueueThread()
ros::ServiceServer joint_module_server = ros_node.advertiseService("/robotis/get_present_joint_ctrl_modules",
&RobotisController::getCtrlModuleCallback, this);
while (ros_node.ok())
{
callback_queue.callAvailable();
usleep(1000);
}
ros::WallDuration duration(CONTROL_CYCLE_MSEC / 1000.0);
while(ros_node.ok())
callback_queue.callAvailable(duration);
}
void *RobotisController::timerThread(void *param)