Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
cac6b590
Commit
cac6b590
authored
Dec 09, 2021
by
Guilhem Saurel
Browse files
fix warnings
parent
8ff0fdb9
Pipeline
#17235
passed with stage
in 11 minutes and 22 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/multicontact-api/geometry/linear-cone.hpp
View file @
cac6b590
...
...
@@ -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"
);
...
...
include/multicontact-api/geometry/second-order-cone.hpp
View file @
cac6b590
...
...
@@ -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
);
}
...
...
unittest/scenario.cpp
View file @
cac6b590
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment