rclpy.expand_topic_name module

rclpy.expand_topic_name.expand_topic_name(topic_name: str, node_name: str, node_namespace: str) str

Expand a given topic name using given node name and namespace as well.

Note that this function can succeed but the expanded topic name may still be invalid. The :py:func:validate_full_topic_name(): should be used on the expanded topic name to ensure it is valid after expansion.

Parameters:
  • topic_name – topic name to be expanded

  • node_name – name of the node that this topic is associated with

  • namespace – namespace that the topic is within

Returns:

expanded topic name which is fully qualified

Raises:

ValueError if the topic name, node name or namespace are invalid