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
bf29a211
Commit
bf29a211
authored
8 years ago
by
Dinesh Atchuthan
Browse files
Options
Downloads
Patches
Plain Diff
frame creation -> proposed fix (to be checked)
parent
e9d1a6c2
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/frame_base.cpp
+6
-2
6 additions, 2 deletions
src/frame_base.cpp
src/problem.cpp
+7
-1
7 additions, 1 deletion
src/problem.cpp
with
13 additions
and
3 deletions
src/frame_base.cpp
+
6
−
2
View file @
bf29a211
...
@@ -131,12 +131,16 @@ void FrameBase::setState(const Eigen::VectorXs& _st)
...
@@ -131,12 +131,16 @@ void FrameBase::setState(const Eigen::VectorXs& _st)
size
+=
(
state_block_vec_
[
i
]
==
nullptr
?
0
:
state_block_vec_
[
i
]
->
getSize
());
size
+=
(
state_block_vec_
[
i
]
==
nullptr
?
0
:
state_block_vec_
[
i
]
->
getSize
());
}
}
assert
(
_st
.
size
()
==
size
&&
"In FrameBase::setState wrong state size"
);
//State Vector size must be lower or equal to frame state size :
// example : PQVBB -> if we initialize only position and orientation due to use of processorOdom3D
assert
(
_st
.
size
()
<=
size
&&
"In FrameBase::setState wrong state size"
);
unsigned
int
index
=
0
;
unsigned
int
index
=
0
;
const
unsigned
int
_st_size
=
_st
.
size
();
//initialize the FrameBase StateBlocks while StateBlocks list's end not reached and input state_size can go further
for
(
StateBlockPtr
sb
:
state_block_vec_
)
for
(
StateBlockPtr
sb
:
state_block_vec_
)
if
(
sb
)
if
(
sb
&&
(
index
<
_st_size
)
)
{
{
sb
->
setVector
(
_st
.
segment
(
index
,
sb
->
getSize
()));
sb
->
setVector
(
_st
.
segment
(
index
,
sb
->
getSize
()));
index
+=
sb
->
getSize
();
index
+=
sb
->
getSize
();
...
...
This diff is collapsed.
Click to expand it.
src/problem.cpp
+
7
−
1
View file @
bf29a211
...
@@ -563,7 +563,13 @@ void Problem::setOrigin(const Eigen::VectorXs& _origin_state, const Eigen::Matri
...
@@ -563,7 +563,13 @@ void Problem::setOrigin(const Eigen::VectorXs& _origin_state, const Eigen::Matri
// CaptureFixPtr init_capture = std::make_shared<CaptureFix>(_ts, nullptr, pose, pose_cov);
// CaptureFixPtr init_capture = std::make_shared<CaptureFix>(_ts, nullptr, pose, pose_cov);
// create origin capture with the given state as data
// create origin capture with the given state as data
CaptureFixPtr
init_capture
=
std
::
make_shared
<
CaptureFix
>
(
_ts
,
nullptr
,
_origin_state
,
_origin_state_cov
);
// Capture fix only takes 3D position and Quaternion orientation
CaptureFixPtr
init_capture
;
if
((
trajectory_ptr_
->
getFrameStructure
()
==
FRM_PQVBB_3D
)
||
(
trajectory_ptr_
->
getFrameStructure
()
==
FRM_POV_3D
)
)
init_capture
=
std
::
make_shared
<
CaptureFix
>
(
_ts
,
nullptr
,
_origin_state
.
head
(
7
),
_origin_state_cov
);
else
init_capture
=
std
::
make_shared
<
CaptureFix
>
(
_ts
,
nullptr
,
_origin_state
,
_origin_state_cov
);
origin_frame_ptr
->
addCapture
(
init_capture
);
origin_frame_ptr
->
addCapture
(
init_capture
);
// create feature and constraint
// create feature and constraint
...
...
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