Skip to content

Commit

Permalink
Merge pull request #506 from AngeloRendiniello/fixWin32Compilation
Browse files Browse the repository at this point in the history
Fix compilation on Windows 32-bit
  • Loading branch information
traversaro authored Jan 11, 2019
2 parents 1f3655b + c6a7e44 commit 6f2fae2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion doc/releases/v0_11_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ iDynTree 0.11.2 (UNRELEASED) {#v0_1
iDynTree 0.11.2 Release Notes
=========================

All the changes in this patch release were introduced in Pull Request https://github.com/robotology/idyntree/pull/482 .
Unless noted otherwise, the changes in this patch release were introduced in Pull Request https://github.com/robotology/idyntree/pull/482 .

Bug Fixes
---------
Expand All @@ -15,6 +15,7 @@ Bug Fixes
getFrameBiasAcc method always returned the bias acceleration corresponding to the first call to setRobotState.
* Fixed getBiasAcc method in KinDynComputations to take into account the effect of non-zero and non-parallel
linear and angular base velocity, described in https://github.com/robotology/idyntree/issues/370 .
* Fixed compilation on 32-bit Windows ( https://github.com/robotology/idyntree/pull/506 ).

New features
------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace iDynTree {
InverseKinematicsRotationParametrizationRollPitchYaw, /*!< Roll Pitch Yaw parametrization */
};

inline unsigned sizeOfRotationParametrization(enum InverseKinematicsRotationParametrization rotationParametrization)
inline int sizeOfRotationParametrization(enum InverseKinematicsRotationParametrization rotationParametrization)
{
switch (rotationParametrization) {
case InverseKinematicsRotationParametrizationQuaternion:
Expand Down
8 changes: 4 additions & 4 deletions src/inverse-kinematics/src/InverseKinematicsNLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ namespace kinematics {

bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixDynSize& newConstraint)
{
return addConstraintSparsityPattern(newConstraint, {0, newConstraint.rows()});
return addConstraintSparsityPattern(newConstraint, {0, static_cast<ptrdiff_t>(newConstraint.rows())});
}

template<unsigned int nRows, unsigned int nCols>
bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixFixSize<nRows, nCols>& newConstraint)
{
return addConstraintSparsityPattern(newConstraint, {0, newConstraint.rows()});
return addConstraintSparsityPattern(newConstraint, {0, static_cast<ptrdiff_t>(newConstraint.rows())});
}

bool SparsityHelper::addConstraintSparsityPattern(const iDynTree::MatrixDynSize& newConstraint,
Expand Down Expand Up @@ -1226,15 +1226,15 @@ void InverseKinematicsNLP::addSparsityInformationForConstraint(int constraintID,
iDynTree::toEigen(comInfo.projectedComJacobian) =
iDynTree::toEigen(m_data.m_comHullConstraint.A) * iDynTree::toEigen(m_data.m_comHullConstraint.Pdirection) * iDynTree::toEigen(comInfo.comJacobianAnalytical);

m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, comInfo.projectedComJacobian.rows()},
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, static_cast<ptrdiff_t>(comInfo.projectedComJacobian.rows())},
comInfo.projectedComJacobian, 0,
values);

constraintIndex += comInfo.projectedComJacobian.rows();
}

if (m_data.isCoMTargetActive()) {
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, comInfo.comJacobianAnalytical.rows()},
m_jacobianSparsityHelper.assignActualMatrixValues({constraintIndex, static_cast<ptrdiff_t>(comInfo.comJacobianAnalytical.rows())},
comInfo.comJacobianAnalytical, 0,
values);
constraintIndex += 3;
Expand Down

0 comments on commit 6f2fae2

Please sign in to comment.