Graph-based communication¶
Here we provide the API documentation for classes related to graph-based communication
capabilities. The main class providing this functionality is Communicator,
but there are also additional internal classes implementing particular features.
Communicators¶
-
class
choirbot.communicator.BestEffortCommunicator(agent_id, size, in_neighbors, out_neighbors=None, differentiated_topics=False)[source]¶ Bases:
disropt.communicators.Communicator-
__init__(agent_id, size, in_neighbors, out_neighbors=None, differentiated_topics=False)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
choirbot.communicator.StaticCommunicator(agent_id, size, in_neighbors, out_neighbors=None, synchronous_mode=True, differentiated_topics=False)[source]¶ Bases:
choirbot.communicator.communicator.TimeVaryingCommunicator-
neighbors_exchange(send_obj, dict_neigh, stop_event=None)[source]¶ exchange information (synchronously) with neighbors
- Parameters
- Returns
dict containing received data associated to each neighbor in in-neighbors
- Return type
-
neighbors_receive(stop_event=None)[source]¶ Receive data from neighbors (waits until data are received from all neighbors)
-
-
class
choirbot.communicator.TimeVaryingCommunicator(agent_id, size, in_neighbors, out_neighbors=None, synchronous_mode=True, differentiated_topics=False)[source]¶ Bases:
choirbot.communicator.communicator.BestEffortCommunicator-
__init__(agent_id, size, in_neighbors, out_neighbors=None, synchronous_mode=True, differentiated_topics=False)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
neighbors_exchange(send_obj, in_neighbors, out_neighbors, dict_neigh, stop_event=None)[source]¶ exchange information (synchronously) with neighbors
- Parameters
- Returns
dict containing received data associated to each neighbor in in-neighbors
- Return type
-
Additional internal classes¶
-
class
choirbot.communicator.callback_group.AuthorizationCallbackGroup[source]¶ Bases:
rclpy.callback_groups.CallbackGroup
-
class
choirbot.communicator.executor.SpinSomeExecutor(*, context=None)[source]¶ Bases:
rclpy.executors.ExecutorRuns callbacks and remembers when timeouts are hit