Open rayvburn opened 2 years ago
Snippet with previous version:
bool success = false;
for (unsigned int i = 0; i < PLAN_COMPUTATION_RETRY_NUM; i++) {
if (success) {
break;
} else if (i > 0) {
HUBERO_LOG(
"[%s].[NavigationRos] Retrying to compute a valid plan for the %d/%d time (feedback %d)\r\n",
actor_name_.c_str(),
i + 1,
PLAN_COMPUTATION_RETRY_NUM,
getFeedback()
);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}
Somehow related to #62
Create
NavigationRos::updateGoalToClosestReachablePose()
method that will internally compute plan to the goal in a separate thread - this will prevent from perdiodic freezes while calling ROS service