Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguous function call on Windows #2155

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Remove a lot of warnings ([#2139](https://github.com/stack-of-tasks/pinocchio/pull/2139))
- `MeshcatVisualizer` doesn't crash anymore when there is no collision model defined ([#2147](https://github.com/stack-of-tasks/pinocchio/pull/2147))
- Fix MSVC build ([#2155](https://github.com/stack-of-tasks/pinocchio/pull/2155))

### Added
- Add `examples/floating-base-velocity-viewer.py` to visualize floating base velocity [#2143](https://github.com/stack-of-tasks/pinocchio/pull/2143)
Expand Down
46 changes: 22 additions & 24 deletions include/pinocchio/multibody/liegroup/special-euclidean.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
Expand All @@ -384,10 +384,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
MotionTpl<Scalar,0> nu; nu.toVector() << v.template head<2>(), 0, 0, 0, v[2];
Expand All @@ -410,9 +410,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J) const
const Eigen::MatrixBase<Jacobian_t> & J)
{
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J);
PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
Expand All @@ -431,9 +431,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J) const
const Eigen::MatrixBase<Jacobian_t> & J)
{
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J);
MotionTpl<Scalar,0> nu; nu.toVector() << v.template head<2>(), 0, 0, 0, v[2];
Expand Down Expand Up @@ -470,16 +470,15 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t>
void random_impl(const Eigen::MatrixBase<Config_t> & qout) const
static void random_impl(const Eigen::MatrixBase<Config_t> & qout)
{
R2crossSO2_t().random(qout);
}

template <class ConfigL_t, class ConfigR_t, class ConfigOut_t>
void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> & lower,
static void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> & lower,
const Eigen::MatrixBase<ConfigR_t> & upper,
const Eigen::MatrixBase<ConfigOut_t> & qout)
const
{
R2crossSO2_t ().randomConfiguration(lower, upper, qout);
}
Expand Down Expand Up @@ -581,9 +580,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP

/// \cheatsheet \f$ \frac{\partial\ominus}{\partial q_1} {}^1X_0 = - \frac{\partial\ominus}{\partial q_0} \f$
template <ArgumentPosition arg, class ConfigL_t, class ConfigR_t, class JacobianOut_t>
void dDifference_impl (const Eigen::MatrixBase<ConfigL_t> & q0,
static void dDifference_impl (const Eigen::MatrixBase<ConfigL_t> & q0,
const Eigen::MatrixBase<ConfigR_t> & q1,
const Eigen::MatrixBase<JacobianOut_t> & J) const
const Eigen::MatrixBase<JacobianOut_t> & J)
{
typedef typename SE3::Vector3 Vector3;
typedef typename SE3::Matrix3 Matrix3;
Expand Down Expand Up @@ -741,10 +740,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
Eigen::Matrix<Scalar,6,6> Jtmp6;
Expand All @@ -759,10 +758,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
Expand All @@ -781,9 +780,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP


template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J_out) const
const Eigen::MatrixBase<Jacobian_t> & J_out)
{
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J_out);
Eigen::Matrix<Scalar,6,6> Jtmp6;
Expand All @@ -799,9 +798,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J_out) const
const Eigen::MatrixBase<Jacobian_t> & J_out)
{
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J_out);
PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
Expand Down Expand Up @@ -847,16 +846,15 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t>
void random_impl (const Eigen::MatrixBase<Config_t>& qout) const
static void random_impl (const Eigen::MatrixBase<Config_t>& qout)
{
R3crossSO3_t().random(qout);
}

template <class ConfigL_t, class ConfigR_t, class ConfigOut_t>
void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> & lower,
static void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> & lower,
const Eigen::MatrixBase<ConfigR_t> & upper,
const Eigen::MatrixBase<ConfigOut_t> & qout)
const
{
R3crossSO3_t ().randomConfiguration(lower, upper, qout);
}
Expand Down
54 changes: 27 additions & 27 deletions include/pinocchio/multibody/liegroup/special-orthogonal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ namespace pinocchio
}

template <ArgumentPosition arg, class ConfigL_t, class ConfigR_t, class JacobianOut_t>
void dDifference_impl(const Eigen::MatrixBase<ConfigL_t> & q0,
static void dDifference_impl(const Eigen::MatrixBase<ConfigL_t> & q0,
const Eigen::MatrixBase<ConfigR_t> & q1,
const Eigen::MatrixBase<JacobianOut_t> & J) const
const Eigen::MatrixBase<JacobianOut_t> & J)
{
Matrix2 R; // R0.transpose() * R1;
R(0,0) = R(1,1) = q0.dot(q1);
Expand Down Expand Up @@ -176,7 +176,7 @@ namespace pinocchio
// See quaternion::firstOrderNormalize for equations.
const Scalar norm2 = out.squaredNorm();
out *= (3 - norm2) / 2;
assert (isNormalized(out));
assert (pinocchio::isNormalized(out));
}

