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
347c8ba5
Commit
347c8ba5
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
[WIP] defining expectation()
parent
72a63c3b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/constraint_imu.h
+50
-0
50 additions, 0 deletions
src/constraint_imu.h
with
50 additions
and
0 deletions
src/constraint_imu.h
+
50
−
0
View file @
347c8ba5
...
@@ -45,6 +45,32 @@ class ConstraintIMU : public ConstraintSparse<9, 3, 4, 3, 3, 3, 3, 4, 3>
...
@@ -45,6 +45,32 @@ class ConstraintIMU : public ConstraintSparse<9, 3, 4, 3, 3, 3, 3, 4, 3>
const
T
*
const
_p2
,
const
T
*
const
_q2
,
const
T
*
const
_v2
,
//const T* const _lmk_hmg,
const
T
*
const
_p2
,
const
T
*
const
_q2
,
const
T
*
const
_v2
,
//const T* const _lmk_hmg,
T
*
_expectation
)
const
;
T
*
_expectation
)
const
;
Eigen
::
VectorXs
expectation
()
const
{
Eigen
::
VectorXs
exp
(
10
);
FrameBasePtr
frm_current
=
getFeaturePtr
()
->
getCapturePtr
()
->
getFramePtr
();
FrameBasePtr
frm_imu
=
getFrameOtherPtr
();
const
Scalar
*
const
frame_imu_pos
=
frm_imu
->
getPPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_imu_ori
=
frm_imu
->
getOPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_imu_vel
=
frm_imu
->
getVPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_imu_ab
=
frm_current
->
getAccBiasPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_imu_wb
=
frm_current
->
getGyroBiasPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_current_pos
=
frm_current
->
getPPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_current_ori
=
frm_current
->
getOPtr
()
->
getVector
().
data
();
const
Scalar
*
const
frame_current_vel
=
frm_current
->
getVPtr
()
->
getVector
().
data
();
//const Scalar * const lmk_pos_hmg = lmk->getPPtr()->getVector().data();
expectation
(
frame_imu_pos
,
frame_imu_ori
,
frame_imu_vel
,
frame_imu_ab
,
frame_imu_wb
,
frame_current_pos
,
frame_current_ori
,
frame_current_vel
,
exp
.
data
());
std
::
cout
<<
frame_current_pos
<<
std
::
endl
;
std
::
cout
<<
frame_current_ori
<<
std
::
endl
;
std
::
cout
<<
frame_current_vel
<<
std
::
endl
;
std
::
cout
<<
frame_imu_pos
<<
std
::
endl
;
std
::
cout
<<
frame_imu_ori
<<
std
::
endl
;
std
::
cout
<<
frame_imu_vel
<<
std
::
endl
;
return
exp
;
}
public
:
public
:
static
wolf
::
ConstraintBasePtr
create
(
FeatureIMUPtr
_feature_ptr
,
NodeBasePtr
_correspondant_ptr
);
static
wolf
::
ConstraintBasePtr
create
(
FeatureIMUPtr
_feature_ptr
,
NodeBasePtr
_correspondant_ptr
);
...
@@ -173,6 +199,30 @@ inline void ConstraintIMU::expectation(const T* const _p1, const T* const _q1, c
...
@@ -173,6 +199,30 @@ inline void ConstraintIMU::expectation(const T* const _p1, const T* const _q1, c
expectation
.
tail
(
3
)
=
dv_predict
;
expectation
.
tail
(
3
)
=
dv_predict
;
}
}
/*Eigen::VectorXs ConstraintIMU::expectation(void) const
{
Eigen::VectorXs exp(10);
FrameBasePtr frm_current = getFeaturePtr()->getCapturePtr()->getFramePtr();
FrameBasePtr frm_imu = getFrameOtherPtr();
//LandmarkBasePtr lmk = getLandmarkOtherPtr();
const Scalar * const frame_current_pos = frm_current->getPPtr()->getVector().data();
const Scalar * const frame_current_ori = frm_current->getOPtr()->getVector().data();
const Scalar * const frame_current_vel = frm_current->getVPtr()->getVector().data();
const Scalar * const frame_imu_pos = frm_imu->getPPtr()->getVector().data();
const Scalar * const frame_imu_ori = frm_imu->getOPtr()->getVector().data();
const Scalar * const frame_imu_vel = frm_imu->getVPtr()->getVector().data();
//const Scalar * const lmk_pos_hmg = lmk->getPPtr()->getVector().data();
//expectation(frame_current_pos, frame_current_ori, frame_current_vel,
// frame_imu_pos, frame_imu_ori, frame_imu_vel, exp.data());
std::cout << frame_current_pos << std::endl;
std::cout << frame_current_ori << std::endl;
std::cout << frame_current_vel << std::endl;
std::cout << frame_imu_pos << std::endl;
std::cout << frame_imu_ori << std::endl;
std::cout << frame_imu_vel << std::endl;
return exp;
}*/
inline
JacobianMethod
ConstraintIMU
::
getJacobianMethod
()
const
inline
JacobianMethod
ConstraintIMU
::
getJacobianMethod
()
const
{
{
return
JAC_AUTO
;
return
JAC_AUTO
;
...
...
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