Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Federico Ciuffardi Alves
pgMappingCooperativo
Commits
e4fe0bc0
Commit
e4fe0bc0
authored
Nov 16, 2021
by
Federico Ciuffardi
Browse files
Fix criticalConditionMin 0, add criticalConditionMin 2
parent
a0a95900
Changes
3
Hide whitespace changes
Inline
Side-by-side
launch/multirobot.launch
View file @
e4fe0bc0
...
...
@@ -76,8 +76,8 @@
<arg
name=
"gvd_edge_simplification_allow_vertex_removal"
default=
"1"
/>
<param
name=
"gvd_edge_simplification_allow_vertex_removal"
type=
"int"
value=
"$(arg gvd_edge_simplification_allow_vertex_removal)"
/>
<arg
name=
"critical_condition
t
_min"
default=
"1"
/>
<param
name=
"critical_condition
t
_min"
type=
"int"
value=
"$(arg critical_condition
t
_min)"
/>
<arg
name=
"critical_condition_min"
default=
"1"
/>
<param
name=
"critical_condition_min"
type=
"int"
value=
"$(arg critical_condition_min)"
/>
<!-- # Map merger Check '../src/MapMerger/MapMerger.{h,cpp}' for help (has defaults values on said file that can be overridden by the ros params) -->
...
...
src/lib/GVD/src/GvdConfig.h
View file @
e4fe0bc0
...
...
@@ -38,6 +38,7 @@ public:
// 0: - All neighbors have greater distance
// 1: - There is no neighbor with less distance
// - And there is at least one neighbor with greater distance
// 2: - There is no neighbor with less distance
int
criticalConditionMin
=
1
;
private:
...
...
src/lib/GVD/src/TopoMap.cpp
View file @
e4fe0bc0
...
...
@@ -65,13 +65,18 @@ bool localMinConstrain(DistMap& distMap, GvdGraph& gvd, Pos p) {
// Is local min minimum
switch
(
GvdConfig
::
get
()
->
criticalConditionMin
){
case
0
:
isMin
=
distMap
[
p
].
distance
<
distMap
[
pN
].
distance
;
case
1
:
isMin
=
distMap
[
p
].
distance
<=
distMap
[
pN
].
distance
;
case
0
:
isMin
=
distMap
[
p
].
distance
<
distMap
[
pN
].
distance
;
break
;
case
1
:
case
2
:
isMin
=
distMap
[
p
].
distance
<=
distMap
[
pN
].
distance
;
break
;
}
if
(
!
isMin
)
break
;
}
return
isMin
&&
hasGreater
;
return
isMin
&&
(
hasGreater
||
GvdConfig
::
get
()
->
criticalConditionMin
==
2
)
;
}
// Return true if there is a path from `prevV` that:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment