All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dynamicgraph::sot::PatternGenerator Class Reference

This class provides dynamically stable CoM, ZMP, feet trajectories. It wraps up the algorithms implemented by the walkGenJRL library. More...

#include <sot-pattern-generator/pg.h>

Inheritance diagram for dynamicgraph::sot::PatternGenerator:
Collaboration diagram for dynamicgraph::sot::PatternGenerator:

Public Types

typedef int Dummy
 
- Public Types inherited from dynamicgraph::Entity
typedef std::map< std::string,
SignalBase< int > * > 
SignalMap
 
typedef std::map< const
std::string, command::Command * > 
CommandMap_t
 

Public Member Functions

 DYNAMIC_GRAPH_ENTITY_DECL ()
 
 PatternGenerator (const std::string &name="PatternGenerator")
 Default constructor. More...
 
virtual ~PatternGenerator (void)
 Default destructor. More...
 
void initCommands (void)
 
int stringToReferenceEnum (const std::string &FrameReference)
 
void setReferenceFromString (const std::string &str)
 
void addOnLineStep (const double &x, const double &y, const double &th)
 
void addStep (const double &x, const double &y, const double &th)
 
void pgCommandLine (const std::string &cmdline)
 
void debug (void)
 
Methods related to the data files.
bool buildModel (void)
 Build the pattern generator interface. More...
 
bool buildModelUrdf (void)
 Build the pattern generator interface from a Urdf file. More...
 
bool InitState (void)
 Initialize the state of the robot. More...
 
void setPreviewControlParametersFile (const std::string &filename)
 Set the directory which contains the parameters for the preview control. More...
 
void setVrmlDirectory (const std::string &filename)
 Set the directory which contains the VRML files robot's model. More...
 
void setVrmlMainFile (const std::string &filename)
 Set the name of the VRML file. More...
 
void setXmlSpecificitiesFile (const std::string &filename)
 Set the name of the file specifying a semantic to the joints. More precisely this file describes which joints are the hands, feet. For more information please see the documentation of walkGenJRL. More...
 
void setXmlRankFile (const std::string &filename)
 Set the name of the file specifying the rank of the joints in the state vector. More...
 
void setParamPreviewFile (const std::string &filename)
 Set the name of the file specifying the control parameters of the preview control. More...
 
void setUrdfDirectory (const std::string &filename)
 Set the directory which contains the urdf files robot's model. More...
 
void setUrdfMainFile (const std::string &filename)
 Set the name of the urdf file. More...
 
void setSoleParameters (const double &inSoleLength, const double &inSoleWidth)
 Set the foot parameters. More...
 
void addJointMapping (const std::string &link, const std::string &repName)
 Set mapping between a link and actual robot name. More...
 
pg::PatternGeneratorInterface * GetPatternGeneratorInterface ()
 Give access directly to the pattern generator... You really have to know what your are doing. More...
 
- Public Member Functions inherited from dynamicgraph::Entity
 Entity (const std::string &name)
 
virtual ~Entity ()
 
const std::string & getName () const
 
virtual const std::string & getClassName () const =0
 
virtual std::string getDocString () const
 
bool hasSignal (const std::string &signame) const
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual void display (std::ostream &os) const
 
virtual void commandLine (const std::string &cmdLine, std::istringstream &cmdArgs, std::ostream &os)
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
const std::string & getCommandList () const
 
CommandMap_t getNewStyleCommandMap ()
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
SignalMap getSignalMap () const
 

Public Attributes

Internal signals.
SignalTimeDependent< Dummy, int > firstSINTERN
 Internal signal for initialization and one shot signals. More...
 
SignalTimeDependent< Dummy, int > OneStepOfControlS
 Internal signal to trigger one step of the algorithm. More...
 
External signals
SignalPtr< ml::Vector, int > jointPositionSIN
 Real state position values. More...
 
SignalPtr< ml::Vector, int > motorControlJointPositionSIN
 Motor control joint position values. More...
 
SignalPtr< ml::Vector, int > ZMPPreviousControllerSIN
 Previous ZMP value (ZMP send by the preceding controller). More...
 
SignalTimeDependent
< ml::Vector, int > 
ZMPRefSOUT
 Externalize the ZMP reference . More...
 
SignalTimeDependent
< ml::Vector, int > 
CoMRefSOUT
 Externalize the CoM reference. More...
 
SignalTimeDependent
< ml::Vector, int > 
dCoMRefSOUT
 Externalize the CoM reference. More...
 
SignalPtr< ml::Vector, int > comSIN
 Take the current CoM. More...
 
SignalPtr< ml::Vector, int > velocitydesSIN
 Take the current desired velocity. More...
 
SignalPtr< MatrixHomogeneous, int > LeftFootCurrentPosSIN
 Take the current left foot homogeneous position. More...
 
SignalPtr< MatrixHomogeneous, int > RightFootCurrentPosSIN
 Take the current right foot homogeneous position. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
LeftFootRefSOUT
 Externalize the left foot position reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
RightFootRefSOUT
 Externalize the right foot position reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
dotLeftFootRefSOUT
 Externalize the left foot position reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
dotRightFootRefSOUT
 Externalize the right foot position reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
FlyingFootRefSOUT
 Externalize the foot which is not considered as support foot, the information are given in a relative referentiel. More...
 
SignalTimeDependent< unsigned
int, int > 
SupportFootSOUT
 Externalize the support foot. More...
 
SignalTimeDependent
< ml::Vector, int > 
jointWalkingErrorPositionSOUT
 Externalize the joint values for walking. More...
 
SignalTimeDependent
< VectorRollPitchYaw, int > 
comattitudeSOUT
 Externalize the com attitude. More...
 
SignalTimeDependent
< VectorRollPitchYaw, int > 
dcomattitudeSOUT
 Externalize the dcom attitude. More...
 
SignalTimeDependent
< VectorRollPitchYaw, int > 
waistattitudeSOUT
 Externalize the waist attitude. More...
 
SignalTimeDependent
< VectorRollPitchYaw, int > 
waistattitudeabsoluteSOUT
 Externalize the absolute waist attitude. More...
 
SignalTimeDependent
< ml::Vector, int > 
waistpositionSOUT
 Externalize the waist position. More...
 
SignalTimeDependent
< ml::Vector, int > 
waistpositionabsoluteSOUT
 Externalize the absolute waist position. More...
 
SignalTimeDependent< unsigned
int, int > 
dataInProcessSOUT
 true iff PG is processing. Use it for synchronize. More...
 
SignalTimeDependent
< ml::Vector, int > 
InitZMPRefSOUT
 Externalize the initial ZMP reference . More...
 
SignalTimeDependent
< ml::Vector, int > 
InitCoMRefSOUT
 Externalize the initial CoM reference. More...
 
SignalTimeDependent
< ml::Vector, int > 
InitWaistPosRefSOUT
 Externalize the initial Waist reference. More...
 
SignalTimeDependent
< VectorRollPitchYaw, int > 
InitWaistAttRefSOUT
 Externalize the initial Waist reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
InitLeftFootRefSOUT
 Externalize the left foot position reference. More...
 
SignalTimeDependent
< MatrixHomogeneous, int > 
InitRightFootRefSOUT
 Externalize the right foot position reference. More...
 
SignalTimeDependent< bool, int > leftFootContactSOUT
 Booleans for contact of the feet. More...
 
SignalTimeDependent< bool, int > rightFootContactSOUT
 

Static Public Attributes

Some constant to define the type

of frame reference.

static const int WORLD_FRAME =0
 Specify that the frame is expressed in the world reference frame. More...
 
static const int EGOCENTERED_FRAME = 1
 Specify that the frame is expressed in the robot ego centered frame. More...
 
static const int LEFT_FOOT_CENTERED_FRAME = 2
 Specify that the frame is expressed in the left foot centered frame. More...
 
static const int WAIST_CENTERED_FRAME = 3
 Specify that the frame is expressed in the waist centered frame. More...
 

Protected Member Functions

unsigned int & getSupportFoot (unsigned int &res, int time)
 Getting the current support foot: 1 Left -1 Right. More...
 
int & InitOneStepOfControl (int &dummy, int time)
 Trigger the initialization of the algorithm. More...
 
int & OneStepOfControl (int &dummy, int time)
 Trigger one step of the algorithm. More...
 
void ParseCmdFile (std::istringstream &cmdArg, std::ostream &os)
 
void FromAbsoluteFootPosToDotHomogeneous (pg::FootAbsolutePosition aFootPosition, MatrixHomogeneous &aFootMH, MatrixHomogeneous &adotFootMH)
 Transfert from a current absolute foot position to a dot homogeneous matrix. More...
 
