Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
9f9abdaf
There was a problem fetching the pipeline mini graph.
Commit
9f9abdaf
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add some size checks and the like
parent
84090bba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!203
Add some size checks and the like in three_D_tools.h
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/three_D_tools.h
+11
-3
11 additions, 3 deletions
src/three_D_tools.h
with
11 additions
and
3 deletions
src/three_D_tools.h
+
11
−
3
View file @
9f9abdaf
...
...
@@ -43,6 +43,7 @@ using namespace Eigen;
template
<
typename
D1
,
typename
D2
>
inline
void
identity
(
MatrixBase
<
D1
>&
p
,
QuaternionBase
<
D2
>&
q
)
{
MatrixSizeCheck
<
3
,
1
>::
check
(
p
);
p
=
MatrixBase
<
D1
>::
Zero
(
3
,
1
);
q
=
QuaternionBase
<
D2
>::
Identity
();
}
...
...
@@ -50,6 +51,8 @@ inline void identity(MatrixBase<D1>& p, QuaternionBase<D2>& q)
template
<
typename
D1
,
typename
D2
>
inline
void
identity
(
MatrixBase
<
D1
>&
p
,
MatrixBase
<
D2
>&
q
)
{
MatrixSizeCheck
<
3
,
1
>::
check
(
p
);
MatrixSizeCheck
<
4
,
1
>::
check
(
q
);
typedef
typename
D1
::
Scalar
T1
;
typedef
typename
D2
::
Scalar
T2
;
p
<<
T1
(
0
),
T1
(
0
),
T1
(
0
);
...
...
@@ -134,7 +137,7 @@ inline void compose(const MatrixBase<D1>& d1,
template
<
typename
D1
,
typename
D2
>
inline
Matrix
<
typename
D1
::
Scalar
,
7
,
1
>
compose
(
const
MatrixBase
<
D1
>&
d1
,
const
MatrixBase
<
D2
>&
d2
)
const
MatrixBase
<
D2
>&
d2
)
{
Matrix
<
typename
D1
::
Scalar
,
7
,
1
>
ret
;
compose
(
d1
,
d2
,
ret
);
...
...
@@ -209,6 +212,8 @@ template<typename D1, typename D2>
inline
Matrix
<
typename
D1
::
Scalar
,
7
,
1
>
between
(
const
MatrixBase
<
D1
>&
d1
,
const
MatrixBase
<
D2
>&
d2
)
{
MatrixSizeCheck
<
7
,
1
>::
check
(
d1
);
MatrixSizeCheck
<
7
,
1
>::
check
(
d2
);
Matrix
<
typename
D1
::
Scalar
,
7
,
1
>
d12
;
between
(
d1
,
d2
,
d12
);
return
d12
;
...
...
@@ -255,8 +260,11 @@ inline void plus(const MatrixBase<D1>& dp1, const QuaternionBase<D2>& dq1,
const
MatrixBase
<
D4
>&
dp2
,
const
MatrixBase
<
D5
>&
do2
,
MatrixBase
<
D7
>&
plus_p
,
QuaternionBase
<
D8
>&
plus_q
)
{
plus_p
=
dp1
+
dp2
;
plus_q
=
dq1
*
exp_q
(
do2
);
MatrixSizeCheck
<
3
,
1
>::
check
(
dp1
);
MatrixSizeCheck
<
3
,
1
>::
check
(
dp2
);
MatrixSizeCheck
<
3
,
1
>::
check
(
plus_p
);
plus_p
=
dp1
+
dp2
;
plus_q
=
dq1
*
exp_q
(
do2
);
}
template
<
typename
D1
,
typename
D2
,
typename
D3
>
...
...
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