|
MVSim
Lightweight simulator for 2.5D vehicles and robots
|
#include <VehicleDifferential.h>


Public Member Functions | |
| ControllerTwistPID (DynamicsDifferential &veh) | |
| virtual void | control_step (const DynamicsDifferential::TControllerInput &ci, DynamicsDifferential::TControllerOutput &co) override |
| virtual void | load_config (const rapidxml::xml_node< char > &node) override |
| virtual void | teleop_interface (const TeleopInput &in, TeleopOutput &out) override |
| bool | setTwistCommand (const mrpt::math::TTwist2D &t) override |
| mrpt::math::TTwist2D | setpoint () const |
Public Member Functions inherited from mvsim::ControllerBaseTempl< VEH_DYNAMICS > | |
| ControllerBaseTempl (VEH_DYNAMICS &veh) | |
| virtual void | control_step (const typename VEH_DYNAMICS::TControllerInput &ci, typename VEH_DYNAMICS::TControllerOutput &co)=0 |
| virtual void | on_post_step ([[maybe_unused]] const TSimulContext &context) |
| virtual void | load_config ([[maybe_unused]] const rapidxml::xml_node< char > &node) |
| virtual void | setLogRecording (bool recording) |
| virtual void | clearLogs () |
| virtual void | newLogSession () |
Public Member Functions inherited from mvsim::ControllerBaseInterface | |
| virtual void | teleop_interface ([[maybe_unused]] const TeleopInput &in, [[maybe_unused]] TeleopOutput &out) |
| virtual bool | setTwistCommand ([[maybe_unused]] const mrpt::math::TTwist2D &t) |
Static Public Member Functions | |
| static const char * | class_name () |
Public Attributes | |
| double | KP = 10 |
| PID controller parameters. | |
| double | KI = 0 |
| double | KD = 0 |
| double | N = 0 |
| double | max_torque = 100 |
| Maximum abs. value torque (for clamp) [Nm]. | |
| bool | enable_antiwindup = false |
| bool | enable_feedforward = false |
| double | feedforward_gain = 1.0 |
| bool | enable_reference_filter = false |
| double | reference_filter_tau = 0.1 |
| int | reference_filter_order = 1 |
Additional Inherited Members | |
Public Types inherited from mvsim::ControllerBaseTempl< VEH_DYNAMICS > | |
| using | Ptr = std::shared_ptr< ControllerBaseTempl< VEH_DYNAMICS > > |
Protected Attributes inherited from mvsim::ControllerBaseTempl< VEH_DYNAMICS > | |
| VEH_DYNAMICS & | veh_ |
PID controller that controls the vehicle twist: linear & angular velocities
|
inline |
Returns the current setpoint of the controller
|
overridevirtual |
This is to handle basic need of all the controllers.
Reimplemented from mvsim::ControllerBaseTempl< VEH_DYNAMICS >.
| bool mvsim::DynamicsDifferential::ControllerTwistPID::enable_feedforward = false |
Enable slope feedforward compensation
| bool mvsim::DynamicsDifferential::ControllerTwistPID::enable_reference_filter = false |
Enable reference (setpoint) filter
| double mvsim::DynamicsDifferential::ControllerTwistPID::feedforward_gain = 1.0 |
Gain for slope feedforward (1.0 = full compensation)
| double mvsim::DynamicsDifferential::ControllerTwistPID::N = 0 |
Derivative filter coefficient (0=unfiltered, typical: 2-20)
| int mvsim::DynamicsDifferential::ControllerTwistPID::reference_filter_order = 1 |
Order of the reference filter (1 or 2)
| double mvsim::DynamicsDifferential::ControllerTwistPID::reference_filter_tau = 0.1 |
Time constant for reference filter [seconds]