void FromAbsoluteFootPosToHomogeneous (pg::FootAbsolutePosition aFootPosition, MatrixHomogeneous &aFootMH)
 Transfert from a current absolute foot position to a homogeneous matrix. More...
 
void getAbsoluteWaistPosAttHomogeneousMatrix (MatrixHomogeneous &aWaistMH)
 Provide an homogeneous matrix from the current waist position and attitude. More...
 
ml::VectorgetInitZMPRef (ml::Vector &res, int time)
 Internal method to get the initial reference ZMP at a given time. More...
 
ml::VectorgetInitCoMRef (ml::Vector &res, int time)
 Internal method to get the initial reference CoM at a given time. More...
 
ml::VectorgetInitWaistPosRef (ml::Vector &res, int time)
 Internal method to get the initial reference CoM at a given time. More...
 
VectorRollPitchYawgetInitWaistAttRef (VectorRollPitchYaw &res, int time)
 Internal method to get the initial reference CoM at a given time. More...
 
MatrixHomogeneousgetInitLeftFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the position of the left foot. More...
 
MatrixHomogeneousgetInitRightFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the position of the right foot. More...
 
bool & getLeftFootContact (bool &res, int time)
 Internal method to get the information of contact or not on the feet. More...
 
bool & getRightFootContact (bool &res, int time)
 
 MAL_VECTOR (m_ZMPPrevious, double)
 
Internal methods to access reference trajectories.
ml::VectorgetZMPRef (ml::Vector &res, int time)
 Internal method to get the reference ZMP at a given time. More...
 
ml::VectorgetCoMRef (ml::Vector &res, int time)
 Internal method to get the reference CoM at a given time. More...
 
ml::VectorgetdCoMRef (ml::Vector &res, int time)
 Internal method to get the reference dCoM at a given time. More...
 
MatrixHomogeneousgetLeftFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the position of the left foot. More...
 
MatrixHomogeneousgetRightFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the position of the right foot. More...
 
MatrixHomogeneousgetdotLeftFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the derivative of the left foot. More...
 
MatrixHomogeneousgetdotRightFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the derivative of the right foot. More...
 
MatrixHomogeneousgetFlyingFootRef (MatrixHomogeneous &res, int time)
 Internal method to get the position of the flying foot. More...
 
ml::VectorgetjointWalkingErrorPosition (ml::Vector &res, int time)
 Internal method to get the joint position for walking. More...
 
VectorRollPitchYawgetdComAttitude (VectorRollPitchYaw &res, int time)
 Internal method to get the derivative of the com attitude. More...
 
VectorRollPitchYawgetComAttitude (VectorRollPitchYaw &res, int time)
 Internal method to get the attitude of the com. More...
 
VectorRollPitchYawgetWaistAttitude (VectorRollPitchYaw &res, int time)
 Internal method to get the attitude of the waist. More...
 
VectorRollPitchYawgetWaistAttitudeAbsolute (VectorRollPitchYaw &res, int time)
 Internal method to get the absolute attitude of the waist. More...
 
unsigned & getDataInProcess (unsigned &res, int time)
 Internal method to get the dataInPorcess flag. More...
 
ml::VectorgetWaistPosition (ml::Vector &res, int time)
 Internal method to get the position of the waist. More...
 
ml::VectorgetWaistPositionAbsolute (ml::Vector &res, int time)
 Internal method to get the absolute position of the waist. More...
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityRegistration ()
 
void entityDeregistration ()
 
void signalRegistration (const SignalArray< int > &signals)
 
void signalDeregistration (const std::string &name)
 

Protected Attributes

pg::PatternGeneratorInterface * m_PGI
 Pointer towards the interface of the pattern generator. More...
 
bool m_init
 Boolean variable to initialize the object by loading an object. More...
 
bool m_InitPositionByRealState
 Boolean variable to initialize the position: first through the real state of the robot, then through the motor command. More...
 
int m_SupportFoot
 Integer for the support foot. More...
 
int m_ReferenceFrame
 Keep the frame reference. More...
 
double m_AnkleSoilDistance
 Distance between ankle and soil. More...
 
double m_TimeStep
 Time step. More...
 
bool m_DoubleSupportPhaseState
 Double support phase detected. More...
 
int m_DSStartingTime
 
unsigned int m_LocalTime
 iteration time. More...
 
Fields to store name and positions of data files
std::string m_PreviewControlParametersFile
 Some information related to the preview control. More...
 
std::string m_vrmlDirectory
 Directory where the VRML file of the robot's model is located. More...
 
std::string m_vrmlMainFile
 Name of the VRML file which containes the robot's model. More...
 
std::string m_xmlSpecificitiesFile
 Name of the XML file which contains humanoid specific informations. More...
 
std::string m_xmlRankFile
 Name of the XML file which specificies the rank of the Joints in the state vector. More...
 
std::string m_urdfDirectory
 Directory where the VRML file of the robot's model is located. More...
 
std::string m_urdfMainFile
 Name of the VRML file which containes the robot's model. More...
 
double m_soleLength
 Lenght of the sole. More...
 
double m_soleWidth
 Width of the sole. More...
 
std::map< std::string,
std::string > 
specialJoints_
 
Keep information computed once for each time.
MatrixHomogeneous m_k_Waist_kp1
 Rigit motion between two waist positions at the beginning of the walking and at the end of the walking. More...
 
MatrixHomogeneous m_LeftFootPosition
 Absolute Position for the left and right feet. More...
 
MatrixHomogeneous m_RightFootPosition
 
MatrixHomogeneous m_dotLeftFootPosition
 Absolute Derivate for the left and right feet. More...
 
MatrixHomogeneous m_dotRightFootPosition
 
MatrixHomogeneous m_InitLeftFootPosition
 Initial Absolute Starting Position for the left and right feet. More...
 
MatrixHomogeneous m_InitRightFootPosition
 
MatrixHomogeneous m_MotionSinceInstanciationToThisSequence
 Keep track of the motion between sequence of motions. More...
 
MatrixHomogeneous m_FlyingFootPosition
 Relative Position of the flying foot. More...
 
ml::Vector m_ZMPRefPos
 Absolute position of the reference ZMP. More...
 
ml::Vector m_ComAttitude
 Com Attitude: does not really exist apart from when the robot is seen as an inverted pendulum. More...
 
ml::Vector m_dComAttitude
 Com Attitude: does not really exist apart when the robot is seen as an inverted pendulum. More...
 
ml::Vector m_COMRefPos
 Absolute position of the reference CoM. More...
 
ml::Vector m_dCOMRefPos
 Absolute position of the reference dCoM. More...
 
ml::Vector m_InitZMPRefPos
 Initial Absolute position of the reference ZMP. More...
 
ml::Vector m_InitWaistRefPos
 Initial Absolute position and attitude of the reference Waist. More...
 
ml::Vector m_InitWaistRefAtt
 
ml::Vector m_InitCOMRefPos
 Initial Absolute position of the reference CoM. More...
 
ml::Vector m_WaistPosition
 Waist position. More...
 
ml::Vector m_WaistPositionAbsolute
 Waist position Absolute. More...
 
ml::Vector m_WaistAttitude
 Waist Attitude. More...
 
ml::Vector m_WaistAttitudeAbsolute
 Waist Attitude Absolute. More...
 
ml::Vector m_JointErrorValuesForWalking
 Joint values for walking. More...
 
ml::Vector m_VelocityReference
 Velocity reference for Herdt's PG. More...
 
unsigned int m_dataInProcess
 true iff the pattern if dealing with data, false if pg is not working anymore/yet. More...
 
bool m_rightFootContact
 Booleans used to indicate feet contacts. More...
 
bool m_leftFootContact
 
- Protected Attributes inherited from dynamicgraph::Entity
std::string name
 
SignalMap signalMap
 
CommandMap_t commandMap
 

Detailed Description

This class provides dynamically stable CoM, ZMP, feet trajectories. It wraps up the algorithms implemented by the walkGenJRL library.

Member Typedef Documentation

Constructor & Destructor Documentation

dynamicgraph::sot::PatternGenerator::PatternGenerator ( const std::string &  name = "PatternGenerator")

Default constructor.

virtual dynamicgraph::sot::PatternGenerator::~PatternGenerator ( void  )
virtual

Default destructor.

Member Function Documentation

void dynamicgraph::sot::PatternGenerator::addJointMapping ( const std::string &  link,
const std::string &  repName 
)

Set mapping between a link and actual robot name.

void dynamicgraph::sot::PatternGenerator::addOnLineStep ( const double &  x,
const double &  y,
const double &  th 
)
void dynamicgraph::sot::PatternGenerator::addStep ( const double &  x,
const double &  y,
const double &  th 
)
bool dynamicgraph::sot::PatternGenerator::buildModel ( void  )

Build the pattern generator interface.

bool dynamicgraph::sot::PatternGenerator::buildModelUrdf ( void  )

