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

create `CallbackSpinner` thread in `TaskRequestRosApi` to avoid manual spinning in scenarios #57

Open rayvburn opened 2 years ago

rayvburn commented 2 years ago

Header:

/// Thread that provides callbacks to be processed (otherwise task requests won't be recognized by ActionServer)
std::thread callback_spinner_;

Source (ctor):

    callback_spinner_ = std::thread([this]() {
        // single-threaded spinning
        ros::spin();
    });

It does not compile ATM: