-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi everyone
I tested this on foxy but as you can see from:
rclcpp/rclcpp/src/rclcpp/node.cpp
Lines 81 to 95 in 1fc2d58
| RCLCPP_LOCAL | |
| std::string | |
| create_effective_namespace(const std::string & node_namespace, const std::string & sub_namespace) | |
| { | |
| // Assumption is that both the node_namespace and sub_namespace are conforming | |
| // and do not need trimming of `/` and other things, as they were validated | |
| // in other functions already. | |
| if (node_namespace.back() == '/') { | |
| // this is the special case where node_namespace is just `/` | |
| return node_namespace + sub_namespace; | |
| } else { | |
| return node_namespace + "/" + sub_namespace; | |
| } | |
| } |
it returns an namespace with a slash at the end in both cases. rclcpp::expand_topic_or_service_name will then throw an exception it represents an invalid namespace format (e.g., '/' at the end are not allowed).
Is this still the case? Or rclcpp behaving wrong in this case. But since we usually specify namespaces without slashes almost everywhere I can recall using it I think even if it were permitted we should return the namespace without the slash.
BR, Markus
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working