harmoni_common_lib.helper_functions
Module Contents
Functions
|
Get children name without ids from config file |
|
Get children from config file |
|
Get children from config file of a specific repo |
|
Get id of the child from service name |
|
Get name of the child from service |
|
Get the service server name |
|
Check if detector. It returns true if it is a detector |
|
Check if sensor. It returns true if it is a sensor |
|
Determines if a topic has been published recently |
|
Converts a message type to ROS topic type string |
|
Check if the service contains many resources |
Attributes
- harmoni_common_lib.helper_functions.PATH_CONFIG = 'HARMONI/harmoni_core/harmoni_decision/config/configuration.yaml'
- harmoni_common_lib.helper_functions.get_child(child_name)
Get children name without ids from config file
- harmoni_common_lib.helper_functions.get_child_list(child_name, resources=True)
Get children from config file
- harmoni_common_lib.helper_functions.get_service_list_of_repo(repository)
Get children from config file of a specific repo
- harmoni_common_lib.helper_functions.get_child_id(service_name)
Get id of the child from service name
- harmoni_common_lib.helper_functions.get_service_name(repo_service_id)
Get name of the child from service
- harmoni_common_lib.helper_functions.get_all_repos()
- harmoni_common_lib.helper_functions.get_service_server_instance_id(service_name, input_id)
Get the service server name
- harmoni_common_lib.helper_functions.check_if_detector(service_name)
Check if detector. It returns true if it is a detector
- harmoni_common_lib.helper_functions.check_if_sensor(service_name)
Check if sensor. It returns true if it is a sensor
- harmoni_common_lib.helper_functions.topic_active(topic, msg_type)
Determines if a topic has been published recently
- Parameters:
topic (str) – The topic path
msg_type (type) – A message type, such as sensor_msgs.msg.Image
- Returns:
True if topic found with correct type
- Return type:
bool
- harmoni_common_lib.helper_functions.msg_type_to_str(msg_type)
Converts a message type to ROS topic type string
- Parameters:
msg_type (type) – A message type, such as sensor_msgs.msg.Image
- Returns:
The message type string in ROS format: ‘msg_set/TypeName’
- Return type:
str
- harmoni_common_lib.helper_functions._check_if_resources(service)
Check if the service contains many resources