Commit cac6b590 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

fix warnings

parent 8ff0fdb9
Pipeline #17235 passed with stage
in 11 minutes and 22 seconds
......@@ -148,8 +148,12 @@ struct ForceConeTpl : public LinearCone<_Scalar, 3, _Options> {
explicit ForceConeTpl(const Index size) : Base(size) {}
/// \returns a linear cone built from a friction coefficient and the number of rays along the Z axis.
static ForceConeTpl RegularCone(const Scalar mu, const VectorD& direction, const int num_rays) {
return RegularCone(mu, direction, num_rays, 0.);
}
static ForceConeTpl RegularCone(const Scalar mu, const VectorD& direction, const int num_rays,
const Scalar theta_offset = 0.) {
const Scalar theta_offset) {
assert(mu >= 0. && "mu must be positive");
assert(num_rays >= 1 && "The number of rays must be at least one");
......
......@@ -72,7 +72,11 @@ struct SecondOrderCone : public serialization::Serializable<SecondOrderCone<_Sca
Scalar rhsValue(const VectorD& point) const { return m_direction.dot(point); }
/// \returns true if the point is inside the cone
bool check(const VectorD& point, const Scalar factor = 1.) const {
bool check(const VectorD& point) const {
return check(point, 1.);
}
bool check(const VectorD& point, const Scalar factor) const {
return lhsValue(point) <= factor * rhsValue(point);
}
......
......@@ -144,8 +144,8 @@ curve_SE3_ptr_t buildPiecewiseSE3() {
}
quaternion_t randomQuaternion() { // already included in newest eigen release
const double u1 = Eigen::internal::random<double>(0, 1), u2 = Eigen::internal::random<double>(0, 2 * EIGEN_PI),
u3 = Eigen::internal::random<double>(0, 2 * EIGEN_PI);
const double u1 = Eigen::internal::random<double>(0, 1), u2 = Eigen::internal::random<double>(0, 2 * static_cast<double>(EIGEN_PI)),
u3 = Eigen::internal::random<double>(0, 2 * static_cast<double>(EIGEN_PI));
const double a = sqrt(1 - u1), b = sqrt(u1);
return quaternion_t(a * sin(u2), a * cos(u2), b * sin(u3), b * cos(u3)).normalized();
}
......
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