rclpy.validate_full_topic_name module

rclpy.validate_full_topic_name.validate_full_topic_name(name, *, is_service=False)

Validate a given topic or service name, and raise an exception if invalid.

The name must be fully-qualified and already 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