Motor PID#

#include "navground/core/behavior_modulations/motor_pid.h"
class MotorPIDModulation : public navground::core::BehaviorModulation#

A modulation that control motor torques using a PID.

        Requires that the behavior has a
        \ref DynamicTwoWheelsDifferentialDriveKinematics kinematics.

Registered properties:

Public Functions

inline explicit MotorPIDModulation(ng_float_t k_p = 1, ng_float_t k_i = 0, ng_float_t k_d = 0)#

Construct a new instance.

Parameters:
  • k_p[in] The P factor

  • k_i[in] The I factor

  • k_d[in] The D factor

inline ng_float_t get_k_p() const#

Gets the P factor.

Returns:

A number

inline void set_k_p(ng_float_t value)#

Sets the P factor.

Parameters:

value[in] A number.

inline ng_float_t get_k_i() const#

Gets the P factor.

Returns:

A number

inline void set_k_i(ng_float_t value)#

Sets the I factor.

Parameters:

value[in] A number.

inline ng_float_t get_k_d() const#

Gets the D factor.

Returns:

A number

inline void set_k_d(ng_float_t value)#

Sets the D factor.

Parameters:

value[in] A number.