remapping service name works but remapping action name does not?

asked 2021-05-20 22:47:02 -0500

masynthetic gravatar image

updated 2021-05-20 22:58:21 -0500

I have been going through the process of making my nodes reusable using launch file concepts (remapping and parameters) and I have been finding it kind of inconsistent... So far remapping has worked for service and topic names but not node names (for multi node process) and not action names.

There are some old mentions of the node name issue which is not preventing my program from running so I am a little confused why remapping the name does not work and they say the reason is multi-node process is not supported in ros_launch but the nodes seem to work fine otherwise?

example of this is just using rclpy.create_node("name")and trying to remap the name

I am not finding any mention of the action name failing to remap but my methods of remapping all of these is the same and quite simple so the issue is appearing somewhat identical.

example of this is using self._action_server = ActionServer(self, ActionMsg, "name", self.execute_callback) again trying to remap the name

can anyone help me understand why these things are not remapping?

edit retag flag offensive close merge delete


Did you figure out anything with action name remapping? I'm struggelig to make this work myself, I've posted an issue on it:

bjoernolav gravatar image bjoernolav  ( 2022-08-11 04:35:45 -0500 )edit

@bjoernolav what I did was set the name in the launch file then use the get_name method when creating the service to insert the name into the service name as below:

        self._action_server = ActionServer(
        "set_{}".format(self.get_name()), # clients use this
masynthetic gravatar image masynthetic  ( 2022-08-14 00:42:01 -0500 )edit

Allright, thanks!

bjoernolav gravatar image bjoernolav  ( 2022-08-16 01:43:28 -0500 )edit