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
ac86bd1e
Commit
ac86bd1e
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Make priorIsSet()
parent
a9054f42
No related branches found
No related tags found
1 merge request
!157
Kfpackmanager
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/problem.cpp
+5
-5
5 additions, 5 deletions
src/problem.cpp
src/problem.h
+5
-1
5 additions, 1 deletion
src/problem.h
with
10 additions
and
6 deletions
src/problem.cpp
+
5
−
5
View file @
ac86bd1e
...
...
@@ -31,7 +31,7 @@ Problem::Problem(const std::string& _frame_structure) :
trajectory_ptr_
(
std
::
make_shared
<
TrajectoryBase
>
(
_frame_structure
)),
map_ptr_
(
std
::
make_shared
<
MapBase
>
()),
processor_motion_ptr_
(),
o
ri
gin
_is_set_
(
false
),
p
ri
or
_is_set_
(
false
),
state_size_
(
0
),
state_cov_size_
(
0
)
{
...
...
@@ -121,7 +121,7 @@ ProcessorBasePtr Problem::installProcessor(const std::string& _prc_type, //
_corresponding_sensor_ptr
->
addProcessor
(
prc_ptr
);
// setting the origin in all processor motion if origin already setted
if
(
prc_ptr
->
isMotion
()
&&
o
ri
gin
_is_set_
)
if
(
prc_ptr
->
isMotion
()
&&
p
ri
or
_is_set_
)
(
std
::
static_pointer_cast
<
ProcessorMotion
>
(
prc_ptr
))
->
setOrigin
(
getLastKeyFramePtr
());
// setting the main processor motion
...
...
@@ -334,7 +334,7 @@ void Problem::keyFrameCallback(FrameBasePtr _keyframe_ptr, ProcessorBasePtr _pro
for
(
auto
sensor
:
hardware_ptr_
->
getSensorList
())
for
(
auto
processor
:
sensor
->
getProcessorList
())
if
(
processor
&&
(
processor
!=
_processor_ptr
)
)
processor
->
keyFrameCallback
New
(
_keyframe_ptr
,
_time_tolerance
);
processor
->
keyFrameCallback
(
_keyframe_ptr
,
_time_tolerance
);
}
LandmarkBasePtr
Problem
::
addLandmark
(
LandmarkBasePtr
_lmk_ptr
)
...
...
@@ -630,7 +630,7 @@ StateBlockList& Problem::getStateBlockList()
FrameBasePtr
Problem
::
setPrior
(
const
Eigen
::
VectorXs
&
_prior_state
,
const
Eigen
::
MatrixXs
&
_prior_cov
,
const
TimeStamp
&
_ts
,
const
Scalar
_time_tolerance
)
{
if
(
!
origin
_is_set_
)
if
(
!
prior
_is_set_
)
{
// Create origin frame
FrameBasePtr
origin_frame_ptr
=
emplaceFrame
(
KEY_FRAME
,
_prior_state
,
_ts
);
...
...
@@ -654,7 +654,7 @@ FrameBasePtr Problem::setPrior(const Eigen::VectorXs& _prior_state, const Eigen:
if
(
processor_ptr
->
isMotion
())
(
std
::
static_pointer_cast
<
ProcessorMotion
>
(
processor_ptr
))
->
setOrigin
(
origin_frame_ptr
);
o
ri
gin
_is_set_
=
true
;
p
ri
or
_is_set_
=
true
;
keyFrameCallback
(
origin_frame_ptr
,
nullptr
,
_time_tolerance
);
...
...
This diff is collapsed.
Click to expand it.
src/problem.h
+
5
−
1
View file @
ac86bd1e
...
...
@@ -54,7 +54,7 @@ class Problem : public std::enable_shared_from_this<Problem>
std
::
map
<
std
::
pair
<
StateBlockPtr
,
StateBlockPtr
>
,
Eigen
::
MatrixXs
>
covariances_
;
std
::
list
<
StateBlockNotification
>
state_block_notification_list_
;
std
::
list
<
ConstraintNotification
>
constraint_notification_list_
;
bool
o
ri
gin
_is_set_
;
bool
p
ri
or
_is_set_
;
Size
state_size_
,
state_cov_size_
;
private:
// CAUTION: THESE METHODS ARE PRIVATE, DO NOT MAKE THEM PUBLIC !!
...
...
@@ -312,6 +312,10 @@ class Problem : public std::enable_shared_from_this<Problem>
bool
state_blocks
=
false
);
bool
check
(
int
verbose_level
=
0
);
bool
priorIsSet
()
const
{
return
prior_is_set_
;
}
};
}
// namespace wolf
...
...
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