|
1 |
| -# Visualization with Arena.jl |
| 1 | +# [Visualization 3D](@ref visualization_3d) |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +Over time, Caesar.jl/Arena.jl has used at various different 3D visualization technologies. Currently work is underway to better standardize within the Julia ecosystem, with the 4th generation of Arena.jl -- note that this is work in progress. Information about legacy generations is included below. |
| 6 | + |
| 7 | +For more formal visualization support, contact [www.NavAbility.io](http://www.navability.io) via email or slack. |
| 8 | +## 4th Generation Dev Scripts using Makie.jl |
| 9 | + |
| 10 | +Working towards new [Makie.jl](https://github.com/JuliaPlots/Makie.jl). Makie supports both GL and WGL, including 3rd party libraries such as [three.js](https://threejs.org/) (previously used via MeshCat.jl, see Legacy section below.). |
| 11 | +### [Visualizing Point Clouds](@id viz_pointcloud_makie) |
| 12 | + |
| 13 | +Point clouds could be massive, on the order of a million points or more. Makie.jl has good performance for handling such large point cloud datasets. Here is a quick example script. |
| 14 | +```julia |
| 15 | +using Makie, GLMakie |
| 16 | + |
| 17 | +# n x 3 matrix of 3D points in pointcloud |
| 18 | +pts1 = randn(100,3) |
| 19 | +pts2 = randn(100,3) |
| 20 | + |
| 21 | +# plot first and update with second |
| 22 | +plt = scatter(pts1[:,1],pts1[:,2],pts1[:,3], color=pts1[:,3]) |
| 23 | +scatter!(pts2[:,1],pts2[:,2],pts2[:,3], color=-pts2[:,3]) |
| 24 | +``` |
| 25 | +## Visualizing with Arena.jl |
| 26 | + |
| 27 | +!!! warning |
| 28 | + Arena.jl is currently out of date since the package will likely support Makie via both GL and WGL interfaces. Makie.jl has been receiving much attention over the past years and starting to mature to a point where Arena.jl can be revived again. 2D plotting is done via [`RoMEPlotting.jl`](@ref plotting_2d). |
2 | 29 |
|
3 | 30 | The sections below discuss 3D visualization techniques available to the Caesar.jl robot navigation system.
|
4 | 31 | Caesar.jl uses the [Arena.jl](https://github.com/dehann/Arena.jl) package for all the visualization requirements. This part of the documentation discusses the robotic visualization aspects supported by Arena.jl.
|
5 | 32 | Arena.jl supports a wide variety of general visualization as well as developer visualization tools more focused on research and development.
|
6 | 33 | The visualizations are also intended to help with subgraph plotting for finding loop closures in data or compare two datasets.
|
7 | 34 |
|
8 |
| -!!! warning |
9 |
| - |
10 |
| - Arena and Amphitheater are being upgraded as part of the broader migration to DistributedFactorGraphs (1Q20) |
| 35 | +## Legacy Visualizers |
11 | 36 |
|
12 |
| -## Introduction |
13 |
| - |
14 |
| -Over time, Caesar.jl/Arena.jl has used a least three different 3D visualization technologies, with the most recent based on WebGL and [three.js](https://threejs.org/) by means of the [MeshCat.jl](https://github.com/rdeits/MeshCat.jl) package. |
15 |
| -The previous incarnation used a client side installation of [VTK](https://www.vtk.org/) by means of the [DrakeVisualizer.jl](https://github.com/rdeits/DrakeVisualizer.jl) and [Director](https://github.com/RobotLocomotion/director) libraries. |
| 37 | +Previous generations used various technologies, including WebGL and [three.js](https://threejs.org/) by means of the [MeshCat.jl](https://github.com/rdeits/MeshCat.jl) package. |
| 38 | +Previous incarnations used a client side installation of [VTK](https://www.vtk.org/) by means of the [DrakeVisualizer.jl](https://github.com/rdeits/DrakeVisualizer.jl) and [Director](https://github.com/RobotLocomotion/director) libraries. |
16 | 39 | Different 2D plotting libraries have also been used, with evolutions to improve usability for a wider user base.
|
17 | 40 | Each epoch has been aimed at reducing dependencies and increasing multi-platform support.
|
18 | 41 |
|
19 |
| -!!! note |
| 42 | +### 3rd Generation MeshCat.jl (Three.js) |
20 | 43 |
|
21 |
| - See [installation page](https://juliarobotics.org/Caesar.jl/latest/installation_environment/#Install-Visualization-Tools-1) for instructions. |
22 | 44 |
|
23 |
| -## 3D Visualization |
| 45 | +For the latest work on using MeshCat.jl, see proof or concept examples in Amphitheater.jl (1Q20). The code below inspired the Amphitheater work. |
24 | 46 |
|
25 |
| -!!! warning |
26 |
| - |
27 |
| - This section is out of date, see proof or concept examples in Amphitheater.jl (1Q20). |
| 47 | +!!! note |
| 48 | + See [installation page](https://juliarobotics.org/Caesar.jl/latest/installation_environment/#Install-Visualization-Tools-1) for instructions. |
28 | 49 |
|
29 | 50 | Factor graphs of two or three dimensions can be visualized with the 3D visualizations provided by Arena.jl and it's dependencies.
|
30 | 51 | The 2D example above and also be visualized in a 3D space with the commands:
|
@@ -65,9 +86,18 @@ visualizeDensityMesh!(vc, fg, :l1)
|
65 | 86 | # visualizeallposes!(vc, fg, drawlandms=false)
|
66 | 87 | ```
|
67 | 88 |
|
68 |
| -## Previous 3D Viewer (VTK / Director) -- no longer required |
| 89 | +For more information see [JuliaRobotcs/MeshCat.jl](https://github.com/rdeits/MeshCat.jl). |
| 90 | + |
| 91 | +### 2nd Generation 3D Viewer (VTK / Director) |
| 92 | + |
| 93 | +!!! note |
| 94 | + This code is obsolete |
69 | 95 |
|
70 | 96 | Previous versions used the much larger VTK based Director available via [DrakeVisualizer.jl package](https://github.com/rdeits/DrakeVisualizer.jl). This requires the following preinstalled packages:
|
71 | 97 | ```bash
|
72 | 98 | sudo apt-get install libvtk5-qt4-dev python-vtk
|
73 | 99 | ```
|
| 100 | + |
| 101 | +### 1st Generation MIT LCM Collections viewer |
| 102 | + |
| 103 | +This code has been removed. |
0 commit comments