18 #ifndef __se3_frames_hxx__ 19 #define __se3_frames_hxx__ 21 #include "pinocchio/algorithm/kinematics.hpp" 22 #include "pinocchio/algorithm/jacobian.hpp" 23 #include "pinocchio/algorithm/check.hpp" 32 assert(model.
check(data) &&
"data is not consistent with model.");
36 for (Model::FrameIndex i=1; i < (Model::FrameIndex) model.
nframes; ++i)
39 const Model::JointIndex & parent = frame.
parent;
41 data.
oMf[i] = data.
oMi[parent];
49 const Model::FrameIndex frame_id)
52 const Model::JointIndex & parent = frame.
parent;
54 data.
oMf[frame_id] = data.
oMi[parent];
57 return data.
oMf[frame_id];
68 const Eigen::VectorXd & q)
70 assert(model.
check(data) &&
"data is not consistent with model.");
78 const Model::FrameIndex frame_id,
81 assert(model.
check(data) &&
"data is not consistent with model.");
84 const Model::JointIndex & parent = frame.parent;
85 frame_v = frame.placement.actInv(data.
v[parent]);
90 const Model::FrameIndex frame_id,
93 assert(model.
check(data) &&
"data is not consistent with model.");
96 const Model::JointIndex & parent = frame.parent;
97 frame_a = frame.placement.actInv(data.
a[parent]);
100 template<ReferenceFrame rf>
103 const Model::FrameIndex frame_id,
106 assert(J.cols() == model.
nv);
107 assert(data.
J.cols() == model.
nv);
108 assert(model.
check(data) &&
"data is not consistent with model.");
111 const Model::JointIndex & joint_id = frame.parent;
114 getJointJacobian<WORLD>(model,data,joint_id,J);
120 const SE3 & oMframe = data.
oMf[frame_id];
133 const Model::FrameIndex frame_id,
136 getFrameJacobian<LOCAL>(model,data,frame_id,J);
139 template<ReferenceFrame rf>
142 const Model::FrameIndex frameId,
145 assert( dJ.rows() == data.
dJ.rows() );
146 assert( dJ.cols() == data.
dJ.cols() );
147 assert(model.
check(data) &&
"data is not consistent with model.");
150 const Model::JointIndex & joint_id = frame.parent;
153 getJointJacobianTimeVariation<WORLD>(model,data,joint_id,dJ);
159 const SE3 & oMframe = data.
oMf[frameId];
173 #endif // ifndef __se3_frames_hxx__ container::aligned_vector< Motion > a
Vector of joint accelerations expressed at the centers of the joints.
JointIndex parent
Index of the parent joint.
int nv
Dimension of the velocity vector space.
PINOCCHIO_DEPRECATED void framesForwardKinematics(const Model &model, Data &data)
Updates the placement of each frame contained in the model.
container::aligned_vector< Frame > frames
Vector of operational frames registered on the model.
void getFrameJacobian(const Model &model, const Data &data, const Model::FrameIndex frame_id, Data::Matrix6x &J)
Returns the jacobian of the frame expressed either in the LOCAL frame coordinate system or in the WOR...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6x
The 6d jacobian type (temporary)
void getFrameAcceleration(const Model &model, const Data &data, const Model::FrameIndex frame_id, Motion &frame_a)
Returns the spatial acceleration of the frame expressed in the LOCAL frame coordinate system...
JointModelVector joints
Model of joint i, encapsulated in a JointModelAccessor.
Matrix6x J
Jacobian of joint placements.
int nv(const JointModelVariant &jmodel)
Visit a JointModelVariant through JointNvVisitor to get the dimension of the joint tangent space...
A Plucker coordinate frame attached to a parent joint inside a kinematic tree.
const SE3 & updateFramePlacement(const Model &model, Data &data, const Model::FrameIndex frame_id)
Updates the placement of the given frame.
Matrix6x dJ
Derivative of the Jacobian with respect to the time.
void forwardKinematics(const Model &model, Data &data, const Eigen::VectorXd &q)
Update the joint placements according to the current joint configuration.
void updateFramePlacements(const Model &model, Data &data)
Updates the placement of each frame contained in the model.
container::aligned_vector< SE3 > oMf
Vector of absolute operationnel frame placements (wrt the world).
container::aligned_vector< SE3 > oMi
Vector of absolute joint placements (wrt the world).
int idx_v(const JointModelVariant &jmodel)
Visit a JointModelVariant through JointIdxVVisitor to get the index in the full model tangent space c...
bool check(const AlgorithmCheckerBase< D > &checker=AlgorithmCheckerBase< D >()) const
std::vector< int > parents_fromRow
First previous non-zero row in M (used in Cholesky Decomposition).
container::aligned_vector< Motion > v
Vector of joint velocities expressed at the centers of the joints.
void getFrameJacobianTimeVariation(const Model &model, const Data &data, const Model::FrameIndex frameId, Data::Matrix6x &dJ)
Computes the Jacobian time variation of a specific frame (given by frame_id) expressed either in the ...
internal::SE3GroupAction< D >::ReturnType actInv(const D &d) const
by = aXb.actInv(ay)
void getFrameVelocity(const Model &model, const Data &data, const Model::FrameIndex frame_id, Motion &frame_v)
Returns the spatial velocity of the frame expressed in the LOCAL frame coordinate system...
SE3 placement
Placement of the frame wrt the parent joint.
int nframes
Number of operational frames.