From 0ad42ea6eeacf693a766ac1a3d76f10ffa8346e1 Mon Sep 17 00:00:00 2001 From: Olivier Stasse <Olivier.stasse@aist.go.jp> Date: Thu, 28 Oct 2010 08:09:15 +0900 Subject: [PATCH] Move SupportState_t to privatepgtypes.h Reinforce policy to not externalize internal types. This will help contributors by allowing internal changes without impacting users. --- include/walkGenJrl/PGTypes.h | 9 ---- .../FootConstraintsAsLinearSystemForVelRef.h | 2 + src/PreviewControl/SupportFSM.h | 1 + .../ZMPVelocityReferencedQP.h | 1 + src/privatepgtypes.h | 54 +++++++++++++++++++ 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 src/privatepgtypes.h diff --git a/include/walkGenJrl/PGTypes.h b/include/walkGenJrl/PGTypes.h index f35cb63f..ca8e01e3 100644 --- a/include/walkGenJrl/PGTypes.h +++ b/include/walkGenJrl/PGTypes.h @@ -169,14 +169,5 @@ namespace PatternGeneratorJRL }; typedef struct ReferenceAbsoluteVelocity_t ReferenceAbsoluteVelocity; - // State of the support - struct SupportState_s - { - int Phase, Foot, StepsLeft, StepNumber; - bool SSSS, StateChanged; - double TimeLimit; - }; - typedef struct SupportState_s SupportState_t; - }; #endif diff --git a/src/Mathematics/FootConstraintsAsLinearSystemForVelRef.h b/src/Mathematics/FootConstraintsAsLinearSystemForVelRef.h index e7e5f2a3..95239f1c 100644 --- a/src/Mathematics/FootConstraintsAsLinearSystemForVelRef.h +++ b/src/Mathematics/FootConstraintsAsLinearSystemForVelRef.h @@ -43,12 +43,14 @@ #include <PGTypes.h> +#include <privatepgtypes.h> #include <Mathematics/ConvexHull.h> #include <SimplePlugin.h> #include <PreviewControl/SupportFSM.h> namespace PatternGeneratorJRL { + /*! This class generates matrix representation of linear constraint based on foot position. It handles a stack of constraint on a sliding mode diff --git a/src/PreviewControl/SupportFSM.h b/src/PreviewControl/SupportFSM.h index 2ed9e458..afad1c20 100644 --- a/src/PreviewControl/SupportFSM.h +++ b/src/PreviewControl/SupportFSM.h @@ -28,6 +28,7 @@ #define _SUPPORT_FSM_ #include <walkGenJrl/PGTypes.h> +#include <privatepgtypes.h> namespace PatternGeneratorJRL { diff --git a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.h b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.h index e496cded..af61c664 100644 --- a/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.h +++ b/src/ZMPRefTrajectoryGeneration/ZMPVelocityReferencedQP.h @@ -45,6 +45,7 @@ namespace PatternGeneratorJRL { + class ZMPDiscretization; class ZMPVelocityReferencedQP : public ZMPRefTrajectoryGeneration { diff --git a/src/privatepgtypes.h b/src/privatepgtypes.h new file mode 100644 index 00000000..269d82b1 --- /dev/null +++ b/src/privatepgtypes.h @@ -0,0 +1,54 @@ +/* + * Copyright 2010, + * + * 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) + */ +/*! \file PGTypes.h + \brief Defines basic types for the Humanoid Walking Pattern Generator. +*/ + +#ifndef _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_ +#define _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_ + +// For Windows compatibility. +#if defined (WIN32) +# ifdef walkGenJrl_EXPORTS +# define WALK_GEN_JRL_EXPORT __declspec(dllexport) +# else +# define WALK_GEN_JRL_EXPORT __declspec(dllimport) +# endif +#else +# define WALK_GEN_JRL_EXPORT +#endif +namespace PatternGeneratorJRL +{ + + // State of the support + struct SupportState_s + { + int Phase, Foot, StepsLeft, StepNumber; + bool SSSS, StateChanged; + double TimeLimit; + }; + typedef struct SupportState_s SupportState_t; +}; + +#endif /* _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_ */ -- GitLab