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
Merge requests
!292
Resolve "Allowed changes in wolf nodes"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Allowed changes in wolf nodes"
218-allowed-changes-in-wolf-nodes
into
devel
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Joan Vallvé Navarro
requested to merge
218-allowed-changes-in-wolf-nodes
into
devel
5 years ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
Closes
#218 (closed)
Edited
5 years ago
by
Joan Vallvé Navarro
0
0
Merge request reports
Viewing commit
a8ca19ba
Prev
Next
Show latest version
1 file
+
13
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
a8ca19ba
in FactorBase::link() skip if nullptr (not seting constrained by)
· a8ca19ba
Joan Vallvé Navarro
authored
5 years ago
src/factor/factor_base.cpp
+
13
−
11
Options
@@ -145,20 +145,22 @@ void FactorBase::link(FeatureBasePtr _ftr_ptr)
{
assert
(
this
->
getFeature
()
==
nullptr
&&
"linking an already linked factor"
);
if
(
_ftr_ptr
)
// not link if nullptr
if
(
_ftr_ptr
==
nullptr
)
{
_ftr_ptr
->
addFactor
(
shared_from_this
());
this
->
setFeature
(
_ftr_ptr
);
this
->
setProblem
(
_ftr_ptr
->
getProblem
());
// add factor to be added in solver
if
(
this
->
getProblem
()
==
nullptr
)
{
WOLF_WARN
(
"ADDING FACTOR "
,
this
->
id
(),
" TO FEATURE "
,
_ftr_ptr
->
id
(),
" NOT CONNECTED WITH PROBLEM."
);
}
}
else
WOLF_WARN
(
"Linking with nullptr"
);
return
;
}
// link with feature
_ftr_ptr
->
addFactor
(
shared_from_this
());
this
->
setFeature
(
_ftr_ptr
);
// set problem ( and register factor )
WOLF_WARN_COND
(
this
->
getProblem
()
==
nullptr
,
"ADDING FACTOR "
,
this
->
id
(),
" TO FEATURE "
,
_ftr_ptr
->
id
(),
" NOT CONNECTED WITH PROBLEM."
);
this
->
setProblem
(
_ftr_ptr
->
getProblem
());
// constrained by
auto
frame_other
=
this
->
frame_other_ptr_
.
lock
();
if
(
frame_other
!=
nullptr
)
frame_other
->
addConstrainedBy
(
shared_from_this
());
auto
capture_other
=
this
->
capture_other_ptr_
.
lock
();
Loading