Struct swarm_iterator

Struct Documentation

struct swarm_iterator

Iterate over a swarm of robots running ROS. Iteration is always performed in a static order (single threaded).

Public Static Functions

template<typename TFunction>
static inline void robots(size_t n_robots, const TFunction &cb)

Iterate through controllers using static ordering.

Template Parameters:

TFunction – Type of the lambda callback to use (inferred).

Parameters:
  • sm – Handle to the cpros::swarm_manager_adaptor.

  • cb – Function to run on each robot in the swarm.