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
Stack Of Tasks
sot-dynamic-pinocchio
Commits
e566126c
Commit
e566126c
authored
May 15, 2013
by
Francois Keith
Browse files
Add signals for the maximal/minimal joint velocity/torques.
parent
025c60fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/sot-dynamic/dynamic.h
View file @
e566126c
...
...
@@ -207,6 +207,10 @@ class SOTDYNAMIC_EXPORT Dynamic
dg
::
SignalTimeDependent
<
double
,
int
>
footHeightSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
upperJlSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
lowerJlSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
upperVlSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
lowerVlSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
upperTlSOUT
;
dg
::
SignalTimeDependent
<
ml
::
Vector
,
int
>
lowerTlSOUT
;
dg
::
Signal
<
ml
::
Vector
,
int
>
inertiaRotorSOUT
;
dg
::
Signal
<
ml
::
Vector
,
int
>
gearRatioSOUT
;
...
...
@@ -234,6 +238,12 @@ class SOTDYNAMIC_EXPORT Dynamic
ml
::
Vector
&
getUpperJointLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
getLowerJointLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
getUpperVelocityLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
getLowerVelocityLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
getUpperTorqueLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
getLowerTorqueLimits
(
ml
::
Vector
&
res
,
const
int
&
time
);
ml
::
Vector
&
computeTorqueDrift
(
ml
::
Vector
&
res
,
const
int
&
time
);
public:
/* --- PARAMS --- */
...
...
src/dynamic.cpp
View file @
e566126c
...
...
@@ -124,6 +124,22 @@ Dynamic( const std::string & name, bool build )
sotNOSIGNAL
,
"sotDynamic("
+
name
+
")::output(vector)::lowerJl"
)
,
upperVlSOUT
(
boost
::
bind
(
&
Dynamic
::
getUpperVelocityLimits
,
this
,
_1
,
_2
),
sotNOSIGNAL
,
"sotDynamic("
+
name
+
")::output(vector)::upperVl"
)
,
lowerVlSOUT
(
boost
::
bind
(
&
Dynamic
::
getLowerVelocityLimits
,
this
,
_1
,
_2
),
sotNOSIGNAL
,
"sotDynamic("
+
name
+
")::output(vector)::lowerVl"
)
,
upperTlSOUT
(
boost
::
bind
(
&
Dynamic
::
getUpperTorqueLimits
,
this
,
_1
,
_2
),
sotNOSIGNAL
,
"sotDynamic("
+
name
+
")::output(vector)::upperTl"
)
,
lowerTlSOUT
(
boost
::
bind
(
&
Dynamic
::
getLowerTorqueLimits
,
this
,
_1
,
_2
),
sotNOSIGNAL
,
"sotDynamic("
+
name
+
")::output(vector)::lowerTl"
)
,
inertiaRotorSOUT
(
"sotDynamic("
+
name
+
")::output(matrix)::inertiaRotor"
)
,
gearRatioSOUT
(
"sotDynamic("
+
name
+
")::output(matrix)::gearRatio"
)
,
inertiaRealSOUT
(
boost
::
bind
(
&
Dynamic
::
computeInertiaReal
,
this
,
_1
,
_2
),
...
...
@@ -158,6 +174,10 @@ Dynamic( const std::string & name, bool build )
signalRegistration
(
footHeightSOUT
);
signalRegistration
(
upperJlSOUT
);
signalRegistration
(
lowerJlSOUT
);
signalRegistration
(
upperVlSOUT
);
signalRegistration
(
lowerVlSOUT
);
signalRegistration
(
upperTlSOUT
);
signalRegistration
(
lowerTlSOUT
);
signalRegistration
(
inertiaSOUT
);
signalRegistration
(
inertiaRealSOUT
);
signalRegistration
(
inertiaRotorSOUT
);
...
...
@@ -1271,6 +1291,70 @@ getLowerJointLimits(ml::Vector& res, const int&)
return
res
;
}
ml
::
Vector
&
Dynamic
::
getUpperVelocityLimits
(
ml
::
Vector
&
res
,
const
int
&
)
{
sotDEBUGIN
(
15
);
const
unsigned
int
NBJ
=
m_HDR
->
numberDof
();
res
.
resize
(
NBJ
);
for
(
unsigned
int
i
=
0
;
i
<
NBJ
;
++
i
)
{
res
(
i
)
=
m_HDR
->
upperVelocityBoundDof
(
i
);
}
sotDEBUG
(
15
)
<<
"upperVelocityLimit ("
<<
NBJ
<<
")="
<<
res
<<
endl
;
sotDEBUGOUT
(
15
);
return
res
;
}
ml
::
Vector
&
Dynamic
::
getLowerVelocityLimits
(
ml
::
Vector
&
res
,
const
int
&
)
{
sotDEBUGIN
(
15
);
const
unsigned
int
NBJ
=
m_HDR
->
numberDof
();
res
.
resize
(
NBJ
);
for
(
unsigned
int
i
=
0
;
i
<
NBJ
;
++
i
)
{
res
(
i
)
=
m_HDR
->
lowerVelocityBoundDof
(
i
);
}
sotDEBUG
(
15
)
<<
"lowerVelocityLimit ("
<<
NBJ
<<
")="
<<
res
<<
endl
;
sotDEBUGOUT
(
15
);
return
res
;
}
ml
::
Vector
&
Dynamic
::
getUpperTorqueLimits
(
ml
::
Vector
&
res
,
const
int
&
)
{
sotDEBUGIN
(
15
);
const
unsigned
int
NBJ
=
m_HDR
->
numberDof
();
res
.
resize
(
NBJ
);
for
(
unsigned
int
i
=
0
;
i
<
NBJ
;
++
i
)
{
res
(
i
)
=
m_HDR
->
upperTorqueBoundDof
(
i
);
}
sotDEBUG
(
15
)
<<
"upperTorqueLimit ("
<<
NBJ
<<
")="
<<
res
<<
endl
;
sotDEBUGOUT
(
15
);
return
res
;
}
ml
::
Vector
&
Dynamic
::
getLowerTorqueLimits
(
ml
::
Vector
&
res
,
const
int
&
)
{
sotDEBUGIN
(
15
);
const
unsigned
int
NBJ
=
m_HDR
->
numberDof
();
res
.
resize
(
NBJ
);
for
(
unsigned
int
i
=
0
;
i
<
NBJ
;
++
i
)
{
res
(
i
)
=
m_HDR
->
lowerTorqueBoundDof
(
i
);
}
sotDEBUG
(
15
)
<<
"lowerTorqueLimit ("
<<
NBJ
<<
")="
<<
res
<<
endl
;
sotDEBUGOUT
(
15
);
return
res
;
}
ml
::
Vector
&
Dynamic
::
computeTorqueDrift
(
ml
::
Vector
&
tauDrift
,
const
int
&
iter
)
{
...
...
Write
Preview
Supports
Markdown
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