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
137b508d
Commit
137b508d
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
minor: more verbose warnings and errors
parent
19219298
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/solver/solver_manager.cpp
+14
-8
14 additions, 8 deletions
src/solver/solver_manager.cpp
with
14 additions
and
8 deletions
src/solver/solver_manager.cpp
+
14
−
8
View file @
137b508d
...
...
@@ -166,7 +166,7 @@ void SolverManager::addFactor(const FactorBasePtr& fac_ptr)
// Warning if adding an already added
if
(
factors_
.
count
(
fac_ptr
)
!=
0
)
{
WOLF_WARN
(
"Tried to add
a
factor that was already added !"
);
WOLF_WARN
(
"Tried to add
the
factor
"
,
fac_ptr
->
id
(),
"
that was already added !"
);
return
;
}
...
...
@@ -206,7 +206,7 @@ void SolverManager::removeFactor(const FactorBasePtr& fac_ptr)
// Warning if removing a missing factor
if
(
factors_
.
count
(
fac_ptr
)
==
0
)
{
WOLF_WARN
(
"Tried to remove
a
factor that is missing !"
);
WOLF_WARN
(
"Tried to remove factor
"
,
fac_ptr
->
id
(),
"
that is missing !"
);
return
;
}
...
...
@@ -230,7 +230,7 @@ void SolverManager::addStateBlock(const StateBlockPtr& state_ptr)
// Warning if adding an already added state block
if
(
state_blocks_
.
count
(
state_ptr
)
!=
0
)
{
WOLF_WARN
(
"Tried to add a StateBloc
k
that was already added !"
);
WOLF_WARN
(
"Tried to add a
the
StateBloc
"
,
state_ptr
,
"
that was already added !"
);
return
;
}
...
...
@@ -256,7 +256,7 @@ void SolverManager::removeStateBlock(const StateBlockPtr& state_ptr)
// Warning if removing a missing state block
if
(
state_blocks_
.
count
(
state_ptr
)
==
0
)
{
WOLF_WARN
(
"Tried to remove
a
StateBlock that was not added !"
);
WOLF_WARN
(
"Tried to remove
the
StateBlock
"
,
state_ptr
,
"
that was not added !"
);
return
;
}
...
...
@@ -323,8 +323,10 @@ Eigen::VectorXd& SolverManager::getAssociatedMemBlock(const StateBlockPtr& state
auto
it
=
state_blocks_
.
find
(
state_ptr
);
if
(
it
==
state_blocks_
.
end
())
{
WOLF_ERROR
(
"Tried to retrieve the memory block of an unregistered StateBlock: "
,
state_ptr
);
throw
std
::
runtime_error
(
"Tried to retrieve the memory block of an unregistered StateBlock !"
);
}
return
it
->
second
;
}
...
...
@@ -333,8 +335,10 @@ const double* SolverManager::getAssociatedMemBlockPtr(const StateBlockPtr& state
auto
it
=
state_blocks_
.
find
(
state_ptr
);
if
(
it
==
state_blocks_
.
end
())
{
WOLF_ERROR
(
"Tried to retrieve the memory block of an unregistered StateBlock: "
,
state_ptr
);
throw
std
::
runtime_error
(
"Tried to retrieve the memory block of an unregistered StateBlock !"
);
}
return
it
->
second
.
data
();
}
...
...
@@ -343,8 +347,10 @@ double* SolverManager::getAssociatedMemBlockPtr(const StateBlockPtr& state_ptr)
auto
it
=
state_blocks_
.
find
(
state_ptr
);
if
(
it
==
state_blocks_
.
end
())
{
WOLF_ERROR
(
"Tried to retrieve the memory block of an unregistered StateBlock: "
,
state_ptr
);
throw
std
::
runtime_error
(
"Tried to retrieve the memory block of an unregistered StateBlock !"
);
}
return
it
->
second
.
data
();
}
...
...
@@ -365,7 +371,7 @@ bool SolverManager::isStateBlockFloating(const StateBlockPtr& state_ptr) const
bool
SolverManager
::
isFactorRegistered
(
const
FactorBasePtr
&
fac_ptr
)
const
{
return
factors_
.
count
(
fac_ptr
)
and
isFactorRegisteredDerived
(
fac_ptr
);
return
factors_
.
count
(
fac_ptr
)
==
1
and
isFactorRegisteredDerived
(
fac_ptr
);
}
bool
SolverManager
::
isStateBlockFixed
(
const
StateBlockPtr
&
st
)
...
...
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