Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
plugins
gnss
Commits
178067c7
Commit
178067c7
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
Addressing issue #158
parent
d68a2ad2
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/frame_base.cpp
+2
-7
2 additions, 7 deletions
src/frame_base.cpp
src/landmark/landmark_base.cpp
+2
-7
2 additions, 7 deletions
src/landmark/landmark_base.cpp
src/problem.cpp
+0
-6
0 additions, 6 deletions
src/problem.cpp
with
4 additions
and
20 deletions
src/frame_base.cpp
+
2
−
7
View file @
178067c7
...
@@ -177,11 +177,7 @@ void FrameBase::setState(const Eigen::VectorXs& _state)
...
@@ -177,11 +177,7 @@ void FrameBase::setState(const Eigen::VectorXs& _state)
Eigen
::
VectorXs
FrameBase
::
getState
()
const
Eigen
::
VectorXs
FrameBase
::
getState
()
const
{
{
SizeEigen
size
=
0
;
Eigen
::
VectorXs
state
;
for
(
StateBlockPtr
sb
:
state_block_vec_
)
if
(
sb
)
size
+=
sb
->
getSize
();
Eigen
::
VectorXs
state
(
size
);
getState
(
state
);
getState
(
state
);
...
@@ -195,10 +191,9 @@ void FrameBase::getState(Eigen::VectorXs& _state) const
...
@@ -195,10 +191,9 @@ void FrameBase::getState(Eigen::VectorXs& _state) const
if
(
sb
)
if
(
sb
)
size
+=
sb
->
getSize
();
size
+=
sb
->
getSize
();
assert
(
_state
.
size
()
==
size
&&
"Wrong state v
ector
size
"
);
_state
=
Eigen
::
V
ector
Xs
(
size
);
SizeEigen
index
=
0
;
SizeEigen
index
=
0
;
for
(
StateBlockPtr
sb
:
state_block_vec_
)
for
(
StateBlockPtr
sb
:
state_block_vec_
)
if
(
sb
)
if
(
sb
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/landmark/landmark_base.cpp
+
2
−
7
View file @
178067c7
...
@@ -122,11 +122,7 @@ void LandmarkBase::removeStateBlocks()
...
@@ -122,11 +122,7 @@ void LandmarkBase::removeStateBlocks()
Eigen
::
VectorXs
LandmarkBase
::
getState
()
const
Eigen
::
VectorXs
LandmarkBase
::
getState
()
const
{
{
SizeEigen
size
=
0
;
Eigen
::
VectorXs
state
;
for
(
StateBlockPtr
sb
:
state_block_vec_
)
if
(
sb
)
size
+=
sb
->
getSize
();
Eigen
::
VectorXs
state
(
size
);
getState
(
state
);
getState
(
state
);
...
@@ -140,10 +136,9 @@ void LandmarkBase::getState(Eigen::VectorXs& _state) const
...
@@ -140,10 +136,9 @@ void LandmarkBase::getState(Eigen::VectorXs& _state) const
if
(
sb
)
if
(
sb
)
size
+=
sb
->
getSize
();
size
+=
sb
->
getSize
();
assert
(
_state
.
size
()
==
size
&&
"Wrong state v
ector
size
"
);
_state
=
Eigen
::
V
ector
Xs
(
size
);
SizeEigen
index
=
0
;
SizeEigen
index
=
0
;
for
(
StateBlockPtr
sb
:
state_block_vec_
)
for
(
StateBlockPtr
sb
:
state_block_vec_
)
if
(
sb
)
if
(
sb
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/problem.cpp
+
0
−
6
View file @
178067c7
...
@@ -249,8 +249,6 @@ Eigen::VectorXs Problem::getCurrentState()
...
@@ -249,8 +249,6 @@ Eigen::VectorXs Problem::getCurrentState()
void
Problem
::
getCurrentState
(
Eigen
::
VectorXs
&
state
)
void
Problem
::
getCurrentState
(
Eigen
::
VectorXs
&
state
)
{
{
assert
(
state
.
size
()
==
getFrameStructureSize
()
&&
"Problem::getCurrentState: bad state size"
);
if
(
processor_motion_ptr_
!=
nullptr
)
if
(
processor_motion_ptr_
!=
nullptr
)
processor_motion_ptr_
->
getCurrentState
(
state
);
processor_motion_ptr_
->
getCurrentState
(
state
);
else
if
(
trajectory_ptr_
->
getLastKeyFrame
()
!=
nullptr
)
else
if
(
trajectory_ptr_
->
getLastKeyFrame
()
!=
nullptr
)
...
@@ -261,8 +259,6 @@ void Problem::getCurrentState(Eigen::VectorXs& state)
...
@@ -261,8 +259,6 @@ void Problem::getCurrentState(Eigen::VectorXs& state)
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
state
,
TimeStamp
&
ts
)
void
Problem
::
getCurrentStateAndStamp
(
Eigen
::
VectorXs
&
state
,
TimeStamp
&
ts
)
{
{
assert
(
state
.
size
()
==
getFrameStructureSize
()
&&
"Problem::getCurrentState: bad state size"
);
if
(
processor_motion_ptr_
!=
nullptr
)
if
(
processor_motion_ptr_
!=
nullptr
)
{
{
processor_motion_ptr_
->
getCurrentState
(
state
);
processor_motion_ptr_
->
getCurrentState
(
state
);
...
@@ -279,8 +275,6 @@ void Problem::getCurrentStateAndStamp(Eigen::VectorXs& state, TimeStamp& ts)
...
@@ -279,8 +275,6 @@ void Problem::getCurrentStateAndStamp(Eigen::VectorXs& state, TimeStamp& ts)
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
state
)
void
Problem
::
getState
(
const
TimeStamp
&
_ts
,
Eigen
::
VectorXs
&
state
)
{
{
assert
(
state
.
size
()
==
getFrameStructureSize
()
&&
"Problem::getStateAtTimeStamp: bad state size"
);
// try to get the state from processor_motion if any, otherwise...
// try to get the state from processor_motion if any, otherwise...
if
(
processor_motion_ptr_
==
nullptr
||
!
processor_motion_ptr_
->
getState
(
_ts
,
state
))
if
(
processor_motion_ptr_
==
nullptr
||
!
processor_motion_ptr_
->
getState
(
_ts
,
state
))
{
{
...
...
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