Skip to content

Commit 77fce16

Browse files
authored
Merge pull request #529 from JuliaRobotics/hotfix/20Q3/fix_#528
Hotfix for lsf with tags filter and test
2 parents 2f7de57 + 3c50a63 commit 77fce16

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/LightDFG/services/LightDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ end
204204
function listFactors(dfg::LightDFG, regexFilter::Union{Nothing, Regex}=nothing; tags::Vector{Symbol}=Symbol[], solvable::Int=0)::Vector{Symbol}
205205
# factors = map(v -> v.dfgNode, filter(n -> n.dfgNode isa DFGFactor, vertices(dfg.g)))
206206
if length(tags) > 0
207-
return map(v -> v.label, getFactor(dfg, regexFilter, tags=tags, solvable=solvable))
207+
return map(v -> v.label, getFactors(dfg, regexFilter, tags=tags, solvable=solvable))
208208
end
209209
factors = collect(keys(dfg.g.factors))
210210
if regexFilter != nothing

test/testBlocks.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,9 @@ function testGroup!(fg, v1, v2, f0, f1)
898898
@test ls(fg, tags=[:POSE]) == []
899899
@test issetequal(ls(fg, tags=[:POSE, :LANDMARK]), ls(fg, tags=[:VARIABLE]))
900900

901+
@test lsf(fg, tags=[:NONE]) == []
902+
@test lsf(fg, tags=[:PRIOR]) == [:af1]
903+
901904
# Regexes
902905
@test ls(fg, r"a") == [v1.label]
903906
@test lsf(fg, r"abf*") == [f1.label]

0 commit comments

Comments
 (0)