rclpy.validate_topic_name module
- rclpy.validate_topic_name.validate_topic_name(name: str, *, is_service: bool = False) Literal[True]
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:
name – topic or service name to be validated
is_service – if true, InvalidServiceNameException is raised
- Returns:
True when it is valid
- Raises:
InvalidTopicNameException: when the name is invalid