Base class#

#include "navground/core/behavior_modulation.h"
class BehaviorModulation : public virtual navground::core::HasRegister<BehaviorModulation>#

This class describes a generic behavior modulation that happens right before (pre) and right after (post) computing a command.

Subclassed by navground::core::LimitAccelerationModulation, navground::core::LimitTwistModulation, navground::core::MotorPIDModulation, navground::core::RelaxationModulation

Public Functions

inline virtual void pre(Behavior &behavior, ng_float_t time_step)#

Called right before the evaluation of behavior in Behavior::compute_cmd.

Parameters:
  • behavior – The behavior being evaluated

  • time_step[in] The time step

inline virtual Twist2 post(Behavior &behavior, ng_float_t time_step, const Twist2 &cmd)#

Called right after the evaluation of behavior in Behavior::compute_cmd.

Parameters:
  • behavior – The behavior being evaluated

  • time_step[in] The time step

  • cmd[in] The command just computed by the behavior

inline bool get_enabled() const#

Returns whether the modulation is enabled.

Returns:

True if enabled.

inline void set_enabled(bool value)#

Sets whether the modulation is enabled.

Parameters:

value[in] The desired value