Robotics StackExchange | Archived questions

controller_manager and hardware_interface::RobotHW unresponsive after loading controller

Hi,

I have been writing a drive for my robot. Inside of a Node it works fine but I want to use it as a Nodelet. When loading a controller, the call blocks. It appears that the code is hanging inside of the controllermanager in this block (controllermanager.cpp:261):

while (ros::ok() && used_by_realtime_ == former_current_controllers_list_){
  if (!ros::ok())
    return false;
  usleep(200);
}

One explanation might be that the manager only uses one thread for spinning and is already in its callback, such that the controllers can't be switched in the background, I am not sure whether that is correct and how I would fix it. Can I use another spinner in my code?

Asked by antipattern on 2017-01-26 11:45:54 UTC

Comments

Answers