Closed pucciland95 closed 1 year ago
TLDR: you can use SwitchController only from its respective service.
Ok, after looking at the source code, I think what I was trying to do was no feasible.
Basically SwitchController() requires to be launched in a parallel thread wrt the main loop that calls for Update().
Therefore it is not feasible to start ros_controllers with the switch function after loading them.
In my opinion this is not very intuitive since the method SwitchController() is public and can be used without invoking the service.
I would open a pull request about this but I would like to know the opinion of the authors first.
Cheers
Hi,
I am writing the hardware interface for the Gofa robot from ABB. I have a launch file where I specify all the ros_controllers that I would like to load through the controller manager. Therefore, in my code, after that I instantiate the hardware_interface and the controller_manager, I do the following:
I the first 2 load functions work fine. However, when I try to call SwitchController() I get indefinitely stuck. On the other hand, if I comment the SwitchController part and call it through the service, it works perfectly.
Can I ask what I am doing wrong?