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
fb45e53c
Commit
fb45e53c
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
cleaning...
parent
4d6c8cba
No related branches found
Branches containing commit
Tags
v29
v31
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/constraint_imu.h
+10
-26
10 additions, 26 deletions
src/constraint_imu.h
with
10 additions
and
26 deletions
src/constraint_imu.h
+
10
−
26
View file @
fb45e53c
...
...
@@ -21,6 +21,11 @@ class ConstraintIMU : public ConstraintSparse<9, 3, 4, 3, 3, 3, 3, 4, 3>
virtual
~
ConstraintIMU
();
/* \brief : compute the residual from the state blocks being iterated by the solver.
-> computes the expected measurement
-> compares the actual measurement with the expected one
-> weights the result with the covariance of the noise (residual = sqrt_info_matrix * err;)
*/
template
<
typename
T
>
bool
operator
()(
const
T
*
const
_p1
,
const
T
*
const
_o1
,
const
T
*
const
_v1
,
const
T
*
const
_b_a1
,
const
T
*
_b_g1
,
const
T
*
const
_p2
,
const
T
*
const
_o2
,
const
T
*
const
_v2
,
...
...
@@ -44,6 +49,10 @@ class ConstraintIMU : public ConstraintSparse<9, 3, 4, 3, 3, 3, 3, 4, 3>
void
expectation
(
const
Eigen
::
MatrixBase
<
D1
>
&
_p1
,
const
Eigen
::
QuaternionBase
<
D1
>
&
_q1
,
const
Eigen
::
MatrixBase
<
D1
>
&
_v1
,
const
Eigen
::
MatrixBase
<
D1
>
&
_ab
,
const
Eigen
::
MatrixBase
<
D1
>
&
_wb
,
const
Eigen
::
MatrixBase
<
D1
>
&
_p2
,
const
Eigen
::
MatrixBase
<
D1
>
&
_q2
,
const
Eigen
::
MatrixBase
<
D1
>
&
_v2
,
const
Eigen
::
Matrix
<
D1
,
10
,
1
>
&
_result
)
const
;
/* \brief : return the expected value given the state blocks in the wolf tree
current frame data is taken from constraintIMU object.
IMU frame is taken from wolf tree
*/
Eigen
::
VectorXs
expectation
()
const
{
Eigen
::
Matrix
<
wolf
::
Scalar
,
10
,
1
>
exp
;
...
...
@@ -60,8 +69,7 @@ class ConstraintIMU : public ConstraintSparse<9, 3, 4, 3, 3, 3, 3, 4, 3>
const
Eigen
::
VectorXs
frame_imu_ori
=
(
frm_imu
->
getOPtr
()
->
getVector
());
const
Eigen
::
VectorXs
frame_imu_vel
=
(
frm_imu
->
getVPtr
()
->
getVector
());
//expectation(frame_current_pos, frame_current_ori, frame_current_vel, frame_current_ab, frame_current_wb,
// frame_imu_pos, frame_imu_ori, frame_imu_vel, exp);
expectation
(
frame_current_pos
,
frame_current_ori
,
frame_current_vel
,
frame_current_ab
,
frame_current_wb
,
frame_imu_pos
,
frame_imu_ori
,
frame_imu_vel
,
exp
);
std
::
cout
<<
frame_current_pos
<<
std
::
endl
;
std
::
cout
<<
frame_current_ori
.
w
()
<<
std
::
endl
;
std
::
cout
<<
frame_current_vel
<<
std
::
endl
;
...
...
@@ -202,30 +210,6 @@ inline void ConstraintIMU::expectation(const Eigen::MatrixBase<D1> & _p1, const
const_cast
<
Eigen
::
MatrixBase
<
D1
>
>
(
_result
).
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
{
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