controller_manager and hardware_interface::RobotHW unresponsive after loading controller

asked 2017-01-26 10:45:54 -0600

antipattern gravatar image

updated 2017-01-26 11:54:36 -0600

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 controller_manager in this block (controller_manager.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?

edit retag flag offensive close merge delete