kompass.components.ros#

Module Contents#

Functions#

default_to_latched_qos

Default a topic QoS to delivering its last message to subscribers that join after it was published

update_topics

Get a new dictionary of topics updated with the given keyword arguments

API#

kompass.components.ros.default_to_latched_qos(topic: Optional[ros_sugar.io.Topic]) → None#

Default a topic QoS to delivering its last message to subscribers that join after it was published

Required for data published only once, such as a static map. Both the publisher and the subscribers of the topic need this QoS: reliable, so the single message is not dropped, and transient local, so it is kept for late subscribers.

A default, not a rule: only the settings left at their QoS defaults are filled in, so a reliability or a durability chosen in a recipe or a config file is kept.

Parameters:

topic (Optional[Topic]) – Topic to update, nothing is done if None

kompass.components.ros.update_topics(topics_dict: Dict[kompass.components.defaults.TopicsKeys, Union[ros_sugar.io.Topic, List[ros_sugar.io.Topic], None]], **kwargs) → Dict[kompass.components.defaults.TopicsKeys, Union[ros_sugar.io.Topic, List[ros_sugar.io.Topic], None]]#

Get a new dictionary of topics updated with the given keyword arguments

The given dictionary is left unchanged

Parameters:

topics_dict (Dict[str, Topic]) – Topic dictionary {topic_key_name: Topic}

Returns:

Updated topics

Return type:

Dict[str, Topic]