Skip to content

Commit

Permalink
Merge branch 'master' into maintenance/last06
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Oct 3, 2018
2 parents a42f901 + 5b73d24 commit 4c3726b
Show file tree
Hide file tree
Showing 42 changed files with 4,234 additions and 176 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -103,11 +103,11 @@ Consider citing our work:
[dvis-build-url]: https://travis-ci.org/rdeits/DrakeVisualizer.jl
[dvis-url]: http://www.github.com/rdeits/DrakeVisualizer.jl -->

[graphs-cov-img]: https://codecov.io/github/JuliaArchive/Graphs.jl/coverage.svg?branch=master
[graphs-cov-url]: https://codecov.io/github/JuliaArchive/Graphs.jl?branch=master
[graphs-build-img]: https://travis-ci.org/JuliaArchive/Graphs.jl.svg?branch=master
[graphs-build-url]: https://travis-ci.org/JuliaArchive/Graphs.jl
[graphs-url]: http://www.github.com/JuliaArchive/Graphs.jl
[graphs-cov-img]: https://codecov.io/github/JuliaAttic/Graphs.jl/coverage.svg?branch=master
[graphs-cov-url]: https://codecov.io/github/JuliaAttic/Graphs.jl?branch=master
[graphs-build-img]: https://travis-ci.org/JuliaAttic/Graphs.jl.svg?branch=master
[graphs-build-url]: https://travis-ci.org/JuliaAttic/Graphs.jl
[graphs-url]: http://www.github.com/JuliaAttic/Graphs.jl

[cloudgraphs-cov-img]: https://codecov.io/github/GearsAD/CloudGraphs.jl/coverage.svg?branch=master
[cloudgraphs-cov-url]: https://codecov.io/github/GearsAD/CloudGraphs.jl?branch=master
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Expand Up @@ -7,7 +7,7 @@ Distributions 0.14.2 0.16.0
CloudGraphs 0.0.2
Neo4j 1.0.0
LibBSON 0.3.1 0.5.0
Mongo 0.2.3
Mongo 0.3.0 0.5.0
TransformUtils 0.1.0 0.2.0
Rotations 0.7.0 0.8.0
CoordinateTransformations 0.4.0 0.6.0
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Expand Up @@ -58,7 +58,7 @@ drawdbdirector() # from database held factor graph

* [Foveation queries](http://people.csail.mit.edu/spillai/projects/cloud-graphs/2017-icra-cloudgraphs.pdf) to quickly organize, extract and work with big data blobs, for example looking at images from multiple sessions predicted to see the same point `[-9.0,9.0]` in the map:
```julia
neoids, syms = foveateQueryToPoint(cloudGraph,["SESS21";"SESS38";"SESS45"], point=[-9.0;9.0], fovrad=0.5 )
neoids, syms = foveateQueryToPoint(cloudGraph,["SESS21";"SESS38";"SESS45"], "robot", "user" point=[-9.0;9.0], fovrad=0.5 )
for neoid in neoids
cloudimshow(cloudGraph, neoid=neoid)
end
Expand Down
16 changes: 8 additions & 8 deletions examples/apriltagserver/tag_exporter.jl
Expand Up @@ -30,17 +30,17 @@ function showImage(image, tags)
imageCol
end

function apriltag_converter(a::AprilTag, utime::Int64)
function apriltag_converter(tag::AprilTag, utime::Int64)
msg=apriltag_t();
msg.utime = utime
msg.id=a.id;
msg.familyName=a.family;
msg.hammingDistance=a.hamming;
P = reshape([a.p...;],2,4)'
msg.id=tag.id;
msg.familyName=tag.family;
msg.hammingDistance=tag.hamming;
P = reshape([tag.p...;],2,4)'
msg.p=P
msg.cxy= a.c;
msg.homography= a.H;
msg.pose = homography_to_pose(a.H, -80.,80.,320.,240.)
msg.cxy= tag.c;
msg.homography= tag.H;
msg.pose = homography_to_pose(tag.H, -80.,80.,320.,240.)
return msg
end

Expand Down
35 changes: 35 additions & 0 deletions examples/basic/valuesfromjld.jl
@@ -0,0 +1,35 @@
# extract estimates from jld file

using Caesar, Distributions, RoME

const KDE = KernelDensityEstimate

datetimestamp = "2018-08-09T00:04:36.373"
datadir = "/home/dehann/Pictures/racecarimgs/$(datetimestamp)/"
filename = datadir*"racecar_fg_x237.jld"

fg, = loadjld(file=filename)


# using RoMEPlotting
# drawPosesLandms(fg, spscale=0.1)

xx,ll = ls(fg)


fid = open(datadir*"results_$(datetimestamp).csv","w")
for x in xx
# @show x,
mx = KDE.getKDEMean(getVertKDE(fg, x))
println(fid, "$x, $(mx[1]), $(mx[2]), $(mx[3]), $(mx[4]), $(mx[5])")
end
for x in ll
# @show x,
mx = KDE.getKDEMean(getVertKDE(fg, x))
println(fid, "$x, $(mx[1]), $(mx[2])")
end
close(fid)



#
4 changes: 2 additions & 2 deletions examples/database/foveation.jl
Expand Up @@ -12,9 +12,9 @@ cloudGraph, addrdict = standardcloudgraphsetup(addrdict=addrdict)




#TODO: Please replace with correct robot and user name.
neoids, syms = foveateQueryToPoint(cloudGraph,
["SESSTURT21";"SESSTURT38";"SESSTURT45"],
["SESSTURT21";"SESSTURT38";"SESSTURT45"], "robot", "user"
point=[-9.0;9.0], fovrad=0.5)


Expand Down
5 changes: 4 additions & 1 deletion examples/database/templatedbinteraction.jl
Expand Up @@ -5,6 +5,8 @@ using IncrementalInference

include(joinpath(dirname(@__FILE__),"blandauthremote.jl"))
addrdict["session"] = "SESS??"
addrdict["robot"] = "robot"
addrdict["user"] = "user"
cloudGraph, addrdict = standardcloudgraphsetup(addrdict=addrdict)


Expand All @@ -16,7 +18,8 @@ savejld(fg, file="somefg.jld")

plotKDE(fg, :x1, dims=[1;2], api=localapi)
fncvar = getfnctype(getVert(fg,fg.fIDs[:x1710l200050]))
ret = whosNear2D(cloudGraph, "SESS??", x=21.7, y=-54.0)
# TODO: Please fix with correct session for example.
ret = whosNear2D(cloudGraph, "SESS??", robot, user, x=21.7, y=-54.0)
plotLocalProduct(fg, :l200050, dims=[1;2], api=localapi)


Expand Down
Expand Up @@ -5,6 +5,8 @@ using IncrementalInference

include(joinpath(dirname(@__FILE__),"blandauthremote.jl"))
addrdict["session"] = "SESSSHARK_16_11_14" # "SESSROX"
addrdict["robot"] = "robot"
addrdict["user"] = "user"
cloudGraph, addrdict = standardcloudgraphsetup(addrdict=addrdict)


Expand Down Expand Up @@ -49,8 +51,8 @@ h2 = plotKDE(fncvar.bearing, xlbl="Bearing [rad]", fill=true )
Gadfly.draw(PDF("factor_x1710l200050_stack.pdf",15cm,20cm),vstack(h1,h2))



ret = whosNear2D(cloudGraph, "SESSSHARK_16_11_14", x=21.7, y=-54.0)
# TODO: Please fix with correct session for example.
ret = whosNear2D(cloudGraph, "SESSSHARK_16_11_14", "robot", "user" x=21.7, y=-54.0)


sort(collect(keys(ret)))
Expand Down

0 comments on commit 4c3726b

Please sign in to comment.