Class robot_dynamics_applicator
Defined in File robot_dynamics_applicator.hpp
Inheritance Relationships
Base Type
public rer::client< robot_dynamics_applicator >
Derived Type
public cosm::argos::tv::rda_adaptor< TController >
(Template Class rda_adaptor)
Class Documentation
-
class robot_dynamics_applicator : public rer::client<robot_dynamics_applicator>
Orchestrates all application of all dynamics/temporal variance to all robots in the swarm. This class does not apply variances to each robot, as that possibly requires platform-specific knowledge. Instead it houses the data for all possible types of variance which cannot be applied from inside the robot (such as robot slowdown due to environmental conditions, object weight, etc.), and specifies the interface for application, which must be implemented by derived classes.
Types of internal robot variance this manager handles are:
Motion variances via throttling
This class maintains a map of <id, variance applicator> for each type of variance for each robot, because not all robots experience identical variances (eg variances might only be applied when they are carrying a block).
Each type of variance also has a corresponding pure virtual function specifying how information about the state of the variance at the swarm level can be extracted.
Subclassed by cosm::argos::tv::rda_adaptor< TController >
Public Functions
-
robot_dynamics_applicator(const robot_dynamics_applicator&) = delete
-
virtual double avg_motion_throttle(void) const = 0
Compute the average motion throttle that is currently being applied to the swarm.
-
inline const ctv::switchable_tv_generator *bc_throttler(const rtypes::type_uuid &id) const
-
inline bool bc_throttling_enabled(void) const
-
inline const ctv::switchable_tv_generator *motion_throttler(const rtypes::type_uuid &id) const
-
inline bool motion_throttling_enabled(void) const
-
const robot_dynamics_applicator &operator=(const robot_dynamics_applicator&) = delete
-
void register_controller(const rtypes::type_uuid &id)
Register a robot controller so that all necessary handlers for all possible types of variance that could be applied to a given controller are setup.
- Parameters:
id – The ID of the robot controller.
-
void unregister_controller(const rtypes::type_uuid &id)
Un-register a robot controller if it has been permanently removed from simulation.
- Parameters:
id – The ID of the robot controller.
-
virtual void update(void) = 0
Update the state of all applied variances. Should be called once per timestep.