Commit 5761d65b authored by H. Zhu's avatar H. Zhu Committed by Andrea Del Prete
Browse files

replace namespace

parent 91ea44e8
......@@ -82,17 +82,17 @@ namespace tsid
return name;
}
static math::ConstraintEquality computeMotionTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality computeMotionTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.computeMotionTask(t, q, v, data);
math::ConstraintEquality cons(self.getMotionConstraint().name(), self.getMotionConstraint().matrix(), self.getMotionConstraint().vector());
return cons;
}
static math::ConstraintInequality computeForceTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintInequality computeForceTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.computeForceTask(t, q, v, data);
math::ConstraintInequality cons(self.getForceConstraint().name(), self.getForceConstraint().matrix(), self.getForceConstraint().lowerBound(), self.getForceConstraint().upperBound());
return cons;
}
static math::ConstraintEquality computeForceRegularizationTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality computeForceRegularizationTask(Contact6d & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.computeForceRegularizationTask(t, q, v, data);
math::ConstraintEquality cons(self.getForceRegularizationTask().name(), self.getForceRegularizationTask().matrix(), self.getForceRegularizationTask().vector());
return cons;
......@@ -131,7 +131,7 @@ namespace tsid
static bool setRegularizationTaskWeight (Contact6d & self, const double w){
return self.setRegularizationTaskWeight(w);
}
static void setReference(Contact6d & self, const se3::SE3 & ref){
static void setReference(Contact6d & self, const pinocchio::SE3 & ref){
self.setReference(ref);
}
static void setForceReference(Contact6d & self, const::Eigen::VectorXd f_ref){
......
......@@ -68,8 +68,8 @@ namespace tsid
.def("getContactForce", &InvDynPythonVisitor::getContactForce, bp::args("name", "HQPOutput"))
;
}
static se3::Data data(const T & self){
se3::Data data = self.data();
static pinocchio::Data data(const T & self){
pinocchio::Data data = self.data();
return data;
}
static bool addMotionTask_SE3(T & self, tasks::TaskSE3Equality & task, double weight, unsigned int priorityLevel, double transition_duration){
......
......@@ -44,7 +44,7 @@ namespace tsid
{
cl
.def(bp::init<std::string, std_vec, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("verbose")), "Default constructor without RootJoint."))
.def(bp::init<std::string, std_vec, se3::JointModelVariant, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
.def(bp::init<std::string, std_vec, pinocchio::JointModelVariant, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
.add_property("nq", &Robot::nq)
.add_property("nv", &Robot::nv)
......@@ -74,11 +74,11 @@ namespace tsid
;
}
static se3::Model model (const Robot & self){
static pinocchio::Model model (const Robot & self){
return self.model();
}
static se3::Data data(const Robot & self){
se3::Data data(self.model());
static pinocchio::Data data(const Robot & self){
pinocchio::Data data(self.model());
return data;
}
static Eigen::VectorXd rotor_inertias(const Robot & self){
......@@ -94,46 +94,46 @@ namespace tsid
return self.gear_ratios(gear_ratios);
}
static Eigen::Vector3d com (const Robot & self, const se3::Data & data){
static Eigen::Vector3d com (const Robot & self, const pinocchio::Data & data){
return self.com(data);
}
static Eigen::Vector3d com_vel (const Robot & self, const se3::Data & data){
static Eigen::Vector3d com_vel (const Robot & self, const pinocchio::Data & data){
return self.com_vel(data);
}
static Eigen::Vector3d com_acc (const Robot & self, const se3::Data & data){
static Eigen::Vector3d com_acc (const Robot & self, const pinocchio::Data & data){
return self.com_acc(data);
}
static Matrix3x Jcom (const Robot & self, const se3::Data & data){
static Matrix3x Jcom (const Robot & self, const pinocchio::Data & data){
return self.Jcom(data);
}
static void computeAllTerms (const Robot & self, se3::Data & data, const Eigen::VectorXd & q, const Eigen::VectorXd & v){
static void computeAllTerms (const Robot & self, pinocchio::Data & data, const Eigen::VectorXd & q, const Eigen::VectorXd & v){
self.computeAllTerms(data, q, v);
}
static Eigen::MatrixXd mass (Robot & self, se3::Data & data){
static Eigen::MatrixXd mass (Robot & self, pinocchio::Data & data){
return self.mass(data);
}
static Eigen::VectorXd nonLinearEffects(const Robot & self, const se3::Data & data){
static Eigen::VectorXd nonLinearEffects(const Robot & self, const pinocchio::Data & data){
return self.nonLinearEffects(data);
}
static se3::SE3 position(const Robot & self, const se3::Data & data, const se3::Model::JointIndex & index){
static pinocchio::SE3 position(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::JointIndex & index){
return self.position(data, index);
}
static se3::Motion velocity(const Robot & self, const se3::Data & data, const se3::Model::JointIndex & index){
static pinocchio::Motion velocity(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::JointIndex & index){
return self.velocity(data, index);
}
static se3::Motion acceleration(const Robot & self, const se3::Data & data, const se3::Model::JointIndex & index){
static pinocchio::Motion acceleration(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::JointIndex & index){
return self.acceleration(data, index);
}
static se3::SE3 framePosition(const Robot & self, const se3::Data & data, const se3::Model::FrameIndex & index){
static pinocchio::SE3 framePosition(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::FrameIndex & index){
return self.framePosition(data, index);
}
static se3::Motion frameVelocity(const Robot & self, const se3::Data & data, const se3::Model::FrameIndex & index){
static pinocchio::Motion frameVelocity(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::FrameIndex & index){
return self.frameVelocity(data, index);
}
static se3::Motion frameAcceleration(const Robot & self, const se3::Data & data, const se3::Model::FrameIndex & index){
static pinocchio::Motion frameAcceleration(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::FrameIndex & index){
return self.frameAcceleration(data, index);
}
static se3::Motion frameClassicAcceleration(const Robot & self, const se3::Data & data, const se3::Model::FrameIndex & index){
static pinocchio::Motion frameClassicAcceleration(const Robot & self, const pinocchio::Data & data, const pinocchio::Model::FrameIndex & index){
return self.frameClassicAcceleration(data, index);
}
......
......@@ -69,7 +69,7 @@ namespace tsid
std::string name = self.name();
return name;
}
static math::ConstraintEquality compute(TaskCOM & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality compute(TaskCOM & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.compute(t, q, v, data);
math::ConstraintEquality cons(self.getConstraint().name(), self.getConstraint().matrix(), self.getConstraint().vector());
return cons;
......
......@@ -71,7 +71,7 @@ namespace tsid
std::string name = self.name();
return name;
}
static math::ConstraintEquality compute(TaskJoint & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality compute(TaskJoint & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.compute(t, q, v, data);
math::ConstraintEquality cons(self.getConstraint().name(), self.getConstraint().matrix(), self.getConstraint().vector());
return cons;
......
......@@ -70,7 +70,7 @@ namespace tsid
std::string name = self.name();
return name;
}
static math::ConstraintEquality compute(TaskSE3 & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality compute(TaskSE3 & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const pinocchio::Data & data){
self.compute(t, q, v, data);
math::ConstraintEquality cons(self.getConstraint().name(), self.getConstraint().matrix(), self.getConstraint().vector());
return cons;
......
......@@ -41,7 +41,7 @@ namespace tsid
{
cl
.def(bp::init<std::string>((bp::arg("name")), "Default Constructor with name"))
.def(bp::init<std::string, se3::SE3>((bp::arg("name"), bp::arg("reference")), "Default Constructor with name and ref_vec"))
.def(bp::init<std::string, pinocchio::SE3>((bp::arg("name"), bp::arg("reference")), "Default Constructor with name and ref_vec"))
.add_property("size", &TrajSE3::size)
.def("setReference", &TrajectorySE3ConstantPythonVisitor::setReference, bp::arg("M_ref"))
......@@ -51,7 +51,7 @@ namespace tsid
.def("getSample", &TrajectorySE3ConstantPythonVisitor::getSample, bp::arg("time"))
;
}
static void setReference(TrajSE3 & self, const se3::SE3 & ref){
static void setReference(TrajSE3 & self, const pinocchio::SE3 & ref){
self.setReference(ref);
}
static trajectories::TrajectorySample computeNext(TrajSE3 & self){
......
......@@ -42,7 +42,7 @@ namespace tsid
typedef tasks::TaskSE3Equality TaskSE3Equality;
typedef math::ConstraintInequality ConstraintInequality;
typedef math::ConstraintEquality ConstraintEquality;
typedef se3::SE3 SE3;
typedef pinocchio::SE3 SE3;
Contact6d(const std::string & name,
RobotWrapper & robot,
......
......@@ -42,7 +42,7 @@ namespace tsid
typedef math::ConstRefVector ConstRefVector;
typedef math::Matrix Matrix;
typedef tasks::TaskMotion TaskMotion;
typedef se3::Data Data;
typedef pinocchio::Data Data;
typedef robots::RobotWrapper RobotWrapper;
ContactBase(const std::string & name,
......
......@@ -72,7 +72,7 @@ namespace tsid
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef se3::Data Data;
typedef pinocchio::Data Data;
typedef math::Vector Vector;
typedef math::Matrix Matrix;
typedef math::ConstRefVector ConstRefVector;
......
......@@ -39,7 +39,7 @@ namespace tsid
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef se3::Data Data;
typedef pinocchio::Data Data;
typedef math::Vector Vector;
typedef math::RefVector RefVector;
typedef math::ConstRefVector ConstRefVector;
......
......@@ -81,18 +81,18 @@ namespace tsid
/**
* Convert the input SE3 object to a 7D vector of floats [X,Y,Z,Q1,Q2,Q3,Q4].
*/
void SE3ToXYZQUAT(const se3::SE3 & M, RefVector xyzQuat);
void SE3ToXYZQUAT(const pinocchio::SE3 & M, RefVector xyzQuat);
/**
* Convert the input SE3 object to a 12D vector of floats [X,Y,Z,R11,R12,R13,R14,...].
*/
void SE3ToVector(const se3::SE3 & M, RefVector vec);
void SE3ToVector(const pinocchio::SE3 & M, RefVector vec);
void vectorToSE3(RefVector vec, se3::SE3 & M);
void vectorToSE3(RefVector vec, pinocchio::SE3 & M);
void errorInSE3 (const se3::SE3 & M,
const se3::SE3 & Mdes,
se3::Motion & error);
void errorInSE3 (const pinocchio::SE3 & M,
const pinocchio::SE3 & Mdes,
pinocchio::Motion & error);
void solveWithDampingFromSvd(Eigen::JacobiSVD<Eigen::MatrixXd> & svd,
ConstRefVector b,
......
......@@ -41,11 +41,11 @@ namespace tsid
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef math::Scalar Scalar;
typedef se3::Model Model;
typedef se3::Data Data;
typedef se3::Motion Motion;
typedef se3::Frame Frame;
typedef se3::SE3 SE3;
typedef pinocchio::Model Model;
typedef pinocchio::Data Data;
typedef pinocchio::Motion Motion;
typedef pinocchio::Frame Frame;
typedef pinocchio::SE3 SE3;
typedef math::Vector Vector;
typedef math::Vector3 Vector3;
typedef math::Vector6 Vector6;
......@@ -61,7 +61,7 @@ namespace tsid
RobotWrapper(const std::string & filename,
const std::vector<std::string> & package_dirs,
const se3::JointModelVariant & rootJoint,
const pinocchio::JointModelVariant & rootJoint,
bool verbose=false);
virtual int nq() const;
......
......@@ -81,10 +81,10 @@ namespace tsid
{ return aligned_pair<T1,T2>(t1,t2); }
typedef se3::container::aligned_vector< aligned_pair<double, math::ConstraintBase*> > ConstraintLevel;
typedef se3::container::aligned_vector< aligned_pair<double, const math::ConstraintBase*> > ConstConstraintLevel;
typedef se3::container::aligned_vector<ConstraintLevel> HQPData;
typedef se3::container::aligned_vector<ConstConstraintLevel> ConstHQPData;
typedef pinocchio::container::aligned_vector< aligned_pair<double, math::ConstraintBase*> > ConstraintLevel;
typedef pinocchio::container::aligned_vector< aligned_pair<double, const math::ConstraintBase*> > ConstConstraintLevel;
typedef pinocchio::container::aligned_vector<ConstraintLevel> HQPData;
typedef pinocchio::container::aligned_vector<ConstConstraintLevel> ConstHQPData;
}
......
......@@ -40,7 +40,7 @@ namespace tsid
typedef math::ConstraintBase ConstraintBase;
typedef math::ConstRefVector ConstRefVector;
typedef se3::Data Data;
typedef pinocchio::Data Data;
typedef robots::RobotWrapper RobotWrapper;
TaskBase(const std::string & name,
......
......@@ -37,7 +37,7 @@ namespace tsid
typedef math::Vector Vector;
typedef math::VectorXi VectorXi;
typedef math::ConstraintEquality ConstraintEquality;
typedef se3::Data Data;
typedef pinocchio::Data Data;
TaskJointPosture(const std::string & name,
RobotWrapper & robot);
......
......@@ -39,10 +39,10 @@ namespace tsid
typedef trajectories::TrajectorySample TrajectorySample;
typedef math::Vector Vector;
typedef math::ConstraintEquality ConstraintEquality;
typedef se3::Data Data;
typedef se3::Data::Matrix6x Matrix6x;
typedef se3::Motion Motion;
typedef se3::SE3 SE3;
typedef pinocchio::Data Data;
typedef pinocchio::Data::Matrix6x Matrix6x;
typedef pinocchio::Motion Motion;
typedef pinocchio::SE3 SE3;
TaskSE3Equality(const std::string & name,
RobotWrapper & robot,
......
......@@ -32,7 +32,7 @@ namespace tsid
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef se3::SE3 SE3;
typedef pinocchio::SE3 SE3;
TrajectorySE3Constant(const std::string & name);
......
......@@ -122,7 +122,7 @@ void Contact6d:: updateForceGeneratorMatrix()
for(int i=0; i<4; i++)
{
m_forceGenMat.block<3,3>(0, i*3).setIdentity();
m_forceGenMat.block<3,3>(3, i*3) = se3::skew(m_contactPoints.col(i));
m_forceGenMat.block<3,3>(3, i*3) = pinocchio::skew(m_contactPoints.col(i));
}
}
......
......@@ -25,7 +25,7 @@ using namespace tasks;
using namespace contacts;
using namespace solvers;
typedef se3::Data Data;
typedef pinocchio::Data Data;
TaskLevel::TaskLevel(tasks::TaskBase & task,
unsigned int priority):
......
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