5 #ifndef __pinocchio_spatial_classic_acceleration_hpp__
6 #define __pinocchio_spatial_classic_acceleration_hpp__
8 #include "pinocchio/spatial/se3.hpp"
9 #include "pinocchio/spatial/motion.hpp"
28 template<
typename Motion1,
typename Motion2,
typename Vector3Like>
32 const Eigen::MatrixBase<Vector3Like> & res)
34 PINOCCHIO_EIGEN_CONST_CAST(Vector3Like, res).noalias() =
35 spatial_acceleration.linear() + spatial_velocity.angular().cross(spatial_velocity.linear());
51 template<
typename Motion1,
typename Motion2>
56 typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(
typename Motion2::Vector3) ReturnType;
88 const Eigen::MatrixBase<Vector3Like> & res)
90 typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(
typename Motion1::LinearType) Vector3;
92 const Vector3 linear_velocity_frame_B =
93 spatial_velocity.linear() + spatial_velocity.angular().cross(placement.translation());
95 const Vector3 linear_acceleration_frame_B
96 = spatial_acceleration.linear() + spatial_velocity.angular().cross(linear_velocity_frame_B);
98 PINOCCHIO_EIGEN_CONST_CAST(Vector3Like, res).noalias() =
99 placement.rotation().transpose()
100 * (linear_acceleration_frame_B - placement.translation().cross(spatial_acceleration.angular()));
117 template<
typename Motion1,
typename Motion2,
typename SE3Scalar,
int SE3Options>
123 typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(
typename Motion2::Vector3) ReturnType;
Main pinocchio namespace.
void classicAcceleration(const MotionDense< Motion1 > &spatial_velocity, const MotionDense< Motion2 > &spatial_acceleration, const Eigen::MatrixBase< Vector3Like > &res)
Computes the classic acceleration from a given spatial velocity and spatial acceleration.