Connect to multiple namespaced movegroups from single C++ node
I am working on a two robot set up that uses SMACC state machines in C++, with MoveIt!. In order to control multiple robots from a state machine, I need to run the state machine in a node that is reachable by both robots, but to run multiple move_groups
I need to run each robot in a separate namespace.
I am wondering if there is a way to connect to MoveGroupInterface
from inside my C++ node, specifying, that the move_group
node is located in a namespace, sort of as in the pictures below. Otherwise, if I would launch the move_group
outside of the namespace, when launching the other robots move_group
, it would kill the first one and so on.
rqt_graph showing the node connected to move_group
inside the namespace.
rqt_graph showing the node outside of the namespace
Edit 1:
move_group_interface.h seems to have a struct Options
which takes a ros::NodeHandle
parameter, but I am not entirely sure about the correct way how to pass the wanted NodeHandle{/namespace}
to it.
Edit 2: Disregard opinion in Edit 1!
Related links: