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

New type and type methods

- Add constructor, reset() and operator= to support_state_s
- Add solution type
parent 99514540
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,38 @@
namespace PatternGeneratorJRL
{
struct support_state_s & support_state_t::operator =(const support_state_s & aSS)
{
for(unsigned int i=0;i<3;i++)
{
Phase = aSS.Phase;
Foot = aSS.Foot;
StepsLeft = aSS.StepsLeft;
TimeLimit = aSS.TimeLimit;
StepNumber = aSS.StepNumber;
};
return *this;
}
void support_state_t::reset()
{
for(int i=0;i<3;i++)
{
Phase = 0;
Foot = 0;
StepsLeft = 0;
TimeLimit = 0.0;
StepNumber = 0;
SSSS = StateChanged = false;
}
}
support_state_s::support_state_s()
{
reset();
}
struct com_s & com_t::operator=(const com_s &aCS)
{
for(unsigned int i=0;i<3;i++)
......
......@@ -40,6 +40,12 @@ namespace PatternGeneratorJRL
int Phase, Foot, StepsLeft, StepNumber;
bool SSSS, StateChanged;
double TimeLimit;
struct support_state_s & operator = (const support_state_s &aSS);
void reset();
support_state_s();
};
typedef struct support_state_s support_state_t;
......@@ -106,6 +112,26 @@ namespace PatternGeneratorJRL
};
typedef struct reference_s reference_t;
struct solution_s
{
/// \brief whole solution array
double * array;
struct vector_s
{
MAL_VECTOR(X,double);
MAL_VECTOR(Y,double);
/// \brief First and last elements of vector in array
int first, last;
};
typedef struct vector_s vector_t;
vector_t jerk, footpos;
};
typedef struct solution_s solution_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