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-torque-control
Commits
28bdde81
Commit
28bdde81
authored
Jul 01, 2019
by
NoelieRamuzat
Committed by
Noëlie RAMUZAT
Feb 27, 2020
Browse files
[Pyrene_Actuator] Change name of hh cost function, add commands to change load param
parent
c8ab43dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/sot/torque_control/ddp_pyrene_actuator_solver.hh
View file @
28bdde81
...
...
@@ -36,7 +36,7 @@
#include <ddp-actuator-solver/ddpsolver.hh>
#include <ddp-actuator-solver/examples/
c
ostFunction.hh>
#include <ddp-actuator-solver/examples/
pyreneC
ostFunction.hh>
#include <ddp-actuator-solver/examples/PyreneActuator.hh>
...
...
@@ -88,6 +88,11 @@ class SOTDDPPYRENEACTUATORSOLVER_EXPORT DdpPyreneActuatorSolver
const
int
&
nbItMax
,
const
double
&
stopCriteria
);
// /* --- SETTER LOAD --- */
void
setLoadParam
(
const
double
&
mass
,
const
double
&
coordX
,
const
double
&
coordY
);
void
setLoadMass
(
const
double
&
mass
);
void
removeLoad
();
};
}
// namespace torque_control
}
// namespace sot
...
...
src/ddp_pyrene_actuator_solver.cpp
View file @
28bdde81
...
...
@@ -99,6 +99,20 @@ DdpPyreneActuatorSolver(const std::string &name)
"Size of the preview window (in nb of samples)"
,
"Max. nb. of iterations"
,
"Stopping criteria"
)));
addCommand
(
"setLoadParam"
,
makeCommandVoid3
(
*
this
,
&
DdpPyreneActuatorSolver
::
setLoadParam
,
docCommandVoid3
(
"Setter of the Load parameters."
,
"Mass of the load [g]."
,
"X coordinate of the Load"
,
"Y coordinate of the Load"
)));
addCommand
(
"setLoadMass"
,
makeCommandVoid1
(
*
this
,
&
DdpPyreneActuatorSolver
::
setLoadMass
,
docCommandVoid1
(
"Set the Load mass."
,
"Mass of the load [g]."
)));
addCommand
(
"removeLoad"
,
makeCommandVoid0
(
*
this
,
&
DdpPyreneActuatorSolver
::
removeLoad
,
docCommandVoid0
(
"Remove the Load."
)));
m_initSucceeded
=
true
;
}
...
...
@@ -176,6 +190,20 @@ void DdpPyreneActuatorSolver::param_init(const double ×tep,
m_T
,
m_dt
,
m_iterMax
,
m_stopCrit
);
}
void
DdpPyreneActuatorSolver
::
setLoadParam
(
const
double
&
mass
,
const
double
&
coordX
,
const
double
&
coordY
)
{
m_model
.
setLoadParam
(
mass
,
coordX
,
coordY
);
}
void
DdpPyreneActuatorSolver
::
setLoadMass
(
const
double
&
mass
)
{
m_model
.
setLoadMass
(
mass
);
}
void
DdpPyreneActuatorSolver
::
removeLoad
()
{
m_model
.
removeLoad
();
}
void
DdpPyreneActuatorSolver
::
display
(
std
::
ostream
&
os
)
const
{
os
<<
" T: "
<<
m_T
...
...
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