Commit 3e994c89 authored by Andrei's avatar Andrei Committed by olivier-stasse
Browse files

minor changes

parent d3abdfaa
......@@ -156,16 +156,12 @@ namespace PatternGeneratorJRL
typedef struct SupportFeet_s
SupportFeet_t;
/// Structure to store the absolute reference.
/// \brief Velocity reference in absolute frame.
struct ReferenceAbsoluteVelocity_t
{
/*! m/sec or degrees/sec */
double x,y,z, dYaw;
/// m/sec or degrees/sec
double x,y,z,yaw;
/*! reference values for the whole preview window */
MAL_VECTOR(RefVectorX,double);
MAL_VECTOR(RefVectorY,double);
MAL_VECTOR(RefVectorTheta,double);
};
typedef struct ReferenceAbsoluteVelocity_t ReferenceAbsoluteVelocity;
......
......@@ -323,9 +323,9 @@ void OrientationsPreview::verifyAccelerationOfHipJoint(const ReferenceAbsoluteVe
if(CurrentSupport.Phase!=0)
{
//Verify change in velocity against the maximal acceleration
if(fabs(Ref.dYaw-TrunkState.yaw[1]) > 2.0/3.0*m_T*m_uaLimitHipYaw)
if(fabs(Ref.yaw-TrunkState.yaw[1]) > 2.0/3.0*m_T*m_uaLimitHipYaw)
{
double signRotAccTrunk = (Ref.dYaw-TrunkState.yaw[1] < 0.0)?-1.0:1.0;
double signRotAccTrunk = (Ref.yaw-TrunkState.yaw[1] < 0.0)?-1.0:1.0;
TrunkStateT.yaw[1] = TrunkState.yaw[1] + signRotAccTrunk * 2.0/3.0*m_T* m_uaLimitHipYaw;
......@@ -334,7 +334,7 @@ void OrientationsPreview::verifyAccelerationOfHipJoint(const ReferenceAbsoluteVe
ofstream aof;
aof.open("/tmp/verifyAccelerationOfHipJoint.dat",ofstream::app);
aof<<" TrunkStateT.yaw[1]: "<<TrunkStateT.yaw[1] <<" "
<<" Ref.dYaw: "<<Ref.dYaw <<" "
<<" Ref.yaw: "<<Ref.yaw <<" "
<<" m_signRotAccTrunk: "<<m_signRotAccTrunk <<" "
<<" 2.0/3.0*m_T* m_uaLimitHipYaw: "<<2.0/3.0*m_T* m_uaLimitHipYaw <<" "
<<endl;
......@@ -342,7 +342,7 @@ void OrientationsPreview::verifyAccelerationOfHipJoint(const ReferenceAbsoluteVe
}
}
else
TrunkStateT.yaw[1] = Ref.dYaw;
TrunkStateT.yaw[1] = Ref.yaw;
}
else//No rotations in a double support phase
......
......@@ -99,16 +99,16 @@ void QPProblem_s::AllocateMemory()
U = new double[mnn];
DS = new double[(8*m_QP_N+1)*2*(m_QP_N+m_stepNumber)];
DU = new double[(8*m_QP_N+1)*2*(m_QP_N+m_stepNumber)];
Q=new double[4*(m_QP_N+m_stepNumber)*(m_QP_N+m_stepNumber)]; //Quadratic part of the objective function
D=new double[2*(m_QP_N+m_stepNumber)]; // Linear part of the objective function
XL=new double[2*(m_QP_N+m_stepNumber)]; // Lower bound of the jerk.
XU=new double[2*(m_QP_N+m_stepNumber)]; // Upper bound of the jerk.
X=new double[2*(m_QP_N+m_stepNumber)]; // Solution of the system.
NewX=new double[2*(m_QP_N+m_stepNumber)]; // Solution of the system.
XL=new double[2*(m_QP_N+m_stepNumber)]; // Lower bound on the solution.
XU=new double[2*(m_QP_N+m_stepNumber)]; // Upper bound on the solution.
X=new double[2*(m_QP_N+m_stepNumber)]; // Solution of the problem.
NewX=new double[2*(m_QP_N+m_stepNumber)]; // Solution of the problem.
}
......@@ -205,7 +205,6 @@ void QPProblem_s::dumpVector(std::ostream & aos,
double *aVector=0;
switch(type)
{
case VECTOR_D:
lsize=2*(m_QP_N+m_stepNumber) ;
aVector = D;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment