diff --git a/scxml_converter/src/scxml_converter/scxml_entries/scxml_ros_entries.py b/scxml_converter/src/scxml_converter/scxml_entries/scxml_ros_entries.py index 60449d6f..9ecb15bb 100644 --- a/scxml_converter/src/scxml_converter/scxml_entries/scxml_ros_entries.py +++ b/scxml_converter/src/scxml_converter/scxml_entries/scxml_ros_entries.py @@ -22,7 +22,7 @@ as_plain_execution_body) from scxml_converter.scxml_entries.utils import replace_ros_msg_expression from xml.etree import ElementTree as ET -from scxml_converter.scxml_entries.utils import check_topic_type_known +from scxml_converter.scxml_entries.utils import is_topic_type_known class RosTimeRate(ScxmlBase): @@ -96,7 +96,7 @@ def from_xml_tree(xml_tree: ET.Element) -> "RosTopicPublisher": def check_validity(self) -> bool: valid_name = isinstance(self._topic_name, str) and len(self._topic_name) > 0 - valid_type = check_topic_type_known(self._topic_type) + valid_type = is_topic_type_known(self._topic_type) if not valid_name: print("Error: SCXML topic subscriber: topic name is not valid.") if not valid_type: @@ -141,7 +141,7 @@ def from_xml_tree(xml_tree: ET.Element) -> "RosTopicSubscriber": def check_validity(self) -> bool: valid_name = isinstance(self._topic_name, str) and len(self._topic_name) > 0 - valid_type = check_topic_type_known(self._topic_type) + valid_type = is_topic_type_known(self._topic_type) if not valid_name: print("Error: SCXML topic subscriber: topic name is not valid.") if not valid_type: diff --git a/scxml_converter/src/scxml_converter/scxml_entries/utils.py b/scxml_converter/src/scxml_converter/scxml_entries/utils.py index f53ee0e9..0fbf52d5 100644 --- a/scxml_converter/src/scxml_converter/scxml_entries/utils.py +++ b/scxml_converter/src/scxml_converter/scxml_entries/utils.py @@ -18,7 +18,7 @@ from typing import Dict -def check_topic_type_known(topic_definition: str) -> bool: +def is_topic_type_known(topic_definition: str) -> bool: """Check if python can import the provided topic definition.""" # Check the input type has the expected structure if not (isinstance(topic_definition, str) and topic_definition.count("/") == 1):