Commit 28bdde81 authored by NoelieRamuzat's avatar NoelieRamuzat Committed by Noëlie RAMUZAT
Browse files

[Pyrene_Actuator] Change name of hh cost function, add commands to change load param

parent c8ab43dc
......@@ -36,7 +36,7 @@
#include <ddp-actuator-solver/ddpsolver.hh>
#include <ddp-actuator-solver/examples/costFunction.hh>
#include <ddp-actuator-solver/examples/pyreneCostFunction.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
......@@ -99,6 +99,20 @@ DdpPyreneActuatorSolver(const std::string &name)
"Size of the preview window (in nb of samples)",
"Max. nb. of iterations",
"Stopping criteria")));
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")));
makeCommandVoid1(*this, &DdpPyreneActuatorSolver::setLoadMass,
docCommandVoid1("Set the Load mass.",
"Mass of the load [g].")));
makeCommandVoid0(*this, &DdpPyreneActuatorSolver::removeLoad,
docCommandVoid0("Remove the Load.")));
m_initSucceeded = true;
......@@ -176,6 +190,20 @@ void DdpPyreneActuatorSolver::param_init(const double &timestep,
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)
void DdpPyreneActuatorSolver::removeLoad()
void DdpPyreneActuatorSolver::display(std::ostream &os) const
os << " T: " << m_T
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment