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
e5efaf4f
Commit
e5efaf4f
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
isStateBlock..Derived not crashing because of associatedMemBlock
parent
70a8027c
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
include/core/ceres_wrapper/solver_ceres.h
+7
-3
7 additions, 3 deletions
include/core/ceres_wrapper/solver_ceres.h
with
7 additions
and
3 deletions
include/core/ceres_wrapper/solver_ceres.h
+
7
−
3
View file @
e5efaf4f
...
@@ -173,18 +173,22 @@ inline ceres::Solver::Options& SolverCeres::getSolverOptions()
...
@@ -173,18 +173,22 @@ inline ceres::Solver::Options& SolverCeres::getSolverOptions()
inline
bool
SolverCeres
::
isFactorRegisteredDerived
(
const
FactorBasePtr
&
fac_ptr
)
const
inline
bool
SolverCeres
::
isFactorRegisteredDerived
(
const
FactorBasePtr
&
fac_ptr
)
const
{
{
return
fac_2_residual_idx_
.
find
(
fac_ptr
)
!
=
fac_2_residual_idx_
.
end
()
and
return
fac_2_residual_idx_
.
count
(
fac_ptr
)
=
=
1
and
fac_2_costfunction_
.
find
(
fac_ptr
)
!
=
fac_2_costfunction_
.
end
()
;
fac_2_costfunction_
.
count
(
fac_ptr
)
=
=
1
;
}
}
inline
bool
SolverCeres
::
isStateBlockRegisteredDerived
(
const
StateBlockPtr
&
state_ptr
)
const
inline
bool
SolverCeres
::
isStateBlockRegisteredDerived
(
const
StateBlockPtr
&
state_ptr
)
const
{
{
if
(
state_blocks_
.
count
(
state_ptr
)
==
0
)
return
false
;
return
ceres_problem_
->
HasParameterBlock
(
getAssociatedMemBlockPtr
(
state_ptr
));
return
ceres_problem_
->
HasParameterBlock
(
getAssociatedMemBlockPtr
(
state_ptr
));
}
}
inline
bool
SolverCeres
::
isStateBlockFixedDerived
(
const
StateBlockPtr
&
st
)
inline
bool
SolverCeres
::
isStateBlockFixedDerived
(
const
StateBlockPtr
&
st
)
{
{
return
ceres_problem_
->
IsParameterBlockConstant
(
SolverManager
::
getAssociatedMemBlockPtr
(
st
));
if
(
state_blocks_
.
count
(
st
)
==
0
)
return
false
;
return
ceres_problem_
->
IsParameterBlockConstant
(
getAssociatedMemBlockPtr
(
st
));
};
};
inline
bool
SolverCeres
::
hasLocalParametrizationDerived
(
const
StateBlockPtr
&
st
)
const
inline
bool
SolverCeres
::
hasLocalParametrizationDerived
(
const
StateBlockPtr
&
st
)
const
...
...
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