Use a common code for multiple NODES with one variable value change [python]
I need to control multiple differential drive robots.
I wrote a NODE in python which is able to control the robot i.e. publishes velocity and steering of robot using some sensor feedback.
Now I am copying the same code again and again with different names eg controller1.py controller2.py etc
Inside the codes the change is just one variable (name='bot_0' or 'bot_1' or 'bot_2' and so on).
Thus, I was thinking if there is some way in which I can replicate the node from roslaunch and pass one argument. This will make code more scalable and manageable.
Kindly provide your inputs.