From b643a818f29893cab153ef4a83e471bbd086d2d4 Mon Sep 17 00:00:00 2001 From: Kevin Giraud-Esclasse <kgiraude@laas.fr> Date: Tue, 22 Nov 2016 14:34:04 +0100 Subject: [PATCH] trajectories foot going down 10 ok --- .../FootTrajectoryGenerationStandard.cpp | 41 ++----------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/src/FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp b/src/FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp index 8bf4a0de..12bc2344 100644 --- a/src/FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp +++ b/src/FootTrajectoryGeneration/FootTrajectoryGenerationStandard.cpp @@ -424,43 +424,10 @@ int FootTrajectoryGenerationStandard::SetParameters(int PolynomeIndex, double Ti } else if (FinalPosition - InitPosition < -epsilon ) { -// ToMP.push_back(0.6*TimeInterval); -// MP.push_back(InitPosition+0.5*WayPoint_z); -// m_BsplinesZ->SetParameters(TimeInterval,InitPosition,FinalPosition,ToMP,MP,InitSpeed,InitAcc); - deque<double> knot; - double TimeInterval = 1.4; - for (int i=0;i<8;++i){knot.push_back(0.0);} - double pourcentTime=0.9; -// knot.push_back(0.01); -// knot.push_back(0.4); -// //knot.push_back(pourcentTime*TimeInterval); -// knot.push_back(pourcentTime); -// knot.push_back(0.99); - knot.push_back(0.9); - for (int i=0;i<8;++i){knot.push_back(1.0);} - m_BsplinesZ->SetKnotVector(knot); - vector<double> controlPoints; - for (int i=0 ; i<5 ; ++i) - {controlPoints.push_back(InitPosition);} -// controlPoints.push_back(InitPosition+0.005); -// controlPoints.push_back(InitPosition+0.07*0.8); -// controlPoints.push_back(InitPosition+0.07*1.4); -// controlPoints.push_back(FinalPosition+0.005); - controlPoints.push_back(InitPosition+0.25); - for (int i=0 ; i<5 ; ++i) - {controlPoints.push_back(FinalPosition);} - - m_BsplinesZ->SetControlPoints(controlPoints); -// m_BsplinesZ->FT(TimeInterval); -// m_BsplinesZ->FP(FinalPosition); - double IS = 0.0 ; - double IA = 0.0 ; - double FS = 0.0 ; - double FA = 0.0 ; - m_BsplinesZ->SetParametersWithoutMPAndToMP(TimeInterval, - InitPosition, - FinalPosition, - IS,IA,FS,FA); + ToMP.push_back(0.65*TimeInterval); + MP.push_back(InitPosition+WayPoint_z*0.45); + m_BsplinesZ->SetParametersWithInitFinalPose(TimeInterval,InitPosition,FinalPosition,ToMP,MP); + m_BsplinesZ->GenerateDegree(); m_BsplinesZ->PrintControlPoints(); m_BsplinesZ->PrintDegree(); -- GitLab