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
946d46d4
Commit
946d46d4
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
07c28cb5
No related branches found
No related tags found
1 merge request
!366
Resolve "Complete state vector new data structure?"
Pipeline
#5438
passed
5 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/problem/problem.h
+29
-10
29 additions, 10 deletions
include/core/problem/problem.h
src/problem/problem.cpp
+0
-15
0 additions, 15 deletions
src/problem/problem.cpp
with
29 additions
and
25 deletions
include/core/problem/problem.h
+
29
−
10
View file @
946d46d4
...
...
@@ -79,17 +79,29 @@ class Problem : public std::enable_shared_from_this<Problem>
static
ProblemPtr
autoSetup
(
ParamsServer
&
_server
);
virtual
~
Problem
();
// Properties -----------------------------------------
public:
SizeEigen
getFrameStructureSize
()
const
;
void
getFrameStructureSize
(
SizeEigen
&
_x_size
,
SizeEigen
&
_cov_size
)
const
;
SizeEigen
getDim
()
const
;
StateStructure
getFrameStructure
()
const
;
protected:
void
appendToStructure
(
const
StateStructure
&
_structure
);
// Tree manager --------------------------------------
public:
void
setTreeManager
(
TreeManagerBasePtr
_gm
);
TreeManagerBasePtr
getTreeManager
()
const
;
// Hardware branch ------------------------------------
HardwareBasePtr
getHardware
()
const
;
...
...
@@ -172,6 +184,9 @@ class Problem : public std::enable_shared_from_this<Problem>
IsMotionPtr
getProcessorIsMotion
();
std
::
list
<
IsMotionPtr
>
getProcessorIsMotionList
();
// Trajectory branch ----------------------------------
TrajectoryBasePtr
getTrajectory
()
const
;
...
...
@@ -312,14 +327,14 @@ class Problem : public std::enable_shared_from_this<Problem>
// State getters
TimeStamp
getTimeStamp
(
)
const
;
VectorComposite
getState
(
const
StateStructure
&
_structure
=
""
)
const
;
VectorComposite
getState
(
const
TimeStamp
&
_ts
,
const
StateStructure
&
_structure
=
""
)
const
;
VectorComposite
stateZero
(
const
StateStructure
&
_structure
=
""
)
const
;
VectorComposite
getState
(
const
TimeStamp
&
_ts
,
const
StateStructure
&
_structure
=
""
)
const
;
// Zero state provider
Eigen
::
VectorXd
zeroState
(
)
const
;
VectorComposite
stateZero
(
const
StateStructure
&
_structure
=
""
)
const
;
Eigen
::
VectorXd
zeroState
(
)
const
;
// todo deprecated
// Perturb state
void
perturb
(
double
amplitude
=
0.01
);
// Map branch -----------------------------------------
MapBasePtr
getMap
()
const
;
...
...
@@ -327,7 +342,13 @@ class Problem : public std::enable_shared_from_this<Problem>
void
saveMap
(
const
std
::
string
&
_filename_dot_yaml
,
//
const
std
::
string
&
_map_name
=
"Map automatically saved by Wolf"
);
// Covariances -------------------------------------------
// All branches -------------------------------------------
// perturb states
void
perturb
(
double
amplitude
=
0.01
);
// Covariances
void
clearCovariance
();
void
addCovarianceBlock
(
StateBlockPtr
_state1
,
StateBlockPtr
_state2
,
const
Eigen
::
MatrixXd
&
_cov
);
void
addCovarianceBlock
(
StateBlockPtr
_state1
,
const
Eigen
::
MatrixXd
&
_cov
);
...
...
@@ -339,6 +360,8 @@ class Problem : public std::enable_shared_from_this<Problem>
bool
getLastKeyOrAuxFrameCovariance
(
Eigen
::
MatrixXd
&
_covariance
)
const
;
bool
getLandmarkCovariance
(
LandmarkBaseConstPtr
_landmark_ptr
,
Eigen
::
MatrixXd
&
_covariance
)
const
;
// Solver management ----------------------------------------
/** \brief Notifies a new/removed state block to update the solver manager
...
...
@@ -388,10 +411,6 @@ class Problem : public std::enable_shared_from_this<Problem>
bool
metric
=
true
,
//
bool
state_blocks
=
false
,
std
::
ostream
&
stream
=
std
::
cout
)
const
;
void
print
(
const
std
::
string
&
depth
,
//
bool
constr_by
=
false
,
//
bool
metric
=
true
,
//
bool
state_blocks
=
false
)
const
;
bool
check
(
int
verbose_level
=
0
)
const
;
bool
check
(
bool
verbose
,
std
::
ostream
&
stream
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/problem/problem.cpp
+
0
−
15
View file @
946d46d4
...
...
@@ -1735,21 +1735,6 @@ bool Problem::check(int _verbose_level) const
{
return
check
((
_verbose_level
>
0
),
std
::
cout
);
}
void
Problem
::
print
(
const
std
::
string
&
depth
,
bool
constr_by
,
bool
metric
,
bool
state_blocks
)
const
{
if
(
depth
.
compare
(
"T"
)
==
0
)
print
(
0
,
constr_by
,
metric
,
state_blocks
);
else
if
(
depth
.
compare
(
"F"
)
==
0
)
print
(
1
,
constr_by
,
metric
,
state_blocks
);
else
if
(
depth
.
compare
(
"C"
)
==
0
)
print
(
2
,
constr_by
,
metric
,
state_blocks
);
else
if
(
depth
.
compare
(
"f"
)
==
0
)
print
(
3
,
constr_by
,
metric
,
state_blocks
);
else
if
(
depth
.
compare
(
"c"
)
==
0
)
print
(
4
,
constr_by
,
metric
,
state_blocks
);
else
print
(
0
,
constr_by
,
metric
,
state_blocks
);
}
void
Problem
::
perturb
(
double
amplitude
)
{
...
...
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