rclpy.validate_namespace module
- rclpy.validate_namespace.validate_namespace(namespace)
Validate a given namespace, and raise an exception if it is invalid.
Unlike the node constructor, which allows namespaces without a leading ‘/’ and empty namespaces “”, this function requires that the namespace be absolute and non-empty.
If the namespace is invalid then rclpy.exceptions.InvalidNamespaceException will be raised.
- Parameters:
str (namespace) – namespace to be validated
- Returns:
True when it is valid
- Raises:
InvalidNamespaceException: when the namespace is invalid