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
4cdfd364
There was a problem fetching the pipeline metadata.
Commit
4cdfd364
authored
7 years ago
by
Jeremie Deray
Browse files
Options
Downloads
Patches
Plain Diff
ConstraintOdom3D fix ptr to tmp var
parent
c61cb097
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!138
Solver manager
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/constraint_odom_3D.h
+34
-20
34 additions, 20 deletions
src/constraint_odom_3D.h
with
34 additions
and
20 deletions
src/constraint_odom_3D.h
+
34
−
20
View file @
4cdfd364
...
@@ -111,18 +111,32 @@ inline bool ConstraintOdom3D::expectation(const T* const _p_current, const T* co
...
@@ -111,18 +111,32 @@ inline bool ConstraintOdom3D::expectation(const T* const _p_current, const T* co
Eigen
::
Map
<
Eigen
::
Matrix
<
T
,
3
,
1
>
>
expectation_dp
(
_expectation_dp
);
Eigen
::
Map
<
Eigen
::
Matrix
<
T
,
3
,
1
>
>
expectation_dp
(
_expectation_dp
);
Eigen
::
Map
<
Eigen
::
Quaternion
<
T
>
>
expectation_dq
(
_expectation_dq
);
Eigen
::
Map
<
Eigen
::
Quaternion
<
T
>
>
expectation_dq
(
_expectation_dq
);
// std::cout << "p_current: " << p_current(0) << " "
// std::cout << "p_current: " << p_current(0) << std::endl << p_current(1) << std::endl << p_current(2) << std::endl;
// << p_current(1) << " "
// std::cout << "q_current: " << q_current.x() << std::endl << q_current.y() << std::endl << q_current.z() << std::endl << q_current.w() << std::endl;
// << p_current(2) << "\n";
// std::cout << "p_past: " << p_past(0) << std::endl << p_past(1) << std::endl << p_past(2) << std::endl;
// std::cout << "q_current: " << q_current.coeffs()(0) << " "
// std::cout << "q_past: " << q_past.x() << std::endl << q_past.y() << std::endl << q_past.z() << std::endl << q_past.w() << std::endl;
// << q_current.coeffs()(1) << " "
// << q_current.coeffs()(2) << " "
// << q_current.coeffs()(3) << "\n";
// std::cout << "p_past: " << p_past(0) << " "
// << p_past(1) << " "
// << p_past(2) << "\n";
// std::cout << "q_past: " << q_past.coeffs()(0) << " "
// << q_past.coeffs()(1) << " "
// << q_past.coeffs()(2) << " "
// << q_past.coeffs()(3) << "\n";
// estimate motion increment, dp, dq;
// estimate motion increment, dp, dq;
expectation_dp
=
q_past
.
conjugate
()
*
(
p_current
-
p_past
);
expectation_dp
=
q_past
.
conjugate
()
*
(
p_current
-
p_past
);
expectation_dq
=
q_past
.
conjugate
()
*
q_current
;
expectation_dq
=
q_past
.
conjugate
()
*
q_current
;
// std::cout << "exp_p: " << expectation_dp(0) << std::endl << expectation_dp(1) << std::endl << expectation_dp(2) << std::endl;
// std::cout << "exp_p: " << expectation_dp(0) << " "
// std::cout << "exp_q: " << expectation(3) << std::endl << expectation(4) << std::endl << expectation(5) << std::endl << expectation(6) << std::endl;
// << expectation_dp(1) << " "
// << expectation_dp(2) << "\n";
// std::cout << "exp_q: " << expectation_dq.coeffs()(0) << " "
// << expectation_dq.coeffs()(1) << " "
// << expectation_dq.coeffs()(2) << " "
// << expectation_dq.coeffs()(3) << "\n";
return
true
;
return
true
;
}
}
...
@@ -132,18 +146,18 @@ inline Eigen::VectorXs ConstraintOdom3D::expectation() const
...
@@ -132,18 +146,18 @@ inline Eigen::VectorXs ConstraintOdom3D::expectation() const
Eigen
::
VectorXs
exp
(
7
);
Eigen
::
VectorXs
exp
(
7
);
FrameBasePtr
frm_current
=
getFeaturePtr
()
->
getFramePtr
();
FrameBasePtr
frm_current
=
getFeaturePtr
()
->
getFramePtr
();
FrameBasePtr
frm_past
=
getFrameOtherPtr
();
FrameBasePtr
frm_past
=
getFrameOtherPtr
();
const
Scalar
*
const
frame_current_pos
=
frm_current
->
getPPtr
()
->
getState
()
.
data
()
;
const
Eigen
::
VectorXs
frame_current_pos
=
frm_current
->
getPPtr
()
->
getState
();
const
Scalar
*
const
frame_current_ori
=
frm_current
->
getOPtr
()
->
getState
()
.
data
()
;
const
Eigen
::
VectorXs
frame_current_ori
=
frm_current
->
getOPtr
()
->
getState
();
const
Scalar
*
const
frame_past_pos
=
frm_past
->
getPPtr
()
->
getState
()
.
data
()
;
const
Eigen
::
VectorXs
frame_past_pos
=
frm_past
->
getPPtr
()
->
getState
();
const
Scalar
*
const
frame_past_ori
=
frm_past
->
getOPtr
()
->
getState
()
.
data
()
;
const
Eigen
::
VectorXs
frame_past_ori
=
frm_past
->
getOPtr
()
->
getState
();
// std::cout << "frame_current_pos: " << frm_current->getPPtr()->get
Vector
().transpose() << std::endl;
// std::cout << "frame_current_pos: " << frm_current->getPPtr()->get
State
().transpose() << std::endl;
// std::cout << "frame_past_pos: " << frm_past->getPPtr()->get
Vector
().transpose() << std::endl;
// std::cout << "frame_past_pos: " << frm_past->getPPtr()->get
State
().transpose() << std::endl;
expectation
(
frame_current_pos
,
expectation
(
frame_current_pos
.
data
()
,
frame_current_ori
,
frame_current_ori
.
data
()
,
frame_past_pos
,
frame_past_pos
.
data
()
,
frame_past_ori
,
frame_past_ori
.
data
()
,
exp
.
data
(),
exp
.
data
(),
exp
.
data
()
+
3
);
exp
.
data
()
+
3
);
return
exp
;
return
exp
;
...
...
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