Build the pattern generator interface from a Urdf file.

void dynamicgraph::sot::PatternGenerator::debug ( void  )
dynamicgraph::sot::PatternGenerator::DYNAMIC_GRAPH_ENTITY_DECL ( )

Class name

void dynamicgraph::sot::PatternGenerator::FromAbsoluteFootPosToDotHomogeneous ( pg::FootAbsolutePosition  aFootPosition,
MatrixHomogeneous aFootMH,
MatrixHomogeneous adotFootMH 
)
protected

Transfert from a current absolute foot position to a dot homogeneous matrix.

void dynamicgraph::sot::PatternGenerator::FromAbsoluteFootPosToHomogeneous ( pg::FootAbsolutePosition  aFootPosition,
MatrixHomogeneous aFootMH 
)
protected

Transfert from a current absolute foot position to a homogeneous matrix.

void dynamicgraph::sot::PatternGenerator::getAbsoluteWaistPosAttHomogeneousMatrix ( MatrixHomogeneous aWaistMH)
protected

Provide an homogeneous matrix from the current waist position and attitude.

VectorRollPitchYaw& dynamicgraph::sot::PatternGenerator::getComAttitude ( VectorRollPitchYaw res,
int  time 
)
protected

Internal method to get the attitude of the com.

ml::Vector& dynamicgraph::sot::PatternGenerator::getCoMRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the reference CoM at a given time.

unsigned& dynamicgraph::sot::PatternGenerator::getDataInProcess ( unsigned &  res,
int  time 
)
protected

Internal method to get the dataInPorcess flag.

VectorRollPitchYaw& dynamicgraph::sot::PatternGenerator::getdComAttitude ( VectorRollPitchYaw res,
int  time 
)
protected

Internal method to get the derivative of the com attitude.

ml::Vector& dynamicgraph::sot::PatternGenerator::getdCoMRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the reference dCoM at a given time.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getdotLeftFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the derivative of the left foot.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getdotRightFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the derivative of the right foot.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getFlyingFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the position of the flying foot.

ml::Vector& dynamicgraph::sot::PatternGenerator::getInitCoMRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the initial reference CoM at a given time.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getInitLeftFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the position of the left foot.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getInitRightFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the position of the right foot.

VectorRollPitchYaw& dynamicgraph::sot::PatternGenerator::getInitWaistAttRef ( VectorRollPitchYaw res,
int  time 
)
protected

Internal method to get the initial reference CoM at a given time.

ml::Vector& dynamicgraph::sot::PatternGenerator::getInitWaistPosRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the initial reference CoM at a given time.

ml::Vector& dynamicgraph::sot::PatternGenerator::getInitZMPRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the initial reference ZMP at a given time.

ml::Vector& dynamicgraph::sot::PatternGenerator::getjointWalkingErrorPosition ( ml::Vector res,
int  time 
)
protected

Internal method to get the joint position for walking.

bool& dynamicgraph::sot::PatternGenerator::getLeftFootContact ( bool &  res,
int  time 
)
protected

Internal method to get the information of contact or not on the feet.

MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getLeftFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the position of the left foot.

pg::PatternGeneratorInterface* dynamicgraph::sot::PatternGenerator::GetPatternGeneratorInterface ( )
inline

Give access directly to the pattern generator... You really have to know what your are doing.

bool& dynamicgraph::sot::PatternGenerator::getRightFootContact ( bool &  res,
int  time 
)
protected
MatrixHomogeneous& dynamicgraph::sot::PatternGenerator::getRightFootRef ( MatrixHomogeneous res,
int  time 
)
protected

Internal method to get the position of the right foot.

unsigned int& dynamicgraph::sot::PatternGenerator::getSupportFoot ( unsigned int &  res,
int  time 
)
protected

Getting the current support foot: 1 Left -1 Right.

VectorRollPitchYaw& dynamicgraph::sot::PatternGenerator::getWaistAttitude ( VectorRollPitchYaw res,
int  time 
)
protected

Internal method to get the attitude of the waist.

VectorRollPitchYaw& dynamicgraph::sot::PatternGenerator::getWaistAttitudeAbsolute ( VectorRollPitchYaw res,
int  time 
)
protected

Internal method to get the absolute attitude of the waist.

ml::Vector& dynamicgraph::sot::PatternGenerator::getWaistPosition ( ml::Vector res,
int  time 
)
protected

Internal method to get the position of the waist.

