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
33a5c232
Commit
33a5c232
authored
8 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
LandmarkBase: Removed constrained_by_list_ already in NodeConstrained
parent
e8a494ed
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/landmark_base.cpp
+0
-1
0 additions, 1 deletion
src/landmark_base.cpp
src/landmark_base.h
+1
-3
1 addition, 3 deletions
src/landmark_base.h
src/landmark_polyline_2D.cpp
+5
-1
5 additions, 1 deletion
src/landmark_polyline_2D.cpp
with
6 additions
and
5 deletions
src/landmark_base.cpp
+
0
−
1
View file @
33a5c232
...
@@ -16,7 +16,6 @@ LandmarkBase::LandmarkBase(const LandmarkType & _tp, StateBlock* _p_ptr, StateBl
...
@@ -16,7 +16,6 @@ LandmarkBase::LandmarkBase(const LandmarkType & _tp, StateBlock* _p_ptr, StateBl
status_
(
LANDMARK_CANDIDATE
),
status_
(
LANDMARK_CANDIDATE
),
p_ptr_
(
_p_ptr
),
p_ptr_
(
_p_ptr
),
o_ptr_
(
_o_ptr
)
o_ptr_
(
_o_ptr
)
// constrained_by_list_({})
{
{
//
//
}
}
...
...
This diff is collapsed.
Click to expand it.
src/landmark_base.h
+
1
−
3
View file @
33a5c232
...
@@ -34,8 +34,6 @@ class LandmarkBase : public NodeConstrained<MapBase, NodeTerminus>
...
@@ -34,8 +34,6 @@ class LandmarkBase : public NodeConstrained<MapBase, NodeTerminus>
StateBlock
*
p_ptr_
;
///< Position state unit pointer
StateBlock
*
p_ptr_
;
///< Position state unit pointer
StateBlock
*
o_ptr_
;
///< Orientation state unit pointer
StateBlock
*
o_ptr_
;
///< Orientation state unit pointer
Eigen
::
VectorXs
descriptor_
;
//TODO: agree? JS: No: It is not general enough as descriptor to be in LmkBase.
Eigen
::
VectorXs
descriptor_
;
//TODO: agree? JS: No: It is not general enough as descriptor to be in LmkBase.
ConstraintBaseList
constrained_by_list_
;
///< List of constraints linked to this landmark
public:
public:
...
@@ -138,7 +136,7 @@ inline void LandmarkBase::unfix()
...
@@ -138,7 +136,7 @@ inline void LandmarkBase::unfix()
inline
void
LandmarkBase
::
removeConstrainedBy
(
ConstraintBase
*
_ctr_ptr
)
inline
void
LandmarkBase
::
removeConstrainedBy
(
ConstraintBase
*
_ctr_ptr
)
{
{
NodeConstrained
::
removeConstrainedBy
(
_ctr_ptr
);
NodeConstrained
::
removeConstrainedBy
(
_ctr_ptr
);
if
(
c
onstrained
_by_list_
.
empty
())
if
(
getC
onstrained
ByListPtr
()
->
empty
())
this
->
destruct
();
this
->
destruct
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/landmark_polyline_2D.cpp
+
5
−
1
View file @
33a5c232
...
@@ -164,22 +164,26 @@ void LandmarkPolyline2D::defineExtreme(const bool _back)
...
@@ -164,22 +164,26 @@ void LandmarkPolyline2D::defineExtreme(const bool _back)
assert
((
_back
?
!
last_defined_
:
!
first_defined_
)
&&
"defining an already defined extreme"
);
assert
((
_back
?
!
last_defined_
:
!
first_defined_
)
&&
"defining an already defined extreme"
);
assert
(
state
->
hasLocalParametrization
()
&&
"not defined extreme without local parameterization"
);
assert
(
state
->
hasLocalParametrization
()
&&
"not defined extreme without local parameterization"
);
//std::cout << "Defining extreme --> Removing and adding state blocks and constraints" << std::endl;
// remove and add state block without local parameterization
// remove and add state block without local parameterization
if
(
getProblem
()
!=
nullptr
)
if
(
getProblem
()
!=
nullptr
)
getProblem
()
->
removeStateBlockPtr
(
state
);
getProblem
()
->
removeStateBlockPtr
(
state
);
state
->
removeLocalParametrization
();
state
->
removeLocalParametrization
();
if
(
getProblem
()
!=
nullptr
)
if
(
getProblem
()
!=
nullptr
)
getProblem
()
->
addStateBlockPtr
(
state
);
getProblem
()
->
addStateBlockPtr
(
state
);
// remove and add all constraints to the point
// remove and add all constraints to the point
for
(
auto
ctr_ptr
:
c
onstrained
_by_list_
)
for
(
auto
ctr_ptr
:
*
getC
onstrained
ByListPtr
()
)
for
(
auto
st_ptr
:
ctr_ptr
->
getStatePtrVector
())
for
(
auto
st_ptr
:
ctr_ptr
->
getStatePtrVector
())
if
(
st_ptr
==
state
&&
getProblem
()
!=
nullptr
)
if
(
st_ptr
==
state
&&
getProblem
()
!=
nullptr
)
{
{
getProblem
()
->
removeConstraintPtr
(
ctr_ptr
);
getProblem
()
->
removeConstraintPtr
(
ctr_ptr
);
getProblem
()
->
addConstraintPtr
(
ctr_ptr
);
getProblem
()
->
addConstraintPtr
(
ctr_ptr
);
}
}
// update boolean
// update boolean
if
(
_back
)
if
(
_back
)
last_defined_
=
true
;
last_defined_
=
true
;
...
...
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