Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
jrl-walkgen
Commits
7d15b517
Commit
7d15b517
authored
Jul 06, 2020
by
Olivier Stasse
Browse files
Simplify PatternGenerator Interface through one structure.
First step: need to be tested and strongify.
parent
6ad43e0e
Changes
4
Show whitespace changes
Inline
Side-by-side
include/jrl/walkgen/patterngeneratorinterface.hh
View file @
7d15b517
...
...
@@ -193,6 +193,13 @@ public:
FootAbsolutePosition
&
RightFootPosition
,
ZMPPosition
&
ZMPRefPos
,
COMPosition
&
COMRefPos
)
=
0
;
/*! \brief Rune One Step of the global control loop
*/
virtual
bool
RunOneStepOfTheControlLoop
(
ControlLoopOneStepArgs
&
aControlLoopOneStepArgs
)
=
0
;
/*! @} */
/*! Set the current joint values of the robot.
...
...
include/jrl/walkgen/pgtypes.hh
View file @
7d15b517
...
...
@@ -60,6 +60,7 @@ struct WALK_GEN_JRL_EXPORT COMPosition_s {
struct
COMPosition_s
&
operator
=
(
const
COMState_s
&
aCS
);
};
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
COMPosition_s
&
aCp
)
{
for
(
size_t
i
=
0
;
i
<
3
;
++
i
)
{
os
<<
"x["
<<
i
<<
"] "
<<
aCp
.
x
[
i
]
<<
" y["
<<
i
<<
"] "
<<
aCp
.
y
[
i
]
...
...
@@ -270,5 +271,16 @@ inline std::ostream &operator<<(std::ostream &os, const Circle_t &circle) {
return
os
;
}
struct
ControlLoopOneStepArgs
{
Eigen
::
VectorXd
CurrentConfiguration
;
Eigen
::
VectorXd
CurrentVelocity
;
Eigen
::
VectorXd
CurrentAcceleration
;
Eigen
::
VectorXd
ZMPTarget
;
COMState
finalCOMState
;
FootAbsolutePosition
LeftFootPosition
;
FootAbsolutePosition
RightFootPosition
;
Eigen
::
VectorXd
Momentum
;
};
}
// namespace PatternGeneratorJRL
#endif
include/jrl/walkgen/pinocchiorobot.hh
View file @
7d15b517
...
...
@@ -201,9 +201,9 @@ public:
inline
Eigen
::
VectorXd
&
currentRPYAcceleration
()
{
return
m_arpy
;
}
inline
Eigen
::
VectorXd
&
currentTau
()
{
return
m_tau
;
}
inline
unsigned
numberDof
()
{
return
m_robotModel
->
nq
;
}
inline
unsigned
numberDof
()
{
return
(
unsigned
)
m_robotModel
->
nq
;
}
inline
unsigned
numberVelDof
()
{
return
m_robotModel
->
nv
;
}
inline
unsigned
numberVelDof
()
{
return
(
unsigned
)
m_robotModel
->
nv
;
}
inline
void
zeroMomentumPoint
(
Eigen
::
Vector3d
&
zmp
)
{
m_externalForces
=
m_robotData
->
liMi
[
1
].
act
(
m_robotData
->
f
[
1
]);
...
...
src/patterngeneratorinterfaceprivate.hh
View file @
7d15b517
...
...
@@ -258,6 +258,9 @@ public:
FootAbsolutePosition
&
RightFootPosition
,
ZMPPosition
&
ZMPRefPos
,
COMPosition
&
COMRefPos
);
bool
RunOneStepOfTheControlLoop
(
ControlLoopOneStepArgs
&
aControlLoopStepArgs
);
/*! @} */
/*! Set the current joint values of the robot.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment