From d34e6ad81d3922138f051aba967383f8fb271e93 Mon Sep 17 00:00:00 2001 From: Johannes Terblanche Date: Wed, 21 Nov 2018 12:35:08 +0200 Subject: [PATCH 1/2] Add Project.toml to examples for reproducibility --- README.md | 8 ++++++++ examples/Project.toml | 14 ++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 examples/Project.toml diff --git a/README.md b/README.md index 9b2c38a..bcf094c 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,11 @@ Pkg.add("AprilTags") Please see v0.0.2 for julia 0.6 support. See [documentation](https://juliarobotics.github.io/AprilTags.jl/latest/), examples, and test folder for usage. + +## Examples + +To run the examples cd to the project directory and call: + +`(v1.0) pkg> activate .` + +`(AprilTags Examples) pkg> instantiate` diff --git a/examples/Project.toml b/examples/Project.toml new file mode 100644 index 0000000..6adfff1 --- /dev/null +++ b/examples/Project.toml @@ -0,0 +1,14 @@ +name = "AprilTags Examples" + +[deps] +AprilTags = "f0fec3d5-a81e-5a6a-8c28-d2b34f3659de" +ImageDraw = "4381153b-2b60-58ae-a1ba-fd683676385f" +ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" +Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" + +[compat] +AprilTags = "^0.7" +ImageDraw = "^0.1" +ImageMagick = "^0.7" +Images = "^0.16" +julia = ">=0.7" From e8416d3e76e75fd806d7b1d6639f868caa3afc74 Mon Sep 17 00:00:00 2001 From: Johannes Terblanche Date: Wed, 12 Dec 2018 10:54:28 +0200 Subject: [PATCH 2/2] updated homography tests to fix test bug --- test/homography.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/homography.jl b/test/homography.jl index 4ed75ff..044f57f 100644 --- a/test/homography.jl +++ b/test/homography.jl @@ -103,8 +103,8 @@ PixPos(pix::UInt8, pos::Array{Float64,1}) = PixPos(pix, (x=pos[1], y=pos[2], z=p pose = homographytopose(tags[1].H, fx, fy, cx, cy, taglength = 160.) display(pose) - @test pose[1:3,1:3] ≈ cTw[1:3,1:3] atol = 0.05 - @test pose[1:3,4] ≈ cTw[1:3,4] atol = 10. + @test all(isapprox.(pose[1:3,1:3], cTw[1:3,1:3], atol = 0.05)) + @test all(isapprox.(pose[1:3,4], cTw[1:3,4], atol = 10.)) end end