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
Stack Of Tasks
pinocchio
Commits
429dd038
Unverified
Commit
429dd038
authored
Apr 20, 2020
by
Justin Carpentier
Committed by
GitHub
Apr 20, 2020
Browse files
core: fix cast
parent
4f7332c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multibody/liegroup/special-orthogonal.hpp
View file @
429dd038
//
// Copyright (c) 2016-20
18
CNRS
// Copyright (c) 2016-20
20
CNRS
INRIA
//
#ifndef __pinocchio_special_orthogonal_operation_hpp__
...
...
@@ -81,7 +81,7 @@ namespace pinocchio
{
typedef
typename
Matrix2Like
::
Scalar
Scalar
;
EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE
(
Matrix2Like
,
2
,
2
);
return
(
Scalar
)
1
;
return
Scalar
(
1
);
}
/// Get dimension of Lie Group vector representation
...
...
@@ -172,22 +172,22 @@ namespace pinocchio
}
template
<
class
Config_t
,
class
Tangent_t
,
class
JacobianOut_t
>
static
void
dIntegrate_dq_impl
(
const
Eigen
::
MatrixBase
<
Config_t
>
&
/*q*/
,
const
Eigen
::
MatrixBase
<
Tangent_t
>
&
/*v*/
,
const
Eigen
::
MatrixBase
<
JacobianOut_t
>&
J
,
static
void
dIntegrate_dq_impl
(
const
Eigen
::
MatrixBase
<
Config_t
>
&
/*q*/
,
const
Eigen
::
MatrixBase
<
Tangent_t
>
&
/*v*/
,
const
Eigen
::
MatrixBase
<
JacobianOut_t
>
&
J
,
const
AssignmentOperatorType
op
)
{
JacobianOut_t
&
Jout
=
PINOCCHIO_EIGEN_CONST_CAST
(
JacobianOut_t
,
J
);
switch
(
op
)
{
case
SETTO
:
Jout
(
0
,
0
)
=
1
;
Jout
(
0
,
0
)
=
Scalar
(
1
)
;
break
;
case
ADDTO
:
Jout
(
0
,
0
)
+=
1
;
Jout
(
0
,
0
)
+=
Scalar
(
1
)
;
break
;
case
RMTO
:
Jout
(
0
,
0
)
-=
1
;
Jout
(
0
,
0
)
-=
Scalar
(
1
)
;
break
;
default:
assert
(
false
&&
"Wrong Op requesed value"
);
...
...
@@ -196,22 +196,22 @@ namespace pinocchio
}
template
<
class
Config_t
,
class
Tangent_t
,
class
JacobianOut_t
>
static
void
dIntegrate_dv_impl
(
const
Eigen
::
MatrixBase
<
Config_t
>
&
/*q*/
,
const
Eigen
::
MatrixBase
<
Tangent_t
>
&
/*v*/
,
const
Eigen
::
MatrixBase
<
JacobianOut_t
>&
J
,
static
void
dIntegrate_dv_impl
(
const
Eigen
::
MatrixBase
<
Config_t
>
&
/*q*/
,
const
Eigen
::
MatrixBase
<
Tangent_t
>
&
/*v*/
,
const
Eigen
::
MatrixBase
<
JacobianOut_t
>
&
J
,
const
AssignmentOperatorType
op
)
{
JacobianOut_t
&
Jout
=
PINOCCHIO_EIGEN_CONST_CAST
(
JacobianOut_t
,
J
);
switch
(
op
)
{
case
SETTO
:
Jout
(
0
,
0
)
=
1
;
Jout
(
0
,
0
)
=
Scalar
(
1
)
;
break
;
case
ADDTO
:
Jout
(
0
,
0
)
+=
1
;
Jout
(
0
,
0
)
+=
Scalar
(
1
)
;
break
;
case
RMTO
:
Jout
(
0
,
0
)
-=
1
;
Jout
(
0
,
0
)
-=
Scalar
(
1
)
;
break
;
default:
assert
(
false
&&
"Wrong Op requesed value"
);
...
...
@@ -484,8 +484,7 @@ namespace pinocchio
template
<
class
ConfigL_t
,
class
ConfigR_t
,
class
ConfigOut_t
>
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
)
const
{
random_impl
(
qout
);
}
...
...
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