Skip to content

Commit

Permalink
add beehive grow test
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed May 19, 2021
1 parent f518061 commit fa1bd91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ testfiles = [
"testAccumulateFactors.jl";
"testDeadReckoningTether.jl";
"testFluxModelsPose2.jl";
"testBeehiveGrow.jl"
]


Expand Down
20 changes: 11 additions & 9 deletions test/testBeehiveGrow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Test
using RoME
using Distributed

while nprocs() < 4
while nprocs() < 3
addprocs(1)
end

Expand All @@ -17,7 +17,7 @@ using RoME

##

fg = RoME.generateCanonicalFG_Beehive!(7, graphinit=true)
fg = RoME.generateCanonicalFG_Beehive!(7, graphinit=true, useMsgLikelihoods = true)
tree, _, _ = solveTree!(fg);

fg = RoME.generateCanonicalFG_Beehive!(14, graphinit=true, fg=fg)
Expand All @@ -27,7 +27,6 @@ tree_ = deepcopy(tree); fg_ = deepcopy(fg);
fg = RoME.generateCanonicalFG_Beehive!(21, graphinit=true, fg=fg)
tree, _, _ = solveTree!(fg , tree);


# fg = RoME.generateCanonicalFG_Beehive!(28, graphinit=true, fg=fg)
# tree, _, _ = solveTree!(fg, tree);

Expand All @@ -42,23 +41,26 @@ tree, _, _ = solveTree!(fg , tree);

# working before IIF 1010

# @test isappox( getPPE(fg, :l11).suggested , [], atol= )
@warn("Test for beehive graph is using loose bounds until IIF #1010 is resolved.")
@test isapprox( getPPE(fg, :l11).suggested , [5;10*sin(pi/3)], atol=4)
@test isapprox( getPPE(fg, :l0).suggested , [20;0], atol=2)
@test isapprox( getPPE(fg, :l7).suggested , [20;-20*sin(pi/3)], atol=4)

# likely to fail until IIF 1010 is completed
@test_broken isapprox( getPPE(fg, :x21).suggested[1:2] , [10;-20*sin(pi/3)], atol=4)


##


end

##

using RoMEPlotting
Gadfly.set_default_plot_size(40cm,25cm)
# using RoMEPlotting
# Gadfly.set_default_plot_size(40cm,25cm)

##
# ##

plotSLAM2D(fg, drawContour=false, drawPoints=false, drawEllipse=false)
# plotSLAM2D(fg, drawContour=false, drawPoints=false, drawEllipse=false)

#

0 comments on commit fa1bd91

Please sign in to comment.