#include <VehicleDifferential.h>
Public Member Functions | |
virtual void | control_step (const DynamicsDifferential::TControllerInput &ci, DynamicsDifferential::TControllerOutput &co) override |
ControllerTwistPID (DynamicsDifferential &veh) | |
virtual void | load_config (const rapidxml::xml_node< char > &node) override |
mrpt::math::TTwist2D | setpoint () const |
bool | setTwistCommand (const mrpt::math::TTwist2D &t) override |
virtual void | teleop_interface (const TeleopInput &in, TeleopOutput &out) override |
![]() | |
virtual void | clearLogs () |
virtual void | control_step (const typename VEH_DYNAMICS::TControllerInput &ci, typename VEH_DYNAMICS::TControllerOutput &co)=0 |
ControllerBaseTempl (VEH_DYNAMICS &veh) | |
virtual void | load_config ([[maybe_unused]] const rapidxml::xml_node< char > &node) |
virtual void | newLogSession () |
virtual void | on_post_step ([[maybe_unused]] const TSimulContext &context) |
virtual void | setLogRecording (bool recording) |
virtual | ~ControllerBaseTempl () |
![]() | |
virtual bool | setTwistCommand ([[maybe_unused]] const mrpt::math::TTwist2D &t) |
virtual void | teleop_interface ([[maybe_unused]] const TeleopInput &in, [[maybe_unused]] TeleopOutput &out) |
Static Public Member Functions | |
static const char * | class_name () |
Public Attributes | |
double | KD = 0 |
double | KI = 0 |
double | KP = 10 |
PID controller parameters. More... | |
double | max_torque = 100 |
Maximum abs. value torque (for clamp) [Nm]. More... | |
Private Attributes | |
double | distWheels_ = 0 |
std::array< PID_Controller, 2 > | PIDs_ |
mrpt::math::TTwist2D | setpoint_ {0, 0, 0} |
"vx" and "omega" only More... | |
std::mutex | setpointMtx_ |
Additional Inherited Members | |
![]() | |
using | Ptr = std::shared_ptr< ControllerBaseTempl< VEH_DYNAMICS > > |
![]() | |
VEH_DYNAMICS & | veh_ |
PID controller that controls the vehicle twist: linear & angular velocities
Definition at line 108 of file VehicleDifferential.h.
DynamicsDifferential::ControllerTwistPID::ControllerTwistPID | ( | DynamicsDifferential & | veh | ) |
Definition at line 17 of file VehicleDifferential_ControllerTwistPID.cpp.
|
inlinestatic |
Definition at line 112 of file VehicleDifferential.h.
|
overridevirtual |
Definition at line 29 of file VehicleDifferential_ControllerTwistPID.cpp.
|
overridevirtual |
Definition at line 78 of file VehicleDifferential_ControllerTwistPID.cpp.
|
inline |
Returns the current setpoint of the controller
Definition at line 138 of file VehicleDifferential.h.
|
inlineoverride |
Definition at line 129 of file VehicleDifferential.h.
|
overridevirtual |
This is to handle basic need of all the controllers.
Reimplemented from mvsim::ControllerBaseTempl< VEH_DYNAMICS >.
Definition at line 94 of file VehicleDifferential_ControllerTwistPID.cpp.
|
private |
Definition at line 147 of file VehicleDifferential.h.
double mvsim::DynamicsDifferential::ControllerTwistPID::KD = 0 |
Definition at line 123 of file VehicleDifferential.h.
double mvsim::DynamicsDifferential::ControllerTwistPID::KI = 0 |
Definition at line 123 of file VehicleDifferential.h.
double mvsim::DynamicsDifferential::ControllerTwistPID::KP = 10 |
PID controller parameters.
Definition at line 123 of file VehicleDifferential.h.
double mvsim::DynamicsDifferential::ControllerTwistPID::max_torque = 100 |
Maximum abs. value torque (for clamp) [Nm].
Definition at line 126 of file VehicleDifferential.h.
|
private |
Definition at line 148 of file VehicleDifferential.h.
|
private |
"vx" and "omega" only
Definition at line 149 of file VehicleDifferential.h.
|
mutableprivate |
Definition at line 150 of file VehicleDifferential.h.