Skip to content

Commit

Permalink
Merge pull request #105 from JuliaRobotics/22Q4/enh/plotpc2
Browse files Browse the repository at this point in the history
fix plotPointCloud2D
  • Loading branch information
dehann authored Dec 6, 2022
2 parents 15f44ef + b10152e commit 0175a37
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 35 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
Manifolds = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
TensorCast = "02d47bb6-7ce6-556a-be16-bb1710789e2b"

[compat]
Caesar = "0.14"
ColorSchemes = "3"
DocStringExtensions = "0.8, 0.9"
GLMakie = "0.7, 0.8"
Manifolds = "0.8.15"
TensorCast = "0.4"
julia = "1.8"

[extras]
Expand Down
28 changes: 0 additions & 28 deletions example/CommonUtils.jl

This file was deleted.

5 changes: 2 additions & 3 deletions src/Arena.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ using Caesar
# can switch to WGLMakie after https://github.com/SimonDanisch/JSServe.jl/issues/131
using GLMakie
using ColorSchemes
using TensorCast

# a lot of legacy code has been moved to the attic

export plotPointCloud, plotPointCloudPair, plotPointCloud2D
export plotGraphPointClouds

include("Exports.jl")
include("services/PlotPointCloudMap.jl")

end # module
4 changes: 4 additions & 0 deletions src/Exports.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

export plotPointCloud2D
export plotPointCloud, plotPointCloudPair
export plotGraphPointClouds
10 changes: 6 additions & 4 deletions src/services/PlotPointCloudMap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ end


function plotPointCloud2D(pc::Caesar._PCL.PointCloud)
x = (s->s.data[1]).(pc.points)
y = (s->s.data[2]).(pc.points)
xy = (s->s.data[1:2]).(pc.points)

error("TODO, convert to Makie")
# Gadfly.plot(x=x,y=y, Main.Gadfly.Geom.point)
@cast xy_[i,d] := xy[i][d]

f = Figure()
pos = f[1, 1]
scatter(pos, xy_)
end


Expand Down

0 comments on commit 0175a37

Please sign in to comment.