Commit 8777573f authored by Olivier Stasse's avatar Olivier Stasse

Fixed 80 cols.

parent 0b665a37
Pipeline #5067 failed with stage
in 49 seconds
......@@ -23,7 +23,8 @@
*/
/*!\file FootTrajectoryGenerationAbstract.h
\brief This class determinate how it s generate all the values for the foot trajectories.
\brief This class determinate how it s generate all the values for the foot
trajectories.
@ingroup foottrajectorygeneration
*/
......@@ -48,7 +49,8 @@ namespace PatternGeneratorJRL
{
/** @ingroup foottrajectorygeneration
This class defines the abstract interface to interact with foot generation object.
This class defines the abstract interface to interact with
foot generation object.
Two parameters \f$ T_{DS} \f$ and \f$ T_{SS} \f$ defines respectively
the double support time and the single support time.
......@@ -67,8 +69,8 @@ namespace PatternGeneratorJRL
should call InitializeInternalDataStructures() once all the internal
parameters of the object are set.
The virtual function FreeInternalDataStructures() is used when changing some
parameters and by the destructor.
The virtual function FreeInternalDataStructures() is used when changing
some parameters and by the destructor.
The most important function is UpdateFootPosition() which populates a
queue of foot absolute positions data structure.
......@@ -90,36 +92,44 @@ namespace PatternGeneratorJRL
/*! Default destructor. */
virtual ~FootTrajectoryGenerationAbstract() {};
/*! This method computes the position of the swinging foot during single support phase,
and maintian a constant position for the support foot.
@param SupportFootAbsolutePositions: Queue of absolute position for the support foot.
This method will set the foot position at index CurrentAbsoluteIndex of the queue.
/*! This method computes the position of the swinging foot during
single support phase, and maintian a constant position
for the support foot.
@param SupportFootAbsolutePositions: Queue of absolute position for the
support foot.
This method will set the foot position at index CurrentAbsoluteIndex
of the queue.
This position is supposed to be constant.
@param NoneSupportFootAbsolutePositions: Queue of absolute position for the swinging
foot. This method will set the foot position at index NoneSupportFootAbsolutePositions
@param NoneSupportFootAbsolutePositions: Queue of absolute position
for the swinging
foot. This method will set the foot position at index
NoneSupportFootAbsolutePositions
of the queue.
@param CurrentAbsoluteIndex: Index in the queues of the foot position to be set.
@param IndexInitial: Index in the queues which correspond to the starting point
of the current single support phase.
@param CurrentAbsoluteIndex: Index in the queues of the foot position to
be set.
@param IndexInitial: Index in the queues which correspond to the
starting point of the current single support phase.
@param ModulatedSingleSupportTime: Amount of time where the foot is flat.
@param StepType: Type of steps (for book-keeping).
@param LeftOrRight: Specify if it is left (1) or right (-1).
*/
virtual void UpdateFootPosition(std::deque<FootAbsolutePosition>
&SupportFootAbsolutePositions,
std::deque<FootAbsolutePosition> &NoneSupportFootAbsolutePositions,
int CurrentAbsoluteIndex,
int IndexInitial,
double ModulatedSingleSupportTime,
int StepType, int LeftOrRight);
virtual void UpdateFootPosition(std::deque<FootAbsolutePosition>
&SupportFootAbsolutePositions,
std::deque<FootAbsolutePosition> &NoneSupportFootAbsolutePositions,
int StartIndex, int k,
double LocalInterpolationStartTime,
double ModulatedSingleSupportTime,
int StepType, int LeftOrRight);
virtual void UpdateFootPosition
(std::deque<FootAbsolutePosition>
&SupportFootAbsolutePositions,
std::deque<FootAbsolutePosition> &NoneSupportFootAbsolutePositions,
int CurrentAbsoluteIndex,
int IndexInitial,
double ModulatedSingleSupportTime,
int StepType, int LeftOrRight);
virtual void UpdateFootPosition
(std::deque<FootAbsolutePosition>
&SupportFootAbsolutePositions,
std::deque<FootAbsolutePosition> &NoneSupportFootAbsolutePositions,
int StartIndex, int k,
double LocalInterpolationStartTime,
double ModulatedSingleSupportTime,
int StepType, int LeftOrRight);
/*! Initialize internal data structures. */
virtual void InitializeInternalDataStructures()=0;
......
......@@ -67,9 +67,11 @@ namespace PatternGeneratorJRL
/*! \name Single support foot subcategories
@{ */
/*! \brief The robot is in single support and the foot considered is the support foot */
/*! \brief The robot is in single support and the foot
considered is the support foot */
const static int SINGLE_SUPPORT_SUPPORT=1;
/*! \brief The robot is in single support and the foot considered is flying. */
/*! \brief The robot is in single support and
the foot considered is flying. */
const static int SINGLE_SUPPORT_FLYING=2;
/*! @} */
......@@ -130,15 +132,18 @@ namespace PatternGeneratorJRL
/*! \brief Compute the value asked for according to :
@param[in] t: the time,
@param[in] IndexInterval: Index of the interval to be used for the computation.
@param[in] IndexInterval: Index of the interval to be used
for the computation.
@param[out] aFootAbsolutePosition: a foot absolute position.
*/
bool Compute(double t, FootAbsolutePosition & aFootAbsolutePosition,
unsigned int IndexInterval);
/*! This method specifies the parameters for each of the polynome used by this
object. In this case, as it is used for the 3rd order polynome. The polynome to
which those parameters are set is specified with PolynomeIndex.
/*! This method specifies the parameters for each of the polynome
used by this
object. In this case, as it is used for the 3rd order polynome.
The polynome to which those parameters are set is specified
with PolynomeIndex.
@param PolynomeIndex: Set to which axis the parameters will be applied.
@param TimeInterval: Set the time base of the polynome.
@param Position: Set the final position of the polynome at TimeInterval.
......@@ -148,53 +153,68 @@ namespace PatternGeneratorJRL
double TimeInterval,
double FinalPosition);
/*! This method specifies the parameters for each of the polynome used by this
object. In this case, as it is used for the 3rd order polynome. The polynome to
/*! This method specifies the parameters for each of the polynome used
by this object.
In this case, as it is used for the 3rd order polynome. The polynome to
which those parameters are set is specified with PolynomeIndex.
@param PolynomeIndex: Set to which axis the parameters will be applied.
@param AxisReference: Index to the axis to be used.
@param TimeInterval: Set the time base of the polynome.
@param FinalPosition: Set the final position of the polynome at TimeInterval.
@param InitPosition: Initial position when computing the polynome at t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at t=m_AbsoluteTimeReference.
@param FinalPosition: Set the final position of the polynome at
TimeInterval.
@param InitPosition: Initial position when computing the polynome at
t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at
t=m_AbsoluteTimeReference.
*/
int SetParametersWithInitPosInitSpeed(unsigned int PolynomeIndex,
int AxisReference,
double TimeInterval,
double FinalPosition,
double InitPosition,
double InitSpeed,
vector<double> MiddlePos=vector<double>(3,-1));
/*! This method specifies the parameters for each of the polynome used by this
object. In this case, as it is used for the 3rd order polynome. The polynome to
int SetParametersWithInitPosInitSpeed
(unsigned int PolynomeIndex,
int AxisReference,
double TimeInterval,
double FinalPosition,
double InitPosition,
double InitSpeed,
vector<double> MiddlePos=vector<double>(3,-1));
/*! This method specifies the parameters for each of the polynome used by
this object.
In this case, as it is used for the 3rd order polynome. The polynome to
which those parameters are set is specified with PolynomeIndex.
@param PolynomeIndex: Set to which axis the parameters will be applied.
@param AxisReference: Index to the axis to be used.
@param TimeInterval: Set the time base of the polynome.
@param FinalPosition: Set the final position of the polynome at TimeInterval.
@param InitPosition: Initial position when computing the polynome at t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at t=m_AbsoluteTimeReference.
@param InitAcc: Initial speed when computing the polynome at t=m_AbsoluteTimeReference.
@param FinalPosition: Set the final position of the polynome at
TimeInterval.
@param InitPosition: Initial position when computing the polynome at
t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at
t=m_AbsoluteTimeReference.
@param InitAcc: Initial speed when computing the polynome at
t=m_AbsoluteTimeReference.
*/
int SetParametersWithInitPosInitSpeedInitAcc(unsigned int PolynomeIndex,
int AxisReference,
double TimeInterval,
double FinalPosition,
double InitPosition,
double InitSpeed,
double InitAcc,
vector<double> middlePos = vector<double>(3,-1));
int SetParametersWithInitPosInitSpeedInitAcc
(unsigned int PolynomeIndex,
int AxisReference,
double TimeInterval,
double FinalPosition,
double InitPosition,
double InitSpeed,
double InitAcc,
vector<double> middlePos = vector<double>(3,-1));
/*! This method gets the parameters for each of the polynome used by this
object. In this case, as it is used for the 3rd order polynome. The polynome to
which those parameters are set is specified with PolynomeIndex.
object. In this case, as it is used for the 3rd order polynome.
The polynome to which those parameters are set is specified with
PolynomeIndex.
@param PolynomeIndex: Set to which axis the parameters will be applied.
@param AxisReference: Index to the axis to be used.
@param TimeInterval: Set the time base of the polynome.
@param FinalPosition: Set the final position of the polynome at TimeInterval.
@param InitPosition: Initial position when computing the polynome at t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at t=m_AbsoluteTimeReference.
@param FinalPosition: Set the final position of the polynome at
TimeInterval.
@param InitPosition: Initial position when computing the polynome at
t= m_AbsoluteTimeReference.
@param InitSpeed: Initial speed when computing the polynome at
t=m_AbsoluteTimeReference.
*/
int GetParametersWithInitPosInitSpeed(unsigned int PolynomeIndex,
int AxisReference,
......@@ -215,12 +235,13 @@ namespace PatternGeneratorJRL
/*! @} */
FootTrajectoryGenerationMultiple & operator=(const
FootTrajectoryGenerationMultiple & aFTGM);
FootTrajectoryGenerationMultiple & operator=
(const FootTrajectoryGenerationMultiple & aFTGM);
protected:
/*! \brief Handle a set of object allowing the generation of the foot trajectory.*/
/*! \brief Handle a set of object allowing the generation of the foot
trajectory.*/
std::vector<FootTrajectoryGenerationStandard *>
m_SetOfFootTrajectoryGenerationObjects;
......
......@@ -630,8 +630,10 @@ InitializeFromRelativeSteps
<< LeftFootTmpFinalPos.dy << " , "
<< LeftFootTmpFinalPos.dz << " ) " );
ODEBUG("RightFootTmpInitPos.stepType="<<RightFootTmpInitPos.stepType);
ODEBUG("RightFootTmpFinalPos.stepType="<<RightFootTmpFinalPos.stepType);
ODEBUG("RightFootTmpInitPos.stepType=" <<
RightFootTmpInitPos.stepType);
ODEBUG("RightFootTmpFinalPos.stepType=" <<
RightFootTmpFinalPos.stepType);
ODEBUG("End of Single support phase");
SetAnInterval(IntervalIndex,m_RightFootTrajectory,
RightFootTmpInitPos,
......@@ -663,7 +665,8 @@ InitializeFromRelativeSteps
/*! At this stage the phase of double support is dealt with */
unsigned int limitk=1;
/*! If we are at the end a second double support phase has to be added. */
/*! If we are at the end a second double support phase
has to be added. */
if (i==RelativeFootPositions.size()-1)
limitk=2;
......
......@@ -431,7 +431,8 @@ interpolate_feet_positions
FinalRightFootTraj_deq [CurrentIndex+k].ddtheta = 0.0 ;
FinalLeftFootTraj_deq[CurrentIndex+k].time =
FinalRightFootTraj_deq[CurrentIndex+k].time = Time+k*m_SamplingPeriod;
FinalRightFootTraj_deq[CurrentIndex+k].time =
Time+k*m_SamplingPeriod;
FinalLeftFootTraj_deq[CurrentIndex+k].stepType =
FinalRightFootTraj_deq[CurrentIndex+k].stepType = 10;
}
......@@ -522,7 +523,8 @@ interpolate_feet_positions
StepType, 1);
}
FinalLeftFootTraj_deq[CurrentIndex+k].time =
FinalRightFootTraj_deq[CurrentIndex+k].time = Time+k*m_SamplingPeriod;
FinalRightFootTraj_deq[CurrentIndex+k].time =
Time+k*m_SamplingPeriod;
}
}
else if (CurrentSupport.Phase == DS ||
......@@ -564,7 +566,8 @@ interpolate_feet_positions
FinalRightFootTraj_deq [CurrentIndex+k].ddtheta = 0.0 ;
FinalLeftFootTraj_deq[CurrentIndex+k].time =
FinalRightFootTraj_deq[CurrentIndex+k].time = Time+k*m_SamplingPeriod;
FinalRightFootTraj_deq[CurrentIndex+k].time =
Time+k*m_SamplingPeriod;
FinalLeftFootTraj_deq[CurrentIndex+k].stepType =
FinalRightFootTraj_deq[CurrentIndex+k].stepType = 10;
}
......
......@@ -56,16 +56,22 @@ namespace PatternGeneratorJRL
*/
/*! Perform a 5 ms step to generate the necessary information.
\note{The meaning and the way to use this method depends on the child class}.
\note{The meaning and the way to use this method depends on the child
class}.
@param[out] LeftFootPosition: The position of the Left Foot position.
@param[out] RightFootPosition: The position of the Right Foot position.
@param[out] ZMPRefPos: The ZMP position to be feed to the controller, in the waist
@param[out] ZMPRefPos: The ZMP position to be feed to the controller,
in the waist
frame reference.
@param[out] finalCOMState: returns CoM state position, velocity and acceleration.
@param[out] CurrentConfiguration: The results is a state vector containing the articular positions.
@param[out] CurrentVelocity: The results is a state vector containing the speed.
@param[out] CurrentAcceleration: The results is a state vector containing the acceleration.
@param[out] finalCOMState: returns CoM state position, velocity
and acceleration.
@param[out] CurrentConfiguration: The results is a state vector
containing the articular positions.
@param[out] CurrentVelocity: The results is a state vector
containing the speed.
@param[out] CurrentAcceleration: The results is a state vector
containing the acceleration.
*/
int OneGlobalStepOfControl(FootAbsolutePosition &LeftFootPosition,
FootAbsolutePosition &RightFootPosition,
......@@ -78,14 +84,17 @@ namespace PatternGeneratorJRL
/*! Computes the COM of the robot with the Joint values given in BodyAngles,
velocities set to zero, and returns the values of the COM in aStaringCOMState.
Assuming that the waist is at (0,0,0)
velocities set to zero, and returns the values of the COM in
aStaringCOMState. Assuming that the waist is at (0,0,0)
it returns the associate initial values for the left and right foot.
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time, the waist)
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time,
the waist)
pose (position + orientation).
@param[out] aStartingCOMState: Returns the 3D position of the CoM for the current
@param[out] aStartingCOMState: Returns the 3D position of the CoM for
the current
position of the robot.
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for the current
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for
the current
position of the robot.
@param[out] InitLeftFootPosition: Returns the position of the left foot in
the waist coordinates frame.
......@@ -138,8 +147,8 @@ namespace PatternGeneratorJRL
/*! Count the number of successives hits on the bottom of the buffers. */
int m_NbOfHitBottom;
/*! Keeps a link towards an object allowing to find a pose for a given CoM and
foot position. */
/*! Keeps a link towards an object allowing to find a pose for a given CoM
and foot position. */
std::vector<ComAndFootRealization *>m_ComAndFootRealization;
/*! Set the position of the buffer size limit. */
......
......@@ -45,22 +45,29 @@ namespace PatternGeneratorJRL
public:
/*! Default constructor. */
DoubleStagePreviewControlStrategy(SimplePluginManager *aSimplePluginManager);
DoubleStagePreviewControlStrategy
(SimplePluginManager *aSimplePluginManager);
/*! Default destructor. */
~DoubleStagePreviewControlStrategy();
/*! Perform a 5 ms step to generate the necessary information.
\note{The meaning and the way to use this method depends on the child class}.
\note{The meaning and the way to use this method depends on the child
class}.
@param[out] LeftFootPosition: The position of the Left Foot position.
@param[out] RightFootPosition: The position of the Right Foot position.
@param[out] ZMPRefPos: The ZMP position to be feed to the controller, in the waist
@param[out] ZMPRefPos: The ZMP position to be feed to the controller,
in the waist
frame reference.
@param[out] COMState: returns position, velocity and acceleration of the CoM.
@param[out] CurrentConfiguration: The results is a state vector containing the articular positions.
@param[out] CurrentVelocity: The results is a state vector containing the speed.
@param[out] CurrentAcceleration: The results is a state vector containing the acceleration.
@param[out] COMState: returns position, velocity and acceleration of the
CoM.
@param[out] CurrentConfiguration: The results is a state vector
containing the articular positions.
@param[out] CurrentVelocity: The results is a state vector containing
the speed.
@param[out] CurrentAcceleration: The results is a state vector containing
the acceleration.
*/
int OneGlobalStepOfControl(FootAbsolutePosition &LeftFootPosition,
FootAbsolutePosition &RightFootPosition,
......@@ -73,14 +80,18 @@ namespace PatternGeneratorJRL
/*! Computes the COM of the robot with the Joint values given in BodyAngles,
velocities set to zero, and returns the values of the COM in aStaringCOMState.
velocities set to zero, and returns the values of the COM in
aStaringCOMState.
Assuming that the waist is at (0,0,0)
it returns the associate initial values for the left and right foot.
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time, the waist)
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time,
the waist)
pose (position + orientation).
@param[out] aStartingCOMState: Returns the 3D position of the CoM for the current
@param[out] aStartingCOMState: Returns the 3D position of the CoM for
the current
position of the robot.
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for the current
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for
the current
position of the robot.
@param[out] InitLeftFootPosition: Returns the position of the left foot in
the waist coordinates frame.
......@@ -130,8 +141,10 @@ namespace PatternGeneratorJRL
/*! \brief Prepare the buffers at the beginning of the foot positions.
@param[out] aZMPositions: ZMP position reference
@param[out] aCOMBuffer: COM trajectory
@param[out] aLeftFootAbsolutePositions: Trajectory of absolute positions for the left foot.
@param[out] aRightFootAbsolutePositions: Trajectory of absolute positions for the right foot.
@param[out] aLeftFootAbsolutePositions: Trajectory of absolute positions
for the left foot.
@param[out] aRightFootAbsolutePositions: Trajectory of absolute positions
for the right foot.
*/
void Setup(deque<ZMPPosition> & aZMPositions,
deque<COMState> & aCOMBuffer,
......
......@@ -22,8 +22,8 @@
* Joint Japanese-French Robotics Laboratory (JRL)
*/
/*! \file GlobalStrategyManager.cpp
\brief This object defines a global strategy abstract object to generate an output
handled by the PatternGeneratorInterface object.
\brief This object defines a global strategy abstract object to generate
an output handled by the PatternGeneratorInterface object.
*/
#include <Debug.hh>
......
......@@ -22,8 +22,8 @@
* Joint Japanese-French Robotics Laboratory (JRL)
*/
/*! \file GlobalStrategyManager.h
\brief This object defines a global strategy abstract object to generate an output
handled by the PatternGeneratorInterface object. */
\brief This object defines a global strategy abstract object to
generate an output handled by the PatternGeneratorInterface object. */
#include <deque>
......@@ -70,15 +70,20 @@ namespace PatternGeneratorJRL
/*! Perform a 5 ms step to generate the necessary information.
\note{The meaning and the way to use this method depends on the child class}.
\note{The meaning and the way to use this method depends on
the child class}.
@param[out] LeftFootPosition: The position of the Left Foot position.
@param[out] RightFootPosition: The position of the Right Foot position.
@param[out] ZMPRefPos: The ZMP position to be fed to the controller.
@param[out] aCOMState: returns position, velocity and acceleration of the CoM.
@param[out] CurrentConfiguration: The results is a state vector containing the articular positions.
@param[out] CurrentVelocity: The results is a state vector containing the speed.
@param[out] CurrentAcceleration: The results is a state vector containing the acceleration.
@param[out] aCOMState: returns position, velocity and acceleration of the
CoM.
@param[out] CurrentConfiguration: The results is a state vector containing
the articular positions.
@param[out] CurrentVelocity: The results is a state vector containing the
speed.
@param[out] CurrentAcceleration: The results is a state vector containing
the acceleration.
*/
virtual int OneGlobalStepOfControl(FootAbsolutePosition &LeftFootPosition,
FootAbsolutePosition &RightFootPosition,
......@@ -91,27 +96,32 @@ namespace PatternGeneratorJRL
/*! Computes the COM of the robot with the Joint values given in BodyAngles,
velocities set to zero, and returns the values of the COM in aStaringCOMPosition.
velocities set to zero, and returns the values of the COM in
aStaringCOMPosition.
Assuming that the waist is at (0,0,0)
it returns the associate initial values for the left and right foot.
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time, the waist)
@param[in] BodyAngles: 4x4 matrix of the robot's root (most of the time,
the waist)
pose (position + orientation).
@param[out] aStartingCOMPosition: Returns the 3D position of the CoM for the current
@param[out] aStartingCOMPosition: Returns the 3D position of the CoM for
the current
position of the robot.
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for the current
@param[out] aStartingZMPPosition: Returns the 3D position of the ZMP for
the current
position of the robot.
@param[out] InitLeftFootPosition: Returns the position of the left foot in
the waist coordinates frame.
@param[out] InitRightFootPosition: Returns the position of the right foot
in the waist coordinates frame.
*/
virtual int EvaluateStartingState(Eigen::VectorXd & BodyAngles,
COMState & aStartingCOMState,
Eigen::Vector3d & aStartingZMPPosition,
Eigen::Matrix<double, 6, 1> & aStartingWaistPose,
FootAbsolutePosition & InitLeftFootPosition,
FootAbsolutePosition & InitRightFootPosition)=0;
virtual int EvaluateStartingState
(Eigen::VectorXd & BodyAngles,
COMState & aStartingCOMState,
Eigen::Vector3d & aStartingZMPPosition,
Eigen::Matrix<double, 6, 1> & aStartingWaistPose,
FootAbsolutePosition & InitLeftFootPosition,
FootAbsolutePosition & InitRightFootPosition)=0;
/*! \brief Method to detect the status regarding the end of the motion.
This method returns :
......@@ -122,22 +132,28 @@ namespace PatternGeneratorJRL
virtual int EndOfMotion()=0;
/*! \brief Setting the pointers towards buffers of positions.
\param[in] aZMPositions: Absolute frame positions buffer of the Zero Momentum Point reference.
\param[in] aCOMBuffer: Absolute frame positions buffer of the CoM trajectory related to the previous
\param[in] aZMPositions: Absolute frame positions buffer of the
Zero Momentum Point reference.
\param[in] aCOMBuffer: Absolute frame positions buffer of the CoM
trajectory related to the previous
ZMP reference trajectory.
\param[in] aLeftFootAbsolutePositions: Absolute frame positions buffer of the left foot.
\param[in] aRightFootAbsolutePositions: Absolute frame positions buffer of the right foot.
\param[in] aLeftFootAbsolutePositions: Absolute frame positions
buffer of the left foot.
\param[in] aRightFootAbsolutePositions: Absolute frame positions
buffer of the right foot.
*/
void SetBufferPositions(deque<ZMPPosition> * aZMPositions,
deque<COMState> * aCOMBuffer,
deque<FootAbsolutePosition> *aLeftFootAbsolutePositions,
deque<FootAbsolutePosition> *aRightFootAbsolutePositions );
void SetBufferPositions
(deque<ZMPPosition> * aZMPositions,
deque<COMState> * aCOMBuffer,
deque<FootAbsolutePosition> *aLeftFootAbsolutePositions,
deque<FootAbsolutePosition> *aRightFootAbsolutePositions );
/*! Prepare the buffers at the beginning of the foot positions. */
virtual void Setup(deque<ZMPPosition> & aZMPositions,
deque<COMState> & aCOMBuffer,
deque<FootAbsolutePosition> & aLeftFootAbsolutePositions,
deque<FootAbsolutePosition> & aRightFootAbsolutePositions )=0;
virtual void Setup
(deque<ZMPPosition> & aZMPositions,
deque<COMState> & aCOMBuffer,
deque<FootAbsolutePosition> & aLeftFootAbsolutePositions,
deque<FootAbsolutePosition> & aRightFootAbsolutePositions )=0;
protected:
......@@ -169,15 +185,16 @@ namespace PatternGeneratorJRL
public:
/*! \name Setter and getter for the jrlHumanoidDynamicRobot object. */
/*! @param[in] aHumanoidDynamicRobot: an object able to compute dynamic parameters
of the robot. */
/*! @param[in] aHumanoidDynamicRobot: an object able to compute dynamic
parameters of the robot. */
inline bool setHumanoidDynamicRobot(PinocchioRobot *aHumanoidDynamicRobot)
{
m_PinocchioRobot = aHumanoidDynamicRobot;
return true;
}
/*! \brief Returns the object able to compute the dynamic parameters of the robot. */
/*! \brief Returns the object able to compute the dynamic parameters
of the robot. */
inline PinocchioRobot * getHumanoidDynamicRobot() const
{
return m_PinocchioRobot;
......
......@@ -148,8 +148,9 @@ namespace PatternGeneratorJRL
std::vector<double> &lW);
/*! \brief Set the starting point and the height variation. */
void SetStartingTimeIntervalsAndHeightVariation(std::vector<double> &lDeltaTj,
std::vector<double> &lomegaj);
void SetStartingTimeIntervalsAndHeightVariation
(std::vector<double> &lDeltaTj,
std::vector<double> &lomegaj);
/*! \brief Set the degree of each polynomials for the CoG
Remark: the size of the vector of degrees should match the number
......@@ -159,7 +160,8 @@ namespace PatternGeneratorJRL
/*! \brief Get the degree of each polynomials for the CoG.
*/
void GetPolynomialDegrees(std::vector<unsigned int> &lPolynomialDegree) const;
void GetPolynomialDegrees
(std::vector<unsigned int> &lPolynomialDegree) const;
/*! \brief Set the number of Intervals for this
trajectory. */
......@@ -187,23 +189,26 @@ namespace PatternGeneratorJRL
*/
bool GetFromListOfZMPPolynomials(unsigned int j, Polynome * & aPoly ) const;
/*! \brief Transfert the coefficients from the COG trajectory to the ZMP for all intervals.
/*! \brief Transfert the coefficients from the COG trajectory
to the ZMP for all intervals.
@param lCOMZ: Profile of the height CoM for each interval.
@param lZMPZ: Profile of the height ZMP for each interval.
*/
void TransfertCoefficientsFromCOGTrajectoryToZMPOne(std::vector<double> &lCOMZ,
std::vector<double> &lZMPZ);
void TransfertCoefficientsFromCOGTrajectoryToZMPOne
(std::vector<double> &lCOMZ,
std::vector<double> &lZMPZ);
/*! \brief Transfert the coefficients from the COG trajectory to the ZMP.
@param IntervalIndex: Number of the interval.
@param lCOMZ: Value of the CoM height for this interval.
@param lZMPZ: Value of the ZMP height for this interval.
*/
void TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne(
unsigned int IntervalIndex,
double &lCOMZ,
double &lZMPZ);
void TransfertOneIntervalCoefficientsFromCOGTrajectoryToZMPOne
(
unsigned int IntervalIndex,
double &lCOMZ,
double &lZMPZ);
/*! Build the coefficients of a third order COG polynomial according
to the OmegaC and the value of the ZMP at the beginning and the end
......@@ -214,7 +219,8 @@ namespace PatternGeneratorJRL
/*@} */
/*! \brief Returns the maximal fluctuation for the first segment of this trajectory. */
/*! \brief Returns the maximal fluctuation for the first segment of this
trajectory. */
double FluctuationMaximal();
friend std::ostream& operator <<(std::ostream &os,
......@@ -237,7 +243,8 @@ namespace PatternGeneratorJRL
/*! \brief Get the index of the interval according to the time,
and the previous value of the interval. */
bool GetIntervalIndexFromTime(double t, unsigned int &j, unsigned int &prev_j);
bool GetIntervalIndexFromTime(double