Shared variable between two instance of the same model plugin
Hi,
I have a model plugin for a robot that use a controller in order to control the robot. The scenario i am working on needs to have two robots walking in the same world. So i am inserting the models with the same model plugin.
The sad thing is that this controller haven't been made with the usual c++ precautions. For instance, there are some variables that are declared outside the classes. And however it would be the best solution, i am not able to alter its code to fix this kind of mistake.
Therefore, when I am starting the simulation, some variables are edited by both robots and that prevents them from walking correctly.
So i was wondering if there is a way of executing both plugins "separatly" so that even if the controller have been badly coded they can't share any variables.
Thanks for your help!
PS: I am working on gazebo 9 with ubuntu 16.04 I am using catking to build the plugins