Commit 8223cbe1 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[python] Fix se3 namespace for python bindings.

parent bb184fa6
......@@ -81,17 +81,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;
......@@ -127,7 +127,7 @@ namespace tsid
static bool setMaxNormalForce (Contact6d & self, const double maxNormalForce){
return self.setMaxNormalForce(maxNormalForce);
}
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){
......
......@@ -80,17 +80,17 @@ namespace tsid
return name;
}
static math::ConstraintEquality computeMotionTask(ContactPoint & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality computeMotionTask(ContactPoint & 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(ContactPoint & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintInequality computeForceTask(ContactPoint & 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(ContactPoint & self, const double t, const Eigen::VectorXd & q, const Eigen::VectorXd & v, const se3::Data & data){
static math::ConstraintEquality computeForceRegularizationTask(ContactPoint & 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;
......@@ -129,7 +129,7 @@ namespace tsid
static bool setMaxNormalForce (ContactPoint & self, const double maxNormalForce){
return self.setMaxNormalForce(maxNormalForce);
}
static void setReference(ContactPoint & self, const se3::SE3 & ref){
static void setReference(ContactPoint & self, const pinocchio::SE3 & ref){
self.setReference(ref);
}
static void setForceReference(ContactPoint & self, const::Eigen::VectorXd f_ref){
......
......@@ -72,8 +72,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;
......@@ -132,4 +132,4 @@ namespace tsid
}
#endif // ifndef __tsid_python_task_com_hpp__
\ No newline at end of file
#endif // ifndef __tsid_python_task_com_hpp__
......@@ -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;
......@@ -140,4 +140,4 @@ namespace tsid
}
#endif // ifndef __tsid_python_task_joint_hpp__
\ No newline at end of file
#endif // ifndef __tsid_python_task_joint_hpp__
......@@ -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;
......@@ -136,4 +136,4 @@ namespace tsid
}
#endif // ifndef __tsid_python_task_se3_hpp__
\ No newline at end of file
#endif // ifndef __tsid_python_task_se3_hpp__
......@@ -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){
......@@ -81,4 +81,4 @@ namespace tsid
}
#endif // ifndef __tsid_python_traj_se3_hpp__
\ No newline at end of file
#endif // ifndef __tsid_python_traj_se3_hpp__
Supports Markdown
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