Verified Commit fa5018cd authored by Francois Keith's avatar Francois Keith Committed by Justin Carpentier
Browse files

[Win32] Correct use of min/max, add typename, remove ambiguity

parent 36d3aebc
......@@ -312,9 +312,9 @@ namespace pinocchio
PINOCCHIO_CHECK_INPUT_ARGUMENT(model.gravity.angular().isZero(), "The gravity must be a pure force vector, no angular part");
for(Eigen::DenseIndex k =0; k < jmodel.nv(); ++k)
{
MotionRef<typename ColsBlock::ColXpr> min(J_cols.col(k));
MotionRef<typename ColsBlock::ColXpr> mout(dAdq_cols.col(k));
mout.linear() += model.gravity.linear().cross(min.angular());
MotionRef<typename ColsBlock::ColXpr> m_in(J_cols.col(k));
MotionRef<typename ColsBlock::ColXpr> m_out(dAdq_cols.col(k));
m_out.linear() += model.gravity.linear().cross(m_in.angular());
}
}
......
......@@ -465,12 +465,12 @@ namespace pinocchio
const std::vector<int> & nvt = data.nvSubtree_fromRow;
Mat & v_ = PINOCCHIO_EIGEN_CONST_CAST(Mat,v);
const int last_col = std::min(col-1,model.nv-2); // You can start from nv-2 (no child in nv-1)
const int last_col = std::min<int>(col-1,model.nv-2); // You can start from nv-2 (no child in nv-1)
v_.tail(model.nv - col - 1).setZero();
v_[col] = 1.;
for( int k=last_col;k>=0;--k )
{
int nvt_max = std::min(col,nvt[(size_t)k]-1);
int nvt_max = std::min<int>(col,nvt[(size_t)k]-1);
v_[k] = -U.row(k).segment(k+1,nvt_max).dot(v_.segment(k+1,nvt_max));
}
......
......@@ -391,9 +391,9 @@ namespace pinocchio
PINOCCHIO_CHECK_INPUT_ARGUMENT(model.gravity.angular().isZero(), "The gravity must be a pure force vector, no angular part");
for(Eigen::DenseIndex k =0; k < jmodel.nv(); ++k)
{
MotionRef<typename ColsBlock::ColXpr> min(J_cols.col(k));
MotionRef<typename ColsBlock::ColXpr> mout(dAdq_cols.col(k));
mout.linear() += model.gravity.linear().cross(min.angular());
MotionRef<typename ColsBlock::ColXpr> m_in(J_cols.col(k));
MotionRef<typename ColsBlock::ColXpr> m_out(dAdq_cols.col(k));
m_out.linear() += model.gravity.linear().cross(m_in.angular());
}
}
......
......@@ -144,7 +144,7 @@ namespace pinocchio
{
if(lastChild[(Index)i] == -1) lastChild[(Index)i] = i;
const Index & parent = model.parents[(Index)i];
lastChild[parent] = std::max(lastChild[(Index)i],lastChild[parent]);
lastChild[parent] = std::max<Scalar>(lastChild[(Index)i],lastChild[parent]);
nvSubtree[(Index)i]
= idx_v(model.joints[(Index)lastChild[(Index)i]]) + nv(model.joints[(Index)lastChild[(Index)i]])
......
......@@ -167,7 +167,7 @@ namespace pinocchio
template<typename Scalar, int Options, template<typename,int> class JointCollectionTpl>
inline void ModelTpl<Scalar,Options,JointCollectionTpl>::
appendBodyToJoint(const ModelTpl::JointIndex joint_index,
appendBodyToJoint(const typename ModelTpl::JointIndex joint_index,
const Inertia & Y,
const SE3 & body_placement)
{
......
Markdown is supported
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