sot-core  4.11.8
Hierarchical task solver plug-in for dynamic-graph.
dynamicgraph::sot::Device Class Reference

#include <sot/core/device.hh>

Inheritance diagram for dynamicgraph::sot::Device:

Public Types

enum  ForceSignalSource { FORCE_SIGNAL_RLEG , FORCE_SIGNAL_LLEG , FORCE_SIGNAL_RARM , FORCE_SIGNAL_LARM }
 

Public Member Functions

virtual const std::string & getClassName (void) const
 
 Device (const std::string &name)
 
virtual ~Device ()
 
virtual void setStateSize (const unsigned int &size)
 
virtual void setState (const dynamicgraph::Vector &st)
 
void setVelocitySize (const unsigned int &size)
 
virtual void setVelocity (const dynamicgraph::Vector &vel)
 
virtual void setSecondOrderIntegration ()
 
virtual void setNoIntegration ()
 
virtual void setControlInputType (const std::string &cit)
 
virtual void increment (const double &dt=5e-2)
 
PeriodicCallperiodicCallBefore ()
 
PeriodicCallperiodicCallAfter ()
 
virtual void display (std::ostream &os) const
 
virtual void cmdDisplay ()
 
virtual void setRoot (const dynamicgraph::Matrix &root)
 
virtual void setRoot (const MatrixHomogeneous &worldMwaist)
 
Sanity check parameterization
void setSanityCheck (const bool &enableCheck)
 
void setPositionBounds (const Vector &lower, const Vector &upper)
 
void setVelocityBounds (const Vector &lower, const Vector &upper)
 
void setTorqueBounds (const Vector &lower, const Vector &upper)
 

Public Attributes

dynamicgraph::SignalPtr< dynamicgraph::Vector, int > controlSIN
 
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > attitudeSIN
 
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > zmpSIN
 
Device current state.
dynamicgraph::Signal< dynamicgraph::Vector, int > stateSOUT
 
dynamicgraph::Signal< dynamicgraph::Vector, int > velocitySOUT
 
dynamicgraph::Signal< MatrixRotation, int > attitudeSOUT
 
dynamicgraph::Signal< dynamicgraph::Vector, int > motorcontrolSOUT
 The current state of the robot from the command viewpoint. More...
 
dynamicgraph::Signal< dynamicgraph::Vector, int > previousControlSOUT
 
dynamicgraph::Signal< dynamicgraph::Vector, int > ZMPPreviousControllerSOUT
 The ZMP reference send by the previous controller. More...
 
Real robot current state

This corresponds to the real encoders values and take into account the stabilization step. Therefore, this usually does not match the state control input signal.

Motor positions

dynamicgraph::Signal< dynamicgraph::Vector, int > robotState_
 
dynamicgraph::Signal< dynamicgraph::Vector, int > robotVelocity_
 Motor velocities. More...
 
dynamicgraph::Signal< dynamicgraph::Vector, int > * forcesSOUT [4]
 The force torque sensors. More...
 
dynamicgraph::Signal< dynamicgraph::Vector, int > pseudoTorqueSOUT
 

Static Public Attributes

static const std::string CLASS_NAME
 

Protected Member Functions

void integrateRollPitchYaw (dynamicgraph::Vector &state, const dynamicgraph::Vector &control, double dt)
 Compute roll pitch yaw angles of freeflyer joint. More...
 
virtual void integrate (const double &dt)
 
const MatrixHomogeneousfreeFlyerPose () const
 Get freeflyer pose. More...
 

Protected Attributes

dynamicgraph::Vector state_
 
dynamicgraph::Vector velocity_
 
bool sanityCheck_
 
dynamicgraph::Vector vel_control_
 
ControlInput controlInputType_
 
bool withForceSignals [4]
 
PeriodicCall periodicCallBefore_
 
PeriodicCall periodicCallAfter_
 
double timestep_
 
