Attempt to spin a callback queue from two spinners, one of them being single-threaded
Hello, I followed this guide to implement a controller for my rotary stage. Everything works just fine, but when I launch my controller, I get the following error (which does not impair the functionality of my controller btw.):
[ERROR] [1548319318.740806716]: SpinnerMonitor: single-threaded spinner after multi-threaded one(s).Attempt to spin a callback queue from two spinners, one of them being single-threaded. In the future this will throw an exception! Only allowed for backwards compatibility.
The error is probably caused, when executing my controller executable of my hardware interface. The code, where I create my hardware interface looks like this:
#include "urs100_hardware_interface/urs100_hardware_interface.h"
int main(int argc, char** argv)
{
ros::init(argc, argv, "urs100_hardware_interface");
ros::NodeHandle nh;
ros::AsyncSpinner spinner(1);
spinner.start();
urs100_hardware_interface::Urs100HardwareInterface Urs100Stage(nh);
ros::spin();
return 0;
}
Does anyone know how I can get rid of that error? I already tried to get rid of the ros::spin() and put the spinner.start() right before the return. Would really like to know how to implement this spinning functionality properly.