Commit 499fce45 authored by NoelieRamuzat's avatar NoelieRamuzat

[Pyrene_Actuator] Rename entity to pyreneActuator

parent a52f6758
......@@ -11,7 +11,7 @@ endmacro()
SET(source_files
pyrene_actuator/pyreneCostFunction.cpp
pyrene_actuator/PyreneActuator.cpp
pyrene_actuator/pyreneActuator.cpp
romeo_actuator/costfunctionromeoactuator.cpp
romeo_actuator/romeosimpleactuator.cpp
romeo_actuator/romeotorqueactuator.cpp
......@@ -25,7 +25,7 @@ SET(source_files
SET(header_files
pyrene_actuator/pyreneCostFunction.hh
pyrene_actuator/PyreneActuator.hh
pyrene_actuator/pyreneActuator.hh
romeo_actuator/costfunctionromeoactuator.hh
romeo_actuator/romeosimpleactuator.hh
romeo_actuator/romeotorqueactuator.hh
......
......@@ -2,7 +2,7 @@
#include <fstream>
#include <ddp-actuator-solver/ddpsolver.hh>
#include "PyreneActuator.hh"
#include "pyreneActuator.hh"
#include "pyreneCostFunction.hh"
#include <time.h>
......@@ -56,7 +56,7 @@ int main (int argc, char *argv[])
DDPSolver<double,2,1>::commandVecTab_t uList;
DDPSolver<double,2,1>::traj lastTraj;
PyreneActuator PyreneActuator;
pyreneActuator pyreneActuator;
CostFunctionPyreneActuator costFunction;
costFunction.setTauLimit(70);
costFunction.setJointLimit(0.0, -2.35619449019);
......@@ -67,8 +67,8 @@ int main (int argc, char *argv[])
// P << 100.0;
// costFunction.setCostGainState(Q);
// costFunction.setCostGainTorqueConstraint(P);
// PyreneActuator.setLoadParam(30.0,-0.021481595, 0.10);
DDPSolver<double,2,1> testSolverActuator(PyreneActuator,costFunction,DISABLE_FULLDDP,DISABLE_QPBOX);
// pyreneActuator.setLoadParam(30.0,-0.021481595, 0.10);
DDPSolver<double,2,1> testSolverActuator(pyreneActuator,costFunction,DISABLE_FULLDDP,DISABLE_QPBOX);
double dx_joint;
dx_joint = 0.5422;
......
......@@ -2,7 +2,7 @@
#include <fstream>
#include <ddp-actuator-solver/ddpsolver.hh>
#include "PyreneActuator.hh"
#include "pyreneActuator.hh"
#include "pyreneCostFunction.hh"
#include <time.h>
......@@ -30,12 +30,12 @@ int main()
DDPSolver<double,2,1>::commandVecTab_t uList;
DDPSolver<double,2,1>::traj lastTraj;
PyreneActuator PyreneActuator;
pyreneActuator pyreneActuator;
CostFunctionPyreneActuator costFunction;
costFunction.setTauLimit(70);
costFunction.setJointLimit(0.0, -2.35619449019);
costFunction.setJointVelLimit(30.0, -30.0);
DDPSolver<double,2,1> testSolverActuator(PyreneActuator,costFunction,DISABLE_FULLDDP,DISABLE_QPBOX);
DDPSolver<double,2,1> testSolverActuator(pyreneActuator,costFunction,DISABLE_FULLDDP,DISABLE_QPBOX);
testSolverActuator.FirstInitSolver(xinit,xDes,T,dt,iterMax,stopCrit);
int N = 100;
......
#include <math.h>
#include <cmath>
#include <iostream>
#include "PyreneActuator.hh"
#include "pyreneActuator.hh"
#define pi M_PI
const double PyreneActuator::K = 10.6;
const double PyreneActuator::J_j = 0.5878;
const double PyreneActuator::F_vj = 0.4757;
const double PyreneActuator::F_sj = 0.5403;
const double PyreneActuator::offset_j = -0.3012;
const double PyreneActuator::J_m = 0.21;
const double PyreneActuator::F_vm = 5.6714;
const double PyreneActuator::F_sm = 4.0420;
const double PyreneActuator::offset_m = 0.5572;
const double PyreneActuator::M = 4.5667;
const double PyreneActuator::c_y = 1.1005/M;
const double PyreneActuator::c_x = -0.0981/M;
const double PyreneActuator::mu = 1000.0;
const double PyreneActuator::g = 9.81;
const double pyreneActuator::K = 10.6;
const double pyreneActuator::J_j = 0.5878;
const double pyreneActuator::F_vj = 0.4757;
const double pyreneActuator::F_sj = 0.5403;
const double pyreneActuator::offset_j = -0.3012;
const double pyreneActuator::J_m = 0.21;
const double pyreneActuator::F_vm = 5.6714;
const double pyreneActuator::F_sm = 4.0420;
const double pyreneActuator::offset_m = 0.5572;
const double pyreneActuator::M = 4.5667;
const double pyreneActuator::c_y = 1.1005/M;
const double pyreneActuator::c_x = -0.0981/M;
const double pyreneActuator::mu = 1000.0;
const double pyreneActuator::g = 9.81;
/*
* x0 -> actuator position
* x1 -> actuator speed
*/
PyreneActuator::PyreneActuator()
pyreneActuator::pyreneActuator()
{
stateNb=2;
commandNb=1;
......@@ -55,25 +55,25 @@ PyreneActuator::PyreneActuator()
upperCommandBounds << 1.0;
}
void PyreneActuator::setLoadParam(const double& mass, const double& coordX, const double& coordY)
void pyreneActuator::setLoadParam(const double& mass, const double& coordX, const double& coordY)
{
L = mass;
l_y = coordY;
l_x = coordX;
}
void PyreneActuator::setLoadMass(const double& mass)
void pyreneActuator::setLoadMass(const double& mass)
{
L = mass;
std::cout << " L : " << L << std::endl;
}
void PyreneActuator::removeLoad()
void pyreneActuator::removeLoad()
{
L = 0.0;
}
PyreneActuator::stateVec_t PyreneActuator::computeStateDeriv(double&, const stateVec_t& X,
pyreneActuator::stateVec_t pyreneActuator::computeStateDeriv(double&, const stateVec_t& X,
const commandVec_t &U)
{
stateVec_t dX;
......@@ -84,7 +84,7 @@ PyreneActuator::stateVec_t PyreneActuator::computeStateDeriv(double&, const stat
return dX;
}
PyreneActuator::stateVec_t PyreneActuator::computeNextState(double& dt, const stateVec_t& X,
pyreneActuator::stateVec_t pyreneActuator::computeNextState(double& dt, const stateVec_t& X,
const commandVec_t& U)
{
stateVec_t x_next,k1,k2,k3,k4;
......@@ -97,7 +97,7 @@ PyreneActuator::stateVec_t PyreneActuator::computeNextState(double& dt, const st
}
void PyreneActuator::computeModelDeriv(double& dt, const stateVec_t& X,const commandVec_t& U)
void pyreneActuator::computeModelDeriv(double& dt, const stateVec_t& X,const commandVec_t& U)
{
double dh = 1e-7;
stateVec_t Xp, Xm;
......@@ -113,17 +113,17 @@ void PyreneActuator::computeModelDeriv(double& dt, const stateVec_t& X,const com
}
}
PyreneActuator::stateMat_t PyreneActuator::computeTensorContxx(const stateVec_t& )
pyreneActuator::stateMat_t pyreneActuator::computeTensorContxx(const stateVec_t& )
{
return QxxCont;
}
PyreneActuator::commandMat_t PyreneActuator::computeTensorContuu(const stateVec_t& )
pyreneActuator::commandMat_t pyreneActuator::computeTensorContuu(const stateVec_t& )
{
return QuuCont;
}
PyreneActuator::commandR_stateC_t PyreneActuator::computeTensorContux(const stateVec_t& )
pyreneActuator::commandR_stateC_t pyreneActuator::computeTensorContux(const stateVec_t& )
{
return QuxCont;
}
......@@ -3,10 +3,10 @@
#include <ddp-actuator-solver/dynamicmodel.hh>
class PyreneActuator : public DynamicModel<double,2,1>
class pyreneActuator : public DynamicModel<double,2,1>
{
public:
PyreneActuator();
pyreneActuator();
void setLoadParam(const double& mass, const double& coordX, const double& coordY);
void setLoadMass(const double& mass);
void removeLoad();
......
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