MatrixHomogeneous ffPose_
 Store Position of free flyer joint. More...
 
Robot bounds used for sanity checks
Vector upperPosition_
 
Vector upperVelocity_
 
Vector upperTorque_
 
Vector lowerPosition_
 
Vector lowerVelocity_
 
Vector lowerTorque_
 

Friends

SOT_CORE_EXPORT friend std::ostream & operator<< (std::ostream &os, const Device &r)
 

Member Enumeration Documentation

◆ ForceSignalSource

Enumerator
FORCE_SIGNAL_RLEG 
FORCE_SIGNAL_LLEG 
FORCE_SIGNAL_RARM 
FORCE_SIGNAL_LARM 

Constructor & Destructor Documentation

◆ Device()

dynamicgraph::sot::Device::Device ( const std::string &  name)

◆ ~Device()

virtual dynamicgraph::sot::Device::~Device ( )
virtual

Member Function Documentation

◆ cmdDisplay()

virtual void dynamicgraph::sot::Device::cmdDisplay ( )
virtual

◆ display()

virtual void dynamicgraph::sot::Device::display ( std::ostream &  os) const
virtual

◆ freeFlyerPose()

const MatrixHomogeneous& dynamicgraph::sot::Device::freeFlyerPose ( ) const
protected

Get freeflyer pose.

◆ getClassName()

virtual const std::string& dynamicgraph::sot::Device::getClassName ( void  ) const
inlinevirtual

Reimplemented in dynamicgraph::sot::RobotSimu.

◆ increment()

virtual void dynamicgraph::sot::Device::increment ( const double &  dt = 5e-2)
virtual

◆ integrate()

virtual void dynamicgraph::sot::Device::integrate ( const double &  dt)
protectedvirtual

Compute the new position, from the current control.

When sanity checks are enabled, this checks that the control is within bounds. There are three cases, depending on what the control is:

  • position: checks that the position is within bounds,
  • velocity: checks that the velocity and the future position are within bounds,
  • acceleration: checks that the acceleration, the future velocity and position are within bounds.
    Todo:
    in order to check the acceleration, we need pinocchio and the contact forces in order to estimate the joint torques for the given acceleration.

◆ integrateRollPitchYaw()

void dynamicgraph::sot::Device::integrateRollPitchYaw ( dynamicgraph::Vector &  state,
const dynamicgraph::Vector &  control,
double  dt 
)
protected

Compute roll pitch yaw angles of freeflyer joint.

◆ periodicCallAfter()

PeriodicCall& dynamicgraph::sot::Device::periodicCallAfter ( )
inline

◆ periodicCallBefore()

PeriodicCall& dynamicgraph::sot::Device::periodicCallBefore ( )
inline

◆ setControlInputType()

virtual void dynamicgraph::sot::Device::setControlInputType ( const std::string &  cit)
virtual

◆ setNoIntegration()

virtual void dynamicgraph::sot::Device::setNoIntegration ( )
virtual

◆ setPositionBounds()

void dynamicgraph::sot::Device::setPositionBounds ( const Vector &  lower,
const Vector &  upper 
)

◆ setRoot() [1/2]

virtual void dynamicgraph::sot::Device::setRoot ( const dynamicgraph::Matrix &  root)
virtual

◆ setRoot() [2/2]

virtual void dynamicgraph::sot::Device::setRoot ( const MatrixHomogeneous worldMwaist)
virtual

◆ setSanityCheck()

void dynamicgraph::sot::Device::setSanityCheck ( const bool &  enableCheck)

◆ setSecondOrderIntegration()

virtual void dynamicgraph::sot::Device::setSecondOrderIntegration ( )
virtual

◆ setState()

virtual void dynamicgraph::sot::Device::setState ( const dynamicgraph::Vector &  st)
virtual

◆ setStateSize()

virtual void dynamicgraph::sot::Device::setStateSize ( const unsigned int &  size)
virtual

◆ setTorqueBounds()

void dynamicgraph::sot::Device::setTorqueBounds ( const Vector &  lower,
const Vector &  upper 
)

◆ setVelocity()

virtual void dynamicgraph::sot::Device::setVelocity ( const dynamicgraph::Vector &  vel)
virtual

◆ setVelocityBounds()

void dynamicgraph::sot::Device::setVelocityBounds ( const Vector &  lower,
const Vector &  upper 
)

◆ setVelocitySize()

void dynamicgraph::sot::Device::setVelocitySize ( const unsigned int &  size)

Friends And Related Function Documentation

◆ operator<<

SOT_CORE_EXPORT friend std::ostream& operator<< ( std::ostream &  os,
const Device r 
)
friend

Member Data Documentation

◆ attitudeSIN

dynamicgraph::SignalPtr<dynamicgraph::Vector, int> dynamicgraph::sot::Device::attitudeSIN

◆ attitudeSOUT

dynamicgraph::Signal<MatrixRotation, int> dynamicgraph::sot::Device::attitudeSOUT

◆ CLASS_NAME

const std::string dynamicgraph::sot::Device::CLASS_NAME
static

◆ controlInputType_

ControlInput dynamicgraph::sot::Device::controlInputType_
protected

◆ controlSIN

dynamicgraph::SignalPtr<dynamicgraph::Vector, int> dynamicgraph::sot::Device::controlSIN

◆ ffPose_

MatrixHomogeneous dynamicgraph::sot::Device::ffPose_
protected

Store Position of free flyer joint.

◆ forcesSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int>* dynamicgraph::sot::Device::forcesSOUT[4]

The force torque sensors.

◆ lowerPosition_

Vector dynamicgraph::sot::Device::lowerPosition_
protected

◆ lowerTorque_

Vector dynamicgraph::sot::Device::lowerTorque_
protected

◆ lowerVelocity_

Vector dynamicgraph::sot::Device::lowerVelocity_
protected

◆ motorcontrolSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::motorcontrolSOUT

The current state of the robot from the command viewpoint.

◆ periodicCallAfter_

PeriodicCall dynamicgraph::sot::Device::periodicCallAfter_
protected

◆ periodicCallBefore_

PeriodicCall dynamicgraph::sot::Device::periodicCallBefore_
protected

◆ previousControlSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::previousControlSOUT

◆ pseudoTorqueSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::pseudoTorqueSOUT

Motor torques

Todo:
why pseudo ?

◆ robotState_

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::robotState_

◆ robotVelocity_

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::robotVelocity_

Motor velocities.

◆ sanityCheck_

bool dynamicgraph::sot::Device::sanityCheck_
protected

◆ state_

dynamicgraph::Vector dynamicgraph::sot::Device::state_
protected

◆ stateSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::stateSOUT

◆ timestep_

double dynamicgraph::sot::Device::timestep_
protected

◆ upperPosition_

Vector dynamicgraph::sot::Device::upperPosition_
protected

◆ upperTorque_

Vector dynamicgraph::sot::Device::upperTorque_
protected

◆ upperVelocity_

Vector dynamicgraph::sot::Device::upperVelocity_
protected

◆ vel_control_

dynamicgraph::Vector dynamicgraph::sot::Device::vel_control_
protected

◆ velocity_

dynamicgraph::Vector dynamicgraph::sot::Device::velocity_
protected

◆ velocitySOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::velocitySOUT

◆ withForceSignals

bool dynamicgraph::sot::Device::withForceSignals[4]
protected

◆ ZMPPreviousControllerSOUT

dynamicgraph::Signal<dynamicgraph::Vector, int> dynamicgraph::sot::Device::ZMPPreviousControllerSOUT

The ZMP reference send by the previous controller.

◆ zmpSIN

dynamicgraph::SignalPtr<dynamicgraph::Vector, int> dynamicgraph::sot::Device::zmpSIN

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