How to change topic name in function call?
Hello, I am trying to run the same code on different robots, and they have different tf prefixes. So instead of making n files, I want to just change the prefix in the function, here called ns
def movebase_client(ns, x, y):
client = actionlib.SimpleActionClient('ns/move_base', MoveBaseAction)
client.wait_for_server()
Any idea?
You could pass ns as a string and concatenate /move_base
Yes, that worked, thanks.