ocra-recipes
Doxygen documentation for the ocra-recipes repository
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ocra_recipes::ControllerServer Class Referenceabstract

#include <ControllerServer.h>

Collaboration diagram for ocra_recipes::ControllerServer:
[legend]

Public Member Functions

 ControllerServer (CONTROLLER_TYPE ctrlType, SOLVER_TYPE solver, bool usingInterprocessCommunication=true, bool useOdometry=false)
 
virtual ~ControllerServer ()
 
bool initialize ()
 
const Eigen::VectorXd & computeTorques ()
 
void computeTorques (Eigen::VectorXd &torques)
 
const std::shared_ptr< ocra::ControllergetController ()
 
const std::shared_ptr< ocra::ModelgetRobotModel ()
 
bool addTasksFromXmlFile (const std::string &filePath)
 
bool addTasks (std::vector< ocra::TaskBuilderOptions > &tmOpts)
 
bool initializeOdometry ()
 
void updateModel ()
 
void setRegularizationTermWeights (double wDdq, double wTau, double wFc)
 

Protected Member Functions

virtual std::shared_ptr< ModelloadRobotModel ()=0
 
virtual void getRobotState (Eigen::VectorXd &q, Eigen::VectorXd &qd, Eigen::Displacementd &H_root, Eigen::Twistd &T_root)=0
 

Protected Attributes

ocra::Model::Ptr model
 
ocra::Controller::Ptr controller
 
ocra::Solver::Ptr internalSolver
 
bool firstRun
 
ServerCommunications::Ptr serverComs
 
Eigen::VectorXd tau
 
RobotState rState
 
Eigen::VectorXd qdPrevious
 
Eigen::VectorXd qPrevious
 
CONTROLLER_TYPE controllerType
 
SOLVER_TYPE solverType
 
bool usingComs
 
bool usingOdometry
 
yarp::os::Bottle statesBottle
 
yarp::os::Port statesPort
 
std::string modelFile
 
std::string initialFixedFrame
 

Detailed Description

Definition at line 43 of file ControllerServer.h.

Constructor & Destructor Documentation

ControllerServer::ControllerServer ( CONTROLLER_TYPE  ctrlType,
SOLVER_TYPE  solver,
bool  usingInterprocessCommunication = true,
bool  useOdometry = false 
)

Definition at line 5 of file ControllerServer.cpp.

ControllerServer::~ControllerServer ( )
virtual

Definition at line 16 of file ControllerServer.cpp.

Member Function Documentation

bool ControllerServer::addTasks ( std::vector< ocra::TaskBuilderOptions > &  tmOpts)

Definition at line 132 of file ControllerServer.cpp.

bool ControllerServer::addTasksFromXmlFile ( const std::string &  filePath)

Definition at line 126 of file ControllerServer.cpp.

const Eigen::VectorXd & ControllerServer::computeTorques ( )

Definition at line 101 of file ControllerServer.cpp.

void ControllerServer::computeTorques ( Eigen::VectorXd &  torques)

Definition at line 107 of file ControllerServer.cpp.

const std::shared_ptr<ocra::Controller> ocra_recipes::ControllerServer::getController ( )
inline

Definition at line 63 of file ControllerServer.h.

const std::shared_ptr<ocra::Model> ocra_recipes::ControllerServer::getRobotModel ( )
inline

Definition at line 64 of file ControllerServer.h.

virtual void ocra_recipes::ControllerServer::getRobotState ( Eigen::VectorXd &  q,
Eigen::VectorXd &  qd,
Eigen::Displacementd &  H_root,
Eigen::Twistd &  T_root 
)
protectedpure virtual
bool ControllerServer::initialize ( )

Definition at line 22 of file ControllerServer.cpp.

bool ocra_recipes::ControllerServer::initializeOdometry ( )

If the useOdometry flag is passed to the server, odometry is computed.

  • returns: True if properly initialized, false otherwise.
virtual std::shared_ptr<Model> ocra_recipes::ControllerServer::loadRobotModel ( )
protectedpure virtual
void ControllerServer::setRegularizationTermWeights ( double  wDdq,
double  wTau,
double  wFc 
)

Definition at line 138 of file ControllerServer.cpp.

void ControllerServer::updateModel ( )

Definition at line 113 of file ControllerServer.cpp.

Member Data Documentation

ocra::Controller::Ptr ocra_recipes::ControllerServer::controller
protected

Definition at line 82 of file ControllerServer.h.

CONTROLLER_TYPE ocra_recipes::ControllerServer::controllerType
protected

Definition at line 98 of file ControllerServer.h.

bool ocra_recipes::ControllerServer::firstRun
protected

Definition at line 85 of file ControllerServer.h.

std::string ocra_recipes::ControllerServer::initialFixedFrame
protected

Definition at line 108 of file ControllerServer.h.

ocra::Solver::Ptr ocra_recipes::ControllerServer::internalSolver
protected

Definition at line 83 of file ControllerServer.h.

ocra::Model::Ptr ocra_recipes::ControllerServer::model
protected

Definition at line 81 of file ControllerServer.h.

std::string ocra_recipes::ControllerServer::modelFile
protected

Definition at line 107 of file ControllerServer.h.

Eigen::VectorXd ocra_recipes::ControllerServer::qdPrevious
protected

Definition at line 91 of file ControllerServer.h.

Eigen::VectorXd ocra_recipes::ControllerServer::qPrevious
protected

Definition at line 92 of file ControllerServer.h.

RobotState ocra_recipes::ControllerServer::rState
protected

Definition at line 90 of file ControllerServer.h.

ServerCommunications::Ptr ocra_recipes::ControllerServer::serverComs
protected

Definition at line 87 of file ControllerServer.h.

SOLVER_TYPE ocra_recipes::ControllerServer::solverType
protected

Definition at line 99 of file ControllerServer.h.

yarp::os::Bottle ocra_recipes::ControllerServer::statesBottle
protected

Definition at line 103 of file ControllerServer.h.

yarp::os::Port ocra_recipes::ControllerServer::statesPort
protected

Definition at line 104 of file ControllerServer.h.

Eigen::VectorXd ocra_recipes::ControllerServer::tau
protected

Definition at line 89 of file ControllerServer.h.

bool ocra_recipes::ControllerServer::usingComs
protected

Definition at line 100 of file ControllerServer.h.

bool ocra_recipes::ControllerServer::usingOdometry
protected

Definition at line 101 of file ControllerServer.h.


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