ml::Vector& dynamicgraph::sot::PatternGenerator::getWaistPositionAbsolute ( ml::Vector res,
int  time 
)
protected

Internal method to get the absolute position of the waist.

ml::Vector& dynamicgraph::sot::PatternGenerator::getZMPRef ( ml::Vector res,
int  time 
)
protected

Internal method to get the reference ZMP at a given time.

void dynamicgraph::sot::PatternGenerator::initCommands ( void  )
int& dynamicgraph::sot::PatternGenerator::InitOneStepOfControl ( int &  dummy,
int  time 
)
protected

Trigger the initialization of the algorithm.

bool dynamicgraph::sot::PatternGenerator::InitState ( void  )

Initialize the state of the robot.

dynamicgraph::sot::PatternGenerator::MAL_VECTOR ( m_ZMPPrevious  ,
double   
)
protected

Storing the previous ZMP value.

int& dynamicgraph::sot::PatternGenerator::OneStepOfControl ( int &  dummy,
int  time 
)
protected

Trigger one step of the algorithm.

void dynamicgraph::sot::PatternGenerator::ParseCmdFile ( std::istringstream &  cmdArg,
std::ostream &  os 
)
protected
    Parsing a file of command by the walking pattern generator interface.
[in] The command line (optional option)
[in]
void dynamicgraph::sot::PatternGenerator::pgCommandLine ( const std::string &  cmdline)
void dynamicgraph::sot::PatternGenerator::setParamPreviewFile ( const std::string &  filename)

Set the name of the file specifying the control parameters of the preview control.

void dynamicgraph::sot::PatternGenerator::setPreviewControlParametersFile ( const std::string &  filename)

Set the directory which contains the parameters for the preview control.

void dynamicgraph::sot::PatternGenerator::setReferenceFromString ( const std::string &  str)
void dynamicgraph::sot::PatternGenerator::setSoleParameters ( const double &  inSoleLength,
const double &  inSoleWidth 
)

Set the foot parameters.

void dynamicgraph::sot::PatternGenerator::setUrdfDirectory ( const std::string &  filename)

Set the directory which contains the urdf files robot's model.

void dynamicgraph::sot::PatternGenerator::setUrdfMainFile ( const std::string &  filename)

Set the name of the urdf file.

void dynamicgraph::sot::PatternGenerator::setVrmlDirectory ( const std::string &  filename)

Set the directory which contains the VRML files robot's model.

void dynamicgraph::sot::PatternGenerator::setVrmlMainFile ( const std::string &  filename)

Set the name of the VRML file.

void dynamicgraph::sot::PatternGenerator::setXmlRankFile ( const std::string &  filename)

Set the name of the file specifying the rank of the joints in the state vector.

void dynamicgraph::sot::PatternGenerator::setXmlSpecificitiesFile ( const std::string &  filename)

Set the name of the file specifying a semantic to the joints. More precisely this file describes which joints are the hands, feet. For more information please see the documentation of walkGenJRL.

int dynamicgraph::sot::PatternGenerator::stringToReferenceEnum ( const std::string &  FrameReference)

Member Data Documentation

SignalTimeDependent<VectorRollPitchYaw,int> dynamicgraph::sot::PatternGenerator::comattitudeSOUT

Externalize the com attitude.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::CoMRefSOUT

Externalize the CoM reference.

SignalPtr<ml::Vector,int> dynamicgraph::sot::PatternGenerator::comSIN

Take the current CoM.

SignalTimeDependent<unsigned int,int> dynamicgraph::sot::PatternGenerator::dataInProcessSOUT

true iff PG is processing. Use it for synchronize.

SignalTimeDependent<VectorRollPitchYaw,int> dynamicgraph::sot::PatternGenerator::dcomattitudeSOUT

Externalize the dcom attitude.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::dCoMRefSOUT

Externalize the CoM reference.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::dotLeftFootRefSOUT

Externalize the left foot position reference.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::dotRightFootRefSOUT

Externalize the right foot position reference.

const int dynamicgraph::sot::PatternGenerator::EGOCENTERED_FRAME = 1
static

Specify that the frame is expressed in the robot ego centered frame.

SignalTimeDependent<Dummy,int> dynamicgraph::sot::PatternGenerator::firstSINTERN

Internal signal for initialization and one shot signals.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::FlyingFootRefSOUT

Externalize the foot which is not considered as support foot, the information are given in a relative referentiel.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::InitCoMRefSOUT

