1 15
module Arena
2

3
# due to issue with ImageMagick and Pkg importing, the order is very sensitive here!
4
# see https://github.com/JuliaIO/ImageMagick.jl/issues/142
5
using ImageMagick
6
using PlotUtils
7
using Caesar, ImageView, Images, MeshIO, MeshCat
8
using LinearAlgebra
9

10
using Rotations, CoordinateTransformations
11
using TransformUtils
12
using Graphs, NLsolve
13
using GeometryTypes, ColorTypes
14
using DocStringExtensions, ProgressMeter
15
# using CaesarLCMTypes
16
using Requires
17
using FileIO
18
using JSON
19
using Base64
20

21
const CTs = CoordinateTransformations
22
const TUs = TransformUtils
23

24
export
25
  meshgrid,
26
  DepthCamera,
27
  buildmesh!,
28
  reconstruct,
29
  VisualizationContainer,
30
  startDefaultVisualization,
31
  newtriad!,
32
  visualize,
33
  stopVis!,
34
  setGlobalDrawTransform!,
35
  visualizetriads,
36
  visualizeallposes!,
37
  visualizeDensityMesh!,
38
  updaterealtime!,
39
  visualizerealtime,
40
  # new tree interface
41
  drawpose!,
42
  drawposepoints!,
43
  drawLine!,
44
  drawLineBetween!,
45
  drawAllOdometryEdges!,
46
  pointToColor,
47
  findAllBinaryFactors,
48
  drawAllBinaryFactorEdges!,
49
  loadmodel,
50
  DrawModel,
51
  DrawROV,
52
  DrawScene,
53
  #deleting functions
54
  deletemeshes!,
55

56
  # more drawing utils
57
  ArcPointsRangeSolve,
58
  findaxiscenter!,
59
  parameterizeArcAffineMap,
60
  animatearc,
61

62
  # ImageUtils
63
  # image_tToRgb,
64
  rgbUint8ToRgb,
65
  rgbToJpeg,
66
  rgbToPng,
67
  imshowhackpng,
68
  cloudimshow,
69
  imshowhack,
70
  roi,
71

72
  # BotVis
73
  CameraModel,
74
  initBotVis2,
75
  drawPoses2!,
76
  cloudFromDepthImage,
77

78
  # point clouds
79
  visPointCloudOnPose!,
80
  drawPointCloudonPose!,
81
  cloudFromDepthImage,
82

83
  # colour gradients
84
  # re-exports
85
  cgrad,
86
  clibraries,
87
  cgradients
88

89

90
const NothingUnion{T} = Union{Nothing, T}
91

92

93
# Minimal globals
94
global loopvis = true
95
global drawtransform = Translation(0.0,0.0,0.0)  LinearMap(Quat(1.0,0.0,0.0,0.0))
96

97

98
# types and models
99
include("Common/CameraModel.jl")
100
include("VisualizationTypes.jl")
101
include("RobotSceneModels.jl")
102

103
# Common
104
include("Common/DepthImages.jl")
105
# utils
106
include("GeneralUtils.jl")
107
include("ColorUtils.jl")
108
include("VisualizeLines.jl")
109
include("MeshUtils.jl")
110
include("BigDataUtils.jl")
111
include("ImageUtils.jl")
112
include("AnimationUtils.jl")
113
include("VisualizationUtils.jl")
114
include("VisualizePosesPoints.jl")
115
include("ModelVisualizationUtils.jl")
116
include("deprecated/Deprecated.jl")
117

118
# user interaction
119
include("HighLevelAPI.jl")
120
include("Amphitheatre/Amphitheatre.jl")
121
using .Amphitheatre
122

123
# plugins
124

125
# Developer tools
126
include("BotVis.jl")
127

128

129
# Used by Requires.jl to check if packages are imported. Much cleaner than janky isdefined().
130
function __init__()
131 15
  @info "Conditionally importing RoMEPlotting, GraffSDK, and Director..."
132
  # Checking what to import from the calling module
133 2
  @require GraffSDK="d47733cc-d211-5467-9efc-951b5b83f246" begin
134
    @info "--- GraffSDK is defined in the calling namespace, importing Graff functions..."
135
    include("plugins/GraffVisualizationService.jl")
136
    include("deprecated/DeprecatedGraff.jl")
137
    # Graff exports
138
    export visualizeSession
139
  end
140 2
  @require RoMEPlotting="238d586b-a4bf-555c-9891-eda6fc5e55a2" begin
141
    @info "--- RoMEPlotting is defined in the calling namespace, importing RoMEPlotting functions..."
142
  end
143 2
  @require DrakeVisualizer="49c7015b-b8db-5bc5-841b-fcb31c578176" begin
144
    @info "--- DrakeVisualizer is defined in the calling namespace, importing DrakeVisualizer functions..."
145
    include("DirectorVisService.jl")
146
    # DrakeVisualizer exports
147
    export drawdbdirector
148
    end
149
  end
150

151

152
# load the internal plugins that may or may not depend on the @requires above
153
include("plugins/VisualizationDefault.jl")
154
include("plugins/GetRobotConfiguration.jl")
155
include("plugins/ReprojectBearingRange.jl")
156
include("plugins/PointClouds.jl")
157

158

159
end # module

Read our documentation on viewing source code .

Loading