Create multiple instances of a process
ROS2 newbie here. I use the following command in terminal to run a turtlesim_node:
ros2 run turtlesim turtlesim_node
A node named /turtlesim
starts running along with a host of topics and services whose names start with /turtle1/...
.
To create another instance of this node, I am using
ros2 run turtlesim turtlesim_node --ros-args -r __node:=turtlesim2
A node named /turtlesim2
starts running. But the problem is that no new set of topics/services are created along with this node. It is still operating/communicating with topics/services named /turtle1/...
. My intention is to create a completely separate node with its own topics/services. Following the instructions in [1], here's the final try:
ros2 run turtlesim turtlesim_node --ros-args -r __node:=turtlesim2 -r /turtle1/**:=/turtle2/\1
hoping to map all /turtle1/...
names to /turtle2/...
names so that I can have a complete clone to the original process. But I get the following error:
terminate called after throwing an instance of 'rclcpp::exceptions::RCLInvalidROSArgsError' what(): failed to initialize rcl: Couldn't parse remap rule: '-r /turtle1/**:=/t1/1'. Error: Wildcard '**' is not implemented, at /tmp/binarydeb/ros-galactic-rcl-3.1.2/src/rcl/arguments.c:1167, at /tmp/binarydeb/ros-galactic-rcl-3.1.2/src/rcl/arguments.c:371
what's the issue? Is this the standard procedure to create an identical process from a package executable?
using: x86_64 GNU/Linux, ubuntu 20.04, ros2 galactic