Externalize the initial CoM reference.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::InitLeftFootRefSOUT

Externalize the left foot position reference.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::InitRightFootRefSOUT

Externalize the right foot position reference.

SignalTimeDependent<VectorRollPitchYaw,int> dynamicgraph::sot::PatternGenerator::InitWaistAttRefSOUT

Externalize the initial Waist reference.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::InitWaistPosRefSOUT

Externalize the initial Waist reference.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::InitZMPRefSOUT

Externalize the initial ZMP reference .

SignalPtr<ml::Vector,int> dynamicgraph::sot::PatternGenerator::jointPositionSIN

Real state position values.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::jointWalkingErrorPositionSOUT

Externalize the joint values for walking.

const int dynamicgraph::sot::PatternGenerator::LEFT_FOOT_CENTERED_FRAME = 2
static

Specify that the frame is expressed in the left foot centered frame.

SignalTimeDependent<bool,int> dynamicgraph::sot::PatternGenerator::leftFootContactSOUT

Booleans for contact of the feet.

SignalPtr<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::LeftFootCurrentPosSIN

Take the current left foot homogeneous position.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::LeftFootRefSOUT

Externalize the left foot position reference.

double dynamicgraph::sot::PatternGenerator::m_AnkleSoilDistance
protected

Distance between ankle and soil.

ml::Vector dynamicgraph::sot::PatternGenerator::m_ComAttitude
protected

Com Attitude: does not really exist apart from when the robot is seen as an inverted pendulum.

ml::Vector dynamicgraph::sot::PatternGenerator::m_COMRefPos
protected

Absolute position of the reference CoM.

unsigned int dynamicgraph::sot::PatternGenerator::m_dataInProcess
protected

true iff the pattern if dealing with data, false if pg is not working anymore/yet.

ml::Vector dynamicgraph::sot::PatternGenerator::m_dComAttitude
protected

Com Attitude: does not really exist apart when the robot is seen as an inverted pendulum.

ml::Vector dynamicgraph::sot::PatternGenerator::m_dCOMRefPos
protected

Absolute position of the reference dCoM.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_dotLeftFootPosition
protected

Absolute Derivate for the left and right feet.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_dotRightFootPosition
protected
bool dynamicgraph::sot::PatternGenerator::m_DoubleSupportPhaseState
protected

Double support phase detected.

int dynamicgraph::sot::PatternGenerator::m_DSStartingTime
protected
MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_FlyingFootPosition
protected

Relative Position of the flying foot.

bool dynamicgraph::sot::PatternGenerator::m_init
protected

Boolean variable to initialize the object by loading an object.

ml::Vector dynamicgraph::sot::PatternGenerator::m_InitCOMRefPos
protected

Initial Absolute position of the reference CoM.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_InitLeftFootPosition
protected

Initial Absolute Starting Position for the left and right feet.

bool dynamicgraph::sot::PatternGenerator::m_InitPositionByRealState
protected

Boolean variable to initialize the position: first through the real state of the robot, then through the motor command.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_InitRightFootPosition
protected
ml::Vector dynamicgraph::sot::PatternGenerator::m_InitWaistRefAtt
protected
ml::Vector dynamicgraph::sot::PatternGenerator::m_InitWaistRefPos
protected

Initial Absolute position and attitude of the reference Waist.

ml::Vector dynamicgraph::sot::PatternGenerator::m_InitZMPRefPos
protected

Initial Absolute position of the reference ZMP.

ml::Vector dynamicgraph::sot::PatternGenerator::m_JointErrorValuesForWalking
protected

Joint values for walking.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_k_Waist_kp1
protected

Rigit motion between two waist positions at the beginning of the walking and at the end of the walking.

bool dynamicgraph::sot::PatternGenerator::m_leftFootContact
protected
MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_LeftFootPosition
protected

Absolute Position for the left and right feet.

unsigned int dynamicgraph::sot::PatternGenerator::m_LocalTime
protected

iteration time.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_MotionSinceInstanciationToThisSequence
protected

Keep track of the motion between sequence of motions.

pg::PatternGeneratorInterface* dynamicgraph::sot::PatternGenerator::m_PGI
protected

Pointer towards the interface of the pattern generator.

std::string dynamicgraph::sot::PatternGenerator::m_PreviewControlParametersFile
protected

Some information related to the preview control.

int dynamicgraph::sot::PatternGenerator::m_ReferenceFrame
protected

Keep the frame reference.

