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
f2c2e3bd
Commit
f2c2e3bd
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add getters and rename
parent
ec0261b6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/capture_motion.cpp
+2
-2
2 additions, 2 deletions
src/capture_motion.cpp
src/capture_motion.h
+27
-3
27 additions, 3 deletions
src/capture_motion.h
src/processor_motion.h
+2
-2
2 additions, 2 deletions
src/processor_motion.h
with
31 additions
and
7 deletions
src/capture_motion.cpp
+
2
−
2
View file @
f2c2e3bd
...
@@ -38,7 +38,7 @@ CaptureMotion::~CaptureMotion()
...
@@ -38,7 +38,7 @@ CaptureMotion::~CaptureMotion()
}
}
Eigen
::
VectorXs
CaptureMotion
::
getDelta
(
const
VectorXs
&
_calib_current
)
Eigen
::
VectorXs
CaptureMotion
::
getDelta
Corrected
(
const
VectorXs
&
_calib_current
)
{
{
VectorXs
calib_preint
=
getCalibrationPreint
();
VectorXs
calib_preint
=
getCalibrationPreint
();
VectorXs
delta_preint
=
getBuffer
().
get
().
back
().
delta_integr_
;
VectorXs
delta_preint
=
getBuffer
().
get
().
back
().
delta_integr_
;
...
@@ -48,7 +48,7 @@ Eigen::VectorXs CaptureMotion::getDelta(const VectorXs& _calib_current)
...
@@ -48,7 +48,7 @@ Eigen::VectorXs CaptureMotion::getDelta(const VectorXs& _calib_current)
return
delta
;
return
delta
;
}
}
Eigen
::
VectorXs
CaptureMotion
::
getDelta
(
const
VectorXs
&
_calib_current
,
const
TimeStamp
&
_ts
)
Eigen
::
VectorXs
CaptureMotion
::
getDelta
Corrected
(
const
VectorXs
&
_calib_current
,
const
TimeStamp
&
_ts
)
{
{
VectorXs
calib_preint
=
getCalibrationPreint
();
VectorXs
calib_preint
=
getCalibrationPreint
();
VectorXs
delta_preint
=
getBuffer
().
getMotion
(
_ts
).
delta_integr_
;
VectorXs
delta_preint
=
getBuffer
().
getMotion
(
_ts
).
delta_integr_
;
...
...
This diff is collapsed.
Click to expand it.
src/capture_motion.h
+
27
−
3
View file @
f2c2e3bd
...
@@ -79,9 +79,13 @@ class CaptureMotion : public CaptureBase
...
@@ -79,9 +79,13 @@ class CaptureMotion : public CaptureBase
MatrixXs
getJacobianCalib
();
MatrixXs
getJacobianCalib
();
MatrixXs
getJacobianCalib
(
const
TimeStamp
&
_ts
);
MatrixXs
getJacobianCalib
(
const
TimeStamp
&
_ts
);
// Get delta, corrected for changes on calibration params
// Get delta preintegrated, and corrected for changes on calibration params
VectorXs
getDelta
(
const
VectorXs
&
_calib_current
);
VectorXs
getDeltaCorrected
(
const
VectorXs
&
_calib_current
);
VectorXs
getDelta
(
const
VectorXs
&
_calib_current
,
const
TimeStamp
&
_ts
);
VectorXs
getDeltaCorrected
(
const
VectorXs
&
_calib_current
,
const
TimeStamp
&
_ts
);
VectorXs
getDeltaPreint
();
VectorXs
getDeltaPreint
(
const
TimeStamp
&
_ts
);
MatrixXs
getDeltaPreintCov
();
MatrixXs
getDeltaPreintCov
(
const
TimeStamp
&
_ts
);
virtual
VectorXs
correctDelta
(
const
VectorXs
&
_delta
,
const
VectorXs
&
_delta_error
);
virtual
VectorXs
correctDelta
(
const
VectorXs
&
_delta
,
const
VectorXs
&
_delta_error
);
// Origin frame
// Origin frame
...
@@ -180,6 +184,26 @@ inline void CaptureMotion::setCalibrationPreint(const VectorXs& _calib_preint)
...
@@ -180,6 +184,26 @@ inline void CaptureMotion::setCalibrationPreint(const VectorXs& _calib_preint)
getBuffer
().
setCalibrationPreint
(
_calib_preint
);
getBuffer
().
setCalibrationPreint
(
_calib_preint
);
}
}
inline
VectorXs
CaptureMotion
::
getDeltaPreint
()
{
return
getBuffer
().
get
().
back
().
delta_integr_
;
}
inline
VectorXs
CaptureMotion
::
getDeltaPreint
(
const
TimeStamp
&
_ts
)
{
return
getBuffer
().
getMotion
(
_ts
).
delta_integr_
;
}
inline
MatrixXs
CaptureMotion
::
getDeltaPreintCov
()
{
return
getBuffer
().
get
().
back
().
delta_integr_cov_
;
}
inline
MatrixXs
CaptureMotion
::
getDeltaPreintCov
(
const
TimeStamp
&
_ts
)
{
return
getBuffer
().
getMotion
(
_ts
).
delta_integr_cov_
;
}
}
// namespace wolf
}
// namespace wolf
#endif
/* SRC_CAPTURE_MOTION_H_ */
#endif
/* SRC_CAPTURE_MOTION_H_ */
This diff is collapsed.
Click to expand it.
src/processor_motion.h
+
2
−
2
View file @
f2c2e3bd
...
@@ -478,7 +478,7 @@ inline void ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXs& _x)
...
@@ -478,7 +478,7 @@ inline void ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXs& _x)
{
{
// We found a CaptureMotion whose buffer contains the time stamp
// We found a CaptureMotion whose buffer contains the time stamp
VectorXs
state_0
=
capture_motion
->
getOriginFramePtr
()
->
getState
();
VectorXs
state_0
=
capture_motion
->
getOriginFramePtr
()
->
getState
();
VectorXs
delta
=
capture_motion
->
getDelta
(
origin_ptr_
->
getCalibration
(),
_ts
);
VectorXs
delta
=
capture_motion
->
getDelta
Corrected
(
origin_ptr_
->
getCalibration
(),
_ts
);
Scalar
dt
=
_ts
-
capture_motion
->
getBuffer
().
get
().
front
().
ts_
;
Scalar
dt
=
_ts
-
capture_motion
->
getBuffer
().
get
().
front
().
ts_
;
statePlusDelta
(
state_0
,
delta
,
dt
,
_x
);
statePlusDelta
(
state_0
,
delta
,
dt
,
_x
);
...
@@ -502,7 +502,7 @@ inline Eigen::VectorXs ProcessorMotion::getCurrentState()
...
@@ -502,7 +502,7 @@ inline Eigen::VectorXs ProcessorMotion::getCurrentState()
inline
void
ProcessorMotion
::
getCurrentState
(
Eigen
::
VectorXs
&
_x
)
inline
void
ProcessorMotion
::
getCurrentState
(
Eigen
::
VectorXs
&
_x
)
{
{
Scalar
Dt
=
getCurrentTimeStamp
()
-
origin_ptr_
->
getTimeStamp
();
Scalar
Dt
=
getCurrentTimeStamp
()
-
origin_ptr_
->
getTimeStamp
();
statePlusDelta
(
origin_ptr_
->
getFramePtr
()
->
getState
(),
last_ptr_
->
getDelta
(
origin_ptr_
->
getCalibration
()),
Dt
,
_x
);
statePlusDelta
(
origin_ptr_
->
getFramePtr
()
->
getState
(),
last_ptr_
->
getDelta
Corrected
(
origin_ptr_
->
getCalibration
()),
Dt
,
_x
);
}
}
inline
void
ProcessorMotion
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
_x
,
TimeStamp
&
_ts
)
inline
void
ProcessorMotion
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
_x
,
TimeStamp
&
_ts
)
...
...
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