31#ifndef HPP_CONSTRAINTS_GENERIC_TRANSFORMATION_HH
32#define HPP_CONSTRAINTS_GENERIC_TRANSFORMATION_HH
40#include <pinocchio/spatial/se3.hpp>
46struct GenericTransformationModel {
48 bool R1isID, R2isID, t1isZero, t2isZero;
50 bool fullPos, fullOri;
55 inline void setJoint1(
const JointConstPtr_t&) {}
56 GenericTransformationModel(
const size_type nCols)
68 void checkIsIdentity1() {
69 R1isID = F1inJ1.rotation().isIdentity();
70 t1isZero = F1inJ1.translation().isZero();
72 void checkIsIdentity2() {
73 R2isID = F2inJ2.rotation().isIdentity();
74 t2isZero = F2inJ2.translation().isZero();
78struct GenericTransformationModel<true> : GenericTransformationModel<false> {
81 void setJoint1(
const JointConstPtr_t& j);
82 GenericTransformationModel(
const size_type nCols)
83 : GenericTransformationModel<false>(nCols), joint1() {}
133template <
int _Options>
137 typedef shared_ptr<GenericTransformation>
Ptr_t;
138 typedef weak_ptr<GenericTransformation>
WkPtr_t;
139#if __cplusplus >= 201103L
140 static constexpr bool IsRelative = _Options & RelativeBit,
168 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
184 std::vector<bool> mask = std::vector<bool>(
DerSize,
204 std::vector<bool> mask = std::vector<bool>(
DerSize,
223 std::vector<bool> mask = std::vector<bool>(
DerSize,
248 std::vector<bool> mask = std::vector<bool>(
DerSize,
257 m_.checkIsIdentity1();
258 m_.F2inJ2.setIdentity();
259 m_.checkIsIdentity2();
269 computeActiveParams();
270 assert(!joint || joint->robot() == robot_);
279 computeActiveParams();
280 assert(!joint || (joint->index() > 0 && joint->robot() == robot_));
289 m_.checkIsIdentity1();
296 m_.checkIsIdentity2();
316 if (index1 <= index2) {
317 return std::pair<JointConstPtr_t, JointConstPtr_t>(j1, j2);
319 return std::pair<JointConstPtr_t, JointConstPtr_t>(j2, j1);
323 virtual std::ostream&
print(std::ostream& o)
const;
333 std::vector<bool> mask);
338 computeActiveParams();
353 if (robot_ != castother.robot_)
return false;
354 if (mask_ != castother.mask_)
return false;
360 void computeActiveParams();
362 GenericTransformationModel<IsRelative> m_;
364 const std::vector<bool> mask_;
virtual bool isEqual(const DifferentiableFunction &other) const
Definition differentiable-function.hh:223
const std::string & name() const
Get function name.
Definition differentiable-function.hh:122
DifferentiableFunction(size_type sizeInput, size_type sizeInputDerivative, size_type sizeOutput, std::string name=std::string())
Concrete class constructor should call this constructor.
void jacobian(matrixOut_t jacobian, vectorIn_t argument) const
Definition differentiable-function.hh:88
static size_type index(const JointConstPtr_t &joint)
#define HPP_CONSTRAINTS_DLLAPI
Definition config.hh:88
Definition active-set-differentiable-function.hh:37
pinocchio::Transform3s Transform3s
Definition fwd.hh:64
pinocchio::DevicePtr_t DevicePtr_t
Definition fwd.hh:110
pinocchio::DeviceConstPtr_t DeviceConstPtr_t
Definition fwd.hh:111
pinocchio::size_type size_type
Definition fwd.hh:47
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:107
Eigen::Ref< matrix_t > matrixOut_t
Definition fwd.hh:58
pinocchio::LiegroupElementRef LiegroupElementRef
Definition fwd.hh:66
pinocchio::JointConstPtr_t JointConstPtr_t
Definition fwd.hh:50
matrix_t::Index size_type
::pinocchio::SE3 Transform3s
shared_ptr< const Joint > JointConstPtr_t
#define HPP_SERIALIZABLE()