bool dynamicgraph::sot::PatternGenerator::m_rightFootContact
protected

Booleans used to indicate feet contacts.

MatrixHomogeneous dynamicgraph::sot::PatternGenerator::m_RightFootPosition
protected
double dynamicgraph::sot::PatternGenerator::m_soleLength
protected

Lenght of the sole.

double dynamicgraph::sot::PatternGenerator::m_soleWidth
protected

Width of the sole.

int dynamicgraph::sot::PatternGenerator::m_SupportFoot
protected

Integer for the support foot.

double dynamicgraph::sot::PatternGenerator::m_TimeStep
protected

Time step.

std::string dynamicgraph::sot::PatternGenerator::m_urdfDirectory
protected

Directory where the VRML file of the robot's model is located.

std::string dynamicgraph::sot::PatternGenerator::m_urdfMainFile
protected

Name of the VRML file which containes the robot's model.

ml::Vector dynamicgraph::sot::PatternGenerator::m_VelocityReference
protected

Velocity reference for Herdt's PG.

std::string dynamicgraph::sot::PatternGenerator::m_vrmlDirectory
protected

Directory where the VRML file of the robot's model is located.

std::string dynamicgraph::sot::PatternGenerator::m_vrmlMainFile
protected

Name of the VRML file which containes the robot's model.

ml::Vector dynamicgraph::sot::PatternGenerator::m_WaistAttitude
protected

Waist Attitude.

ml::Vector dynamicgraph::sot::PatternGenerator::m_WaistAttitudeAbsolute
protected

Waist Attitude Absolute.

ml::Vector dynamicgraph::sot::PatternGenerator::m_WaistPosition
protected

Waist position.

ml::Vector dynamicgraph::sot::PatternGenerator::m_WaistPositionAbsolute
protected

Waist position Absolute.

std::string dynamicgraph::sot::PatternGenerator::m_xmlRankFile
protected

Name of the XML file which specificies the rank of the Joints in the state vector.

std::string dynamicgraph::sot::PatternGenerator::m_xmlSpecificitiesFile
protected

Name of the XML file which contains humanoid specific informations.

ml::Vector dynamicgraph::sot::PatternGenerator::m_ZMPRefPos
protected

Absolute position of the reference ZMP.

SignalPtr<ml::Vector,int> dynamicgraph::sot::PatternGenerator::motorControlJointPositionSIN

Motor control joint position values.

SignalTimeDependent<Dummy,int> dynamicgraph::sot::PatternGenerator::OneStepOfControlS

Internal signal to trigger one step of the algorithm.

SignalTimeDependent<bool,int> dynamicgraph::sot::PatternGenerator::rightFootContactSOUT
SignalPtr<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::RightFootCurrentPosSIN

Take the current right foot homogeneous position.

SignalTimeDependent<MatrixHomogeneous,int> dynamicgraph::sot::PatternGenerator::RightFootRefSOUT

Externalize the right foot position reference.

std::map<std::string, std::string> dynamicgraph::sot::PatternGenerator::specialJoints_
protected
SignalTimeDependent<unsigned int,int> dynamicgraph::sot::PatternGenerator::SupportFootSOUT

Externalize the support foot.

SignalPtr<ml::Vector,int> dynamicgraph::sot::PatternGenerator::velocitydesSIN

Take the current desired velocity.

const int dynamicgraph::sot::PatternGenerator::WAIST_CENTERED_FRAME = 3
static

Specify that the frame is expressed in the waist centered frame.

SignalTimeDependent<VectorRollPitchYaw,int> dynamicgraph::sot::PatternGenerator::waistattitudeabsoluteSOUT

Externalize the absolute waist attitude.

SignalTimeDependent<VectorRollPitchYaw,int> dynamicgraph::sot::PatternGenerator::waistattitudeSOUT

Externalize the waist attitude.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::waistpositionabsoluteSOUT

Externalize the absolute waist position.

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::waistpositionSOUT

Externalize the waist position.

const int dynamicgraph::sot::PatternGenerator::WORLD_FRAME =0
static

Specify that the frame is expressed in the world reference frame.

SignalPtr<ml::Vector,int> dynamicgraph::sot::PatternGenerator::ZMPPreviousControllerSIN

Previous ZMP value (ZMP send by the preceding controller).

SignalTimeDependent<ml::Vector,int> dynamicgraph::sot::PatternGenerator::ZMPRefSOUT

Externalize the ZMP reference .