rayvburn / hubero

HuBeRo - a Framework to Simulate Human Behaviour in Robot Research
https://github.com/rayvburn/hubero
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

redesign plan computation during navigation #24

Open rayvburn opened 2 years ago

rayvburn commented 2 years ago

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

rayvburn commented 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));
        }
    }
rayvburn commented 9 months ago

Somehow related to #62