template <class Config_t, class Jacobian_t>
Expand Down Expand Up @@ -237,32 +237,32 @@ namespace pinocchio
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & Jout) const
const Eigen::MatrixBase<JacobianOut_t> & Jout)
{
PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,Jout) = Jin;
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & Jout) const
const Eigen::MatrixBase<JacobianOut_t> & Jout)
{
PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,Jout) = Jin;
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<Jacobian_t> & /*J*/) const {}
const Eigen::MatrixBase<Jacobian_t> & /*J*/) {}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & /*v*/,
const Eigen::MatrixBase<Jacobian_t> & /*J*/) const {}
const Eigen::MatrixBase<Jacobian_t> & /*J*/) {}



Expand Down Expand Up @@ -316,7 +316,7 @@ namespace pinocchio
}

template <class Config_t>
void random_impl (const Eigen::MatrixBase<Config_t>& qout) const
static void random_impl (const Eigen::MatrixBase<Config_t>& qout)
{
Config_t & out = PINOCCHIO_EIGEN_CONST_CAST(Config_t,qout);

Expand All @@ -326,9 +326,9 @@ namespace pinocchio
}

template <class ConfigL_t, class ConfigR_t, class ConfigOut_t>
void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> &,
static void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> &,
const Eigen::MatrixBase<ConfigR_t> &,
const Eigen::MatrixBase<ConfigOut_t> & qout) const
const Eigen::MatrixBase<ConfigOut_t> & qout)
{
random_impl(qout);
}
Expand Down Expand Up @@ -387,9 +387,9 @@ namespace pinocchio
}

template <ArgumentPosition arg, class ConfigL_t, class ConfigR_t, class JacobianOut_t>
void dDifference_impl (const Eigen::MatrixBase<ConfigL_t> & q0,
static void dDifference_impl (const Eigen::MatrixBase<ConfigL_t> & q0,
const Eigen::MatrixBase<ConfigR_t> & q1,
const Eigen::MatrixBase<JacobianOut_t> & J) const
const Eigen::MatrixBase<JacobianOut_t> & J)
{
typedef typename SE3::Matrix3 Matrix3;

Expand Down Expand Up @@ -510,10 +510,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
typedef typename SE3::Matrix3 Matrix3;
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
Expand All @@ -522,10 +522,10 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class JacobianIn_t, class JacobianOut_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<JacobianIn_t> & Jin,
const Eigen::MatrixBase<JacobianOut_t> & J_out) const
const Eigen::MatrixBase<JacobianOut_t> & J_out)
{
typedef typename SE3::Matrix3 Matrix3;
JacobianOut_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(JacobianOut_t,J_out);
Expand All @@ -538,9 +538,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dq_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J_out) const
const Eigen::MatrixBase<Jacobian_t> & J_out)
{
typedef typename SE3::Matrix3 Matrix3;
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J_out);
Expand All @@ -549,9 +549,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t, class Tangent_t, class Jacobian_t>
void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
static void dIntegrateTransport_dv_impl(const Eigen::MatrixBase<Config_t > & /*q*/,
const Eigen::MatrixBase<Tangent_t> & v,
const Eigen::MatrixBase<Jacobian_t> & J_out) const
const Eigen::MatrixBase<Jacobian_t> & J_out)
{
typedef typename SE3::Matrix3 Matrix3;
Jacobian_t & Jout = PINOCCHIO_EIGEN_CONST_CAST(Jacobian_t,J_out);
Expand Down Expand Up @@ -610,7 +610,7 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class Config_t>
void random_impl(const Eigen::MatrixBase<Config_t> & qout) const
static void random_impl(const Eigen::MatrixBase<Config_t> & qout)
{
QuaternionMap_t quat_map(PINOCCHIO_EIGEN_CONST_CAST(Config_t,qout).data());
quaternion::uniformRandom(quat_map);
Expand All @@ -619,9 +619,9 @@ PINOCCHIO_COMPILER_DIAGNOSTIC_POP
}

template <class ConfigL_t, class ConfigR_t, class ConfigOut_t>
void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> &,
static void randomConfiguration_impl(const Eigen::MatrixBase<ConfigL_t> &,
const Eigen::MatrixBase<ConfigR_t> &,
const Eigen::MatrixBase<ConfigOut_t> & qout) const
const Eigen::MatrixBase<ConfigOut_t> & qout)
{
random_impl(qout);
}
Expand Down
Loading
Loading