Team Guidance Layer

The guidance level is a control layer providing high-level commands to the lower layers.

Base Guidance classes

Here we provide the documentation for the base Guidance classes that must be extended for the various scenarios.

Guidance

class choirbot.guidance.Guidance(pose_handler=None, pose_topic=None, pose_callback=None)[source]

Bases: rclpy.node.Node

Base ROS node for guidance level

This is the base class for the guidance level in a multi-robot scenario. This is a basic class and should be extended before instantiation.

The following ROS parameters must be set in order to instantiate the class:

  • N (int): total number of agents in the network

  • agent_id (int): ID of current agent (ranging from 0 to N-1)

  • in_neigh (list): list of in-neighbors

  • out_neigh (list): list of out-neighbors

agent_id

ID of agent

n_agents

Total number of agents

in_neighbors

List of in-neighbors

out_neighbors

List of in-neighbors

current_pose

Current robot pose

communicator

Neighboring communication facilities

__init__(pose_handler=None, pose_topic=None, pose_callback=None)[source]
Parameters
  • pose_handler (str, optional) – Pose handler (see pose_subscribe()). Defaults to None.

  • pose_topic (str, optional) – Topic where pose is published. Defaults to None.

OptimizationGuidance

class choirbot.guidance.OptimizationGuidance(optimizer, thread_t, pose_handler=None, pose_topic=None, pose_callback=None)[source]

Bases: choirbot.guidance.guidance.Guidance

Base ROS node for guidance level with optimization features

This Guidance class provides optimization-related features. This is an abstract class and is intended to be extended before instantiation. See Guidance for information on the required ROS parameters.

optimizer

Optimizer class

optimization_thread

Separate thread performing optimization

__init__(optimizer, thread_t, pose_handler=None, pose_topic=None, pose_callback=None)[source]
Parameters
  • optimizer (Optimizer) – optimizer to be run by thread

  • thread_t (Type[OptimizationThread]) – Type of optimization thread to be instantiated

  • pose_handler (str, optional) – Pose handler (see pose_subscribe()). Defaults to None.

  • pose_topic (str, optional) – Topic where pose is published. Defaults to None.

Optimization Threads

Optimization threads are an attribute of OptimizationGuidance and are used to solve optimization problems or to run distributed optimization algorithms on a separate thread.

OptimizationThread

class choirbot.guidance.optimization_thread.OptimizationThread(guidance, optimizer, gc_end)[source]

Bases: threading.Thread

Base class representing separate thread in which optimization tasks are performed.

This is an abstract class and is intended to be extended before instantiation.

optimizer

Optimizer class

__init__(guidance, optimizer, gc_end)[source]
Parameters
  • guidance (Guidance) – Guidance object

  • optimizer (Optimizer) – Optimizer object

  • gc_end (rclpy.guard_condition.GuardCondition) – Guard Condition triggered at end of each optimization

do_optimize()[source]

TODO

halt()[source]

TODO

optimize()[source]

TODO

quit()[source]

TODO

Complex Guidance classes

Here is a list of the implemented guidance scenarios.