Skip to content
Snippets Groups Projects
Commit 72817935 authored by Andrei Herdt's avatar Andrei Herdt Committed by Olivier Stasse
Browse files

Add new type for the CoM to be used by:

LinearInvertedPendulum2D
intermediate-qp-matrices
parent 22431d47
No related branches found
No related tags found
No related merge requests found
/*
* Copyright 2005, 2006, 2007, 2008, 2009, 2010,
*
* Andrei Herdt
* Olivier Stasse
*
* JRL, CNRS/AIST
*
* This file is part of walkGenJrl.
* walkGenJrl is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* walkGenJrl is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with walkGenJrl. If not, see <http://www.gnu.org/licenses/>.
*
* Research carried out within the scope of the
* Joint Japanese-French Robotics Laboratory (JRL)
*/
#include <privatepgtypes.h>
namespace PatternGeneratorJRL
{
struct com_s & com_t::operator=(const com_s &aCS)
{
for(unsigned int i=0;i<3;i++)
{
x[i] = aCS.x[i];
y[i] = aCS.y[i];
z[i] = aCS.z[i];
};
return *this;
}
void com_t::reset()
{
for(unsigned int i=0;i<3;i++)
{
MAL_VECTOR_RESIZE(x,3);
MAL_VECTOR_RESIZE(y,3);
MAL_VECTOR_RESIZE(z,3);
x[i] = 0.0;
y[i] = 0.0;
z[i] = 0.0;
}
}
com_s::com_s()
{
reset();
}
}
/*
* Copyright 2010,
*
* Andrei Herdt
* Olivier Stasse
*
* JRL, CNRS/AIST
......@@ -28,10 +29,12 @@
#ifndef _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_
#define _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_
#include <jrl/mal/matrixabstractlayer.hh>
namespace PatternGeneratorJRL
{
// State of the support
// Support state of the robot at a certain point in time
struct SupportState_s
{
int Phase, Foot, StepsLeft, StepNumber;
......@@ -39,6 +42,21 @@ namespace PatternGeneratorJRL
double TimeLimit;
};
typedef struct SupportState_s SupportState_t;
// Support state of the robot at a certain point in time
struct com_s
{
MAL_VECTOR(x,double);
MAL_VECTOR(y,double);
MAL_VECTOR(z,double);
struct com_s & operator=(const com_s &aCS);
void reset();
com_s();
};
typedef struct com_s com_t;
}
#endif /* _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment