Closed JonathanNash21 closed 1 year ago
Hi @JonathanNash21, there isn't any "no namespace assumption" in the coverage example.
As you pointed out, if your robot is running in a namespace you will also have to either run the coverage example in the same namespace or remap all the publications and subscriptions to the namespaced names.
The quickest solution is definitely to start the coverage node in the same namespace as the robot.
ros2 run create3_coverage create3_coverage --ros-args -r __ns:=/r1
See for details https://docs.ros.org/en/galactic/How-To-Guides/Node-arguments.html
Appreciate the helpful response, thank you!
I'm trying to use the create3_coverage command with a robot that I created a unique namespace for (I intend to use multiple robots on the same network in the future). However, I get an output saying that "some subscriptions haven't discovered their publishers yet" and "robot nodes haven't been discovered yet".
I suspect this is because of the namespace, and the create3_coverage works on a no-namespace assumption (see below image, the /create3_coverage node is isolated and every other node is tied to /r1/..., where r1 is the namespace of my robot).
I tried editing the create3_coveragenode.cpp file to add in "/r1/" before the rclcpp::Node creation and all of the m... actions, params, etc, and then re-building the project, but the changes didn't do anything. Is there something else I should be doing to let create3_coverage attach to my robot's namespace? Thank you.