rclpy.validate_topic_name module
- rclpy.validate_topic_name.validate_topic_name(name, *, is_service=False)
Validate a given topic or service name, and raise an exception if invalid.
The name does not have to be fully-qualified and is not expanded.
If the name is invalid then rclpy.exceptions.InvalidTopicNameException will be raised.
- Parameters:
str (name) – topic or service name to be validated
bool (is_service) – if true, InvalidServiceNameException is raised
- Returns:
True when it is valid
- Raises:
InvalidTopicNameException: when the name is invalid