Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrl-walkgen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Guilhem Saurel
jrl-walkgen
Commits
ea40a4a2
Commit
ea40a4a2
authored
14 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
Add new structure to handle data related to constraints on feet.
parent
c70d569f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Mathematics/FootHalfSize.cpp
+100
-0
100 additions, 0 deletions
src/Mathematics/FootHalfSize.cpp
src/Mathematics/FootHalfSize.hh
+69
-0
69 additions, 0 deletions
src/Mathematics/FootHalfSize.hh
with
169 additions
and
0 deletions
src/Mathematics/FootHalfSize.cpp
0 → 100644
+
100
−
0
View file @
ea40a4a2
/*
* 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)
*/
#include
<Mathematics/FootHalfSize.hh>
using
namespace
PatternGeneratorJRL
;
FootHalfSize
::
FootHalfSize
()
{
m_HalfWidth
=
-
1.0
;
m_HalfHeight
=
-
1.0
;
m_HalfWidthInit
=
-
1.0
;
m_HalfHeightInit
=
-
1.0
;
m_HalfHeightDS
=
-
1.0
;
// Variation around X < 1 cm by default.
m_ConstraintsOnX
=
0.01
;
// Variation around Y < 2 cm by default.
m_ConstraintsOnY
=
0.02
;
}
FootHalfSize
::~
FootHalfSize
()
{
}
void
FootHalfSize
::
setHalfSizeInit
(
double
lHalfWidthInit
,
double
lHalfHeightInit
)
{
m_HalfHeightInit
=
lHalfHeightInit
;
m_HalfWidthInit
=
lHalfWidthInit
;
updateHalfSize
();
updateHalfHeightDS
();
}
void
FootHalfSize
::
updateHalfSize
()
{
m_HalfWidth
=
0.5
*
m_HalfWidthInit
;
m_HalfHeight
=
0.5
*
m_HalfHeightInit
;
m_HalfWidth
-=
m_ConstraintsOnX
;
m_HalfHeight
-=
m_ConstraintsOnY
;
}
void
FootHalfSize
::
updateHalfHeightDS
()
{
double
DSFeetDistance
=
0.2
;
m_HalfHeightDS
=
m_HalfHeight
-
m_ConstraintsOnX
+
DSFeetDistance
/
2.0
;
}
void
FootHalfSize
::
setConstraints
(
double
OnX
,
double
OnY
)
{
m_ConstraintsOnX
=
OnX
;
m_ConstraintsOnX
=
OnY
;
updateHalfSize
();
updateHalfHeightDS
();
}
double
FootHalfSize
::
getHalfHeight
()
const
{
return
m_HalfHeight
;
}
double
FootHalfSize
::
getHalfWidth
()
const
{
return
m_HalfWidth
;
}
double
FootHalfSize
::
getHalfHeightDS
()
const
{
return
m_HalfHeightDS
;
}
This diff is collapsed.
Click to expand it.
src/Mathematics/FootHalfSize.hh
0 → 100644
+
69
−
0
View file @
ea40a4a2
/*
* 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)
*/
#ifndef _FOOT_HALF_SIZE_H_
#define _FOOT_HALF_SIZE_H_
namespace
PatternGeneratorJRL
{
/*! This class handles the size and the constraints related to the feet
*/
class
FootHalfSize
{
public:
FootHalfSize
();
~
FootHalfSize
();
void
setHalfSizeInit
(
double
lHalfWidth
,
double
lHalfHeight
);
void
setConstraints
(
double
OnX
,
double
OnY
);
protected:
void
updateHalfHeightDS
();
void
updateHalfSize
();
private:
double
m_HalfHeight
;
double
m_HalfWidth
;
double
m_HalfHeightDS
;
double
m_HalfHeightInit
;
double
m_HalfWidthInit
;
double
m_ConstraintsOnX
;
double
m_ConstraintsOnY
;
public:
double
getHalfHeight
()
const
;
double
getHalfWidth
()
const
;
double
getHalfHeightDS
()
const
;
};
};
#endif
/* _FOOT_HALF_SIZE_H_*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment