MVSim
Lightweight simulator for 2.5D vehicles and robots
Public Types | Public Member Functions | Protected Attributes | List of all members
mvsim::ControllerBaseTempl< VEH_DYNAMICS > Class Template Referenceabstract

#include <ControllerBase.h>

Inheritance diagram for mvsim::ControllerBaseTempl< VEH_DYNAMICS >:
Inheritance graph
[legend]
Collaboration diagram for mvsim::ControllerBaseTempl< VEH_DYNAMICS >:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< ControllerBaseTempl< VEH_DYNAMICS > >
 

Public Member Functions

 ControllerBaseTempl (VEH_DYNAMICS &veh)
 
virtual void teleop_interface (const TeleopInput &in, TeleopOutput &out) override
 
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)
 

Protected Attributes

VEH_DYNAMICS & veh_
 

Detailed Description

template<class VEH_DYNAMICS>
class mvsim::ControllerBaseTempl< VEH_DYNAMICS >

Virtual base for controllers of vehicles of any type (template)

Member Function Documentation

◆ control_step()

template<class VEH_DYNAMICS >
virtual void mvsim::ControllerBaseTempl< VEH_DYNAMICS >::control_step ( const typename VEH_DYNAMICS::TControllerInput &  ci,
typename VEH_DYNAMICS::TControllerOutput &  co 
)
pure virtual

The core of the controller: will be called at each timestep before the numeric integration of dynamical eqs

◆ load_config()

template<class VEH_DYNAMICS >
virtual void mvsim::ControllerBaseTempl< VEH_DYNAMICS >::load_config ( [[maybe_unused] ] const rapidxml::xml_node< char > &  node)
inlinevirtual

Override to load class-specific options from the <controller> node

◆ teleop_interface()

template<class VEH_DYNAMICS >
virtual void mvsim::ControllerBaseTempl< VEH_DYNAMICS >::teleop_interface ( const TeleopInput in,
TeleopOutput out 
)
inlineoverridevirtual

The documentation for this class was generated from the following file: