Verified Commit ae05852d authored by jcarpent's avatar jcarpent Committed by Justin Carpentier
Browse files

[Joint] Remove last hard written double type

parent 9ac93c93
......@@ -151,7 +151,7 @@ namespace se3
NQ = 7,
NV = 6
};
typedef double Scalar;
typedef _Scalar Scalar;
enum { Options = _Options };
typedef JointDataFreeFlyerTpl<Scalar,Options> JointDataDerived;
typedef JointModelFreeFlyerTpl<Scalar,Options> JointModelDerived;
......
......@@ -381,13 +381,14 @@ namespace se3
JointDataDerived createData() const { return JointDataDerived(); }
template<typename V>
inline void forwardKinematics(Transformation_t & M, const Eigen::MatrixBase<V> & q_joint) const
template<typename ConfigVector>
inline void forwardKinematics(Transformation_t & M, const Eigen::MatrixBase<ConfigVector> & q_joint) const
{
EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigVector_t,V);
EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ConfigVector_t,ConfigVector);
const double& c_theta = q_joint(2),
s_theta = q_joint(3);
const Scalar
& c_theta = q_joint(2),
& s_theta = q_joint(3);
M.rotation().template topLeftCorner<2,2>() << c_theta, -s_theta, s_theta, c_theta;
M.translation().template head<2>() = q_joint.template head<2>();
......
......@@ -61,7 +61,8 @@ namespace se3
template<typename Vector3Like, typename OtherScalar>
MotionRevoluteUnalignedTpl(const Eigen::MatrixBase<Vector3Like> & axis,
const OtherScalar & w)
: axis(axis), w(w)
: axis(axis)
, w(w)
{}
operator MotionPlain() const
......@@ -78,7 +79,7 @@ namespace se3
// data
Vector3 axis;
double w;
Scalar w;
}; // struct MotionRevoluteUnalignedTpl
......
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