Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
77a41d1a
Verified
Commit
77a41d1a
authored
6 years ago
by
Joseph Mirabel
Committed by
Justin Carpentier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add macro PINOCCHIO_STATIC_ASSERT(condition,message)
parent
1908db84
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/macros.hpp
+6
-0
6 additions, 0 deletions
src/macros.hpp
src/multibody/liegroup/liegroup-base.hxx
+2
-2
2 additions, 2 deletions
src/multibody/liegroup/liegroup-base.hxx
with
8 additions
and
2 deletions
src/macros.hpp
+
6
−
0
View file @
77a41d1a
...
...
@@ -50,6 +50,12 @@ namespace se3
THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE); \
assert(M.rows()==nrows && M.cols()==ncols);
/// Static assertion.
/// \param condition a boolean convertible expression
/// \param msg a valid C++ variable name.
#define PINOCCHIO_STATIC_ASSERT(condition,msg) \
{ int msg[(condition) ? 1 : -1];
/*avoid unused-variable warning*/
(void) msg; }
namespace
se3
{
namespace
helper
...
...
This diff is collapsed.
Click to expand it.
src/multibody/liegroup/liegroup-base.hxx
+
2
−
2
View file @
77a41d1a
...
...
@@ -55,6 +55,7 @@ namespace se3 {
const
Eigen
::
MatrixBase
<
Tangent_t
>
&
v
,
const
Eigen
::
MatrixBase
<
JacobianOut_t
>&
J
)
const
{
PINOCCHIO_STATIC_ASSERT
(
arg
==
darg0
||
arg
==
darg1
,
arg_SHOULD_BE_qarg0_OR_qarg1
);
switch
(
arg
)
{
case
darg0
:
dIntegrate_dq
(
q
,
v
,
J
);
return
;
...
...
@@ -187,8 +188,7 @@ namespace se3 {
EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE
(
ConfigL_t
,
ConfigVector_t
);
EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE
(
ConfigR_t
,
ConfigVector_t
);
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE
(
JacobianOut_t
,
JacobianMatrix_t
);
int
CHECK_THAT_iVar_IS_ZERO_OR_ONE
[(
iVar
==
0
||
iVar
==
1
)
?
1
:
-
1
];
(
void
)
CHECK_THAT_iVar_IS_ZERO_OR_ONE
;
PINOCCHIO_STATIC_ASSERT
(
arg
==
darg0
||
arg
==
darg1
,
arg_SHOULD_BE_qarg0_OR_qarg1
);
derived
().
template
dDifference_impl
<
arg
>
(
q0
,
q1
,
J
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment