Verified Commit 59d65719 authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[AutoDiff/Joint] Add explicit Scalar cast

parent 818610c9
......@@ -108,8 +108,8 @@ namespace se3
template<typename MotionDerived>
void setTo(MotionDense<MotionDerived> & other) const
{
other.linear() << m_x_dot, m_y_dot, 0;
other.angular() << 0, 0, m_theta_dot;
other.linear() << m_x_dot, m_y_dot, (Scalar)0;
other.angular() << (Scalar)0, (Scalar)0, m_theta_dot;
}
template<typename S2, int O2, typename D2>
......
......@@ -95,7 +95,7 @@ namespace se3
void setTo(MotionDense<MotionDerived> & other) const
{
for(Eigen::DenseIndex k = 0; k < 3; ++k)
other.linear()[k] = k == axis ? rate : 0;
other.linear()[k] = k == axis ? rate : (Scalar)0;
other.angular().setZero();
}
......
......@@ -220,7 +220,7 @@ namespace se3
{
m.linear().setZero();
for(Eigen::DenseIndex k = 0; k < 3; ++k)
m.angular()[k] = k == axis ? w : 0;
m.angular()[k] = k == axis ? w : (Scalar)0;
}
template<typename MotionDerived>
......
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