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
a66c65f4
Commit
a66c65f4
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add setCalibration() and setCalibrationPreint()
parent
8162955b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/capture_motion.cpp
+16
-0
16 additions, 0 deletions
src/capture_motion.cpp
src/capture_motion.h
+7
-0
7 additions, 0 deletions
src/capture_motion.h
with
23 additions
and
0 deletions
src/capture_motion.cpp
+
16
−
0
View file @
a66c65f4
...
@@ -53,6 +53,22 @@ VectorXs CaptureMotion::getCalibration() const
...
@@ -53,6 +53,22 @@ VectorXs CaptureMotion::getCalibration() const
return
calib
;
return
calib
;
}
}
void
CaptureMotion
::
setCalibration
(
const
VectorXs
&
_calib
)
{
assert
(
_calib
.
size
()
==
calib_size_
&&
"Wrong size of calibration vector"
);
Size
index
=
0
;
for
(
Size
i
=
0
;
i
<
getStateBlockVec
().
size
();
i
++
)
{
auto
sb
=
getStateBlockPtr
(
i
);
if
(
sb
&&
!
sb
->
isFixed
())
{
sb
->
setState
(
_calib
.
segment
(
index
,
sb
->
getSize
()));
index
+=
sb
->
getSize
();
}
}
}
Eigen
::
VectorXs
CaptureMotion
::
getDelta
()
Eigen
::
VectorXs
CaptureMotion
::
getDelta
()
{
{
VectorXs
calib_preint
=
getCalibrationPreint
();
VectorXs
calib_preint
=
getCalibrationPreint
();
...
...
This diff is collapsed.
Click to expand it.
src/capture_motion.h
+
7
−
0
View file @
a66c65f4
...
@@ -73,7 +73,9 @@ class CaptureMotion : public CaptureBase
...
@@ -73,7 +73,9 @@ class CaptureMotion : public CaptureBase
// Buffer's initial conditions for pre-integration
// Buffer's initial conditions for pre-integration
VectorXs
getCalibrationPreint
()
const
;
VectorXs
getCalibrationPreint
()
const
;
void
setCalibrationPreint
(
const
VectorXs
&
_calib_preint
);
virtual
VectorXs
getCalibration
()
const
;
virtual
VectorXs
getCalibration
()
const
;
void
setCalibration
(
const
VectorXs
&
_calib
);
MatrixXs
getJacobianCalib
();
MatrixXs
getJacobianCalib
();
MatrixXs
getJacobianCalib
(
const
TimeStamp
&
_ts
);
MatrixXs
getJacobianCalib
(
const
TimeStamp
&
_ts
);
...
@@ -174,6 +176,11 @@ inline VectorXs CaptureMotion::getCalibrationPreint() const
...
@@ -174,6 +176,11 @@ inline VectorXs CaptureMotion::getCalibrationPreint() const
return
getBuffer
().
getCalibrationPreint
();
return
getBuffer
().
getCalibrationPreint
();
}
}
inline
void
CaptureMotion
::
setCalibrationPreint
(
const
VectorXs
&
_calib_preint
)
{
getBuffer
().
setCalibrationPreint
(
_calib_preint
);
}
}
// namespace wolf
}
// namespace wolf
#endif
/* SRC_CAPTURE_MOTION_H_ */
#endif
/* SRC_CAPTURE_MOTION_H_ */
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