Skip to content

Commit 53d843a

Browse files
authored
Merge pull request #888 from JuliaRobotics/master
v0.13.3-rc1
2 parents 2c794af + 4fd2c6c commit 53d843a

27 files changed

+1362
-132
lines changed

.github/workflows/CompatHelper.yml

+35-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,45 @@
11
name: CompatHelper
22
on:
33
schedule:
4-
- cron: '00 01 * * *'
4+
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v1
19+
with:
20+
version: '1'
21+
# arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
1342
env:
1443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
44+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ Major changes and news in Caesar.jl.
1111
- Refactored `ScatterAlign` to support both `ScatterAlignPose2` and `ScatterAlignPose3`.
1212
- Improved `_PCL.apply` to now transform both 2D and 3D pointclouds using `Manifolds.SpecialEuclidean(2)` and `Manifolds.SpecialEuclidean(3)`.
1313
- Added more testing on `_PCL` conversions and transforms.
14+
- Added `ICP` for point cloud alignment, (#885, #886).
15+
- Separated test data to `JuliaRobotics/CaesarTestData.jl` (#885).

Project.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Caesar"
22
uuid = "62eebf14-49bc-5f46-9df9-f7b7ef379406"
33
keywords = ["SLAM", "state-estimation", "MM-iSAM", "MM-iSAMv2", "inference", "robotics", "ROS"]
44
desc = "Non-Gaussian simultaneous localization and mapping"
5-
version = "0.13.2"
5+
version = "0.13.3"
66

77
[deps]
88
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
@@ -26,16 +26,19 @@ JSON2 = "2535ab7d-5cd8-5a07-80ac-9b1792aadce3"
2626
KernelDensityEstimate = "2472808a-b354-52ea-a80e-1658a3c6056d"
2727
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2828
Manifolds = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
29+
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
2930
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
3031
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
3132
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
33+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
3234
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
3335
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
3436
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
3537
RoME = "91fb55c2-4c03-5a59-ba21-f4ea956187b8"
3638
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
3739
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
3840
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
41+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
3942
TensorCast = "02d47bb6-7ce6-556a-be16-bb1710789e2b"
4043
TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"
4144
TransformUtils = "9b8138ad-1b09-5408-aa39-e87ed6d21b63"
@@ -81,6 +84,8 @@ julia = "1.6"
8184
AprilTags = "f0fec3d5-a81e-5a6a-8c28-d2b34f3659de"
8285
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
8386
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
87+
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
88+
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
8489
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
8590
Gadfly = "c91e804a-d5a3-530f-b6f0-dfbca275c004"
8691
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
@@ -94,4 +99,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9499
ZMQ = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
95100

96101
[targets]
97-
test = ["AprilTags", "BSON", "Colors", "FixedPointNumbers", "Gadfly", "GraphPlot", "Images", "PyCall", "Random", "RobotOS", "Serialization", "Test", "ZMQ"]
102+
test = ["AprilTags", "BSON", "Colors", "DelimitedFiles", "Downloads", "FixedPointNumbers", "Gadfly", "GraphPlot", "Images", "PyCall", "Random", "RobotOS", "Serialization", "Test", "ZMQ"]

docs/Project.toml

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
33
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
4+
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
45
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
56
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
67
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -15,6 +16,7 @@ FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
1516
FunctionalStateMachine = "3e9e306e-7e3c-11e9-12d2-8f8f67a2f951"
1617
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
1718
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
19+
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
1820
IncrementalInference = "904591bb-b899-562f-9e6f-b8df64c7d480"
1921
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
2022
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
@@ -40,6 +42,7 @@ ZMQ = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
4042
[compat]
4143
ApproxManifoldProducts = "≥ 0.3"
4244
Combinatorics = "0.7, 1"
45+
Colors = "≥ 0.12"
4346
CoordinateTransformations = "≥ 0.5"
4447
DataStructures = "≥ 0.15"
4548
DistributedFactorGraphs = "≥ 0.8"
@@ -50,6 +53,7 @@ FileIO = "≥ 1.0"
5053
FunctionalStateMachine = "≥ 0.1"
5154
ImageCore = "≥ 0.7"
5255
ImageMagick = "≥ 0.7"
56+
Images = "≥ 0.24"
5357
IncrementalInference = "≥ 0.13"
5458
JLD2 = "≥ 0.1"
5559
JSON = "≥ 0.18"

docs/make.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Documenter, Caesar
22
using RoME
3+
using Colors
4+
using Images
35

46
import IncrementalInference: fmcmc!, localProduct, prodmultiplefullpartials, prodmultipleonefullpartials, setfreeze!
57
import IncrementalInference: cliqGibbs, packFromLocalPotentials!, treeProductDwn, updateFGBT!, upGibbsCliqueDensity
@@ -35,7 +37,6 @@ makedocs(
3537
"Interact w Graphs" => "concepts/interacting_fgs.md",
3638
"Multi-Modal/Hypothesis" => "concepts/dataassociation.md",
3739
"Parallel Processing" => "concepts/parallel_processing.md",
38-
"Using Manifolds.jl" => "concepts/using_manifolds.md",
3940
"[DEV] Parametric Solve" => "examples/parametric_solve.md",
4041
],
4142
"Examples" => [
@@ -51,6 +52,8 @@ makedocs(
5152
"Variables/Factors" => "concepts/available_varfacs.md",
5253
"Entry=>Data Blob" => "concepts/entry_data.md",
5354
"Images and AprilTags" => "examples/using_images.md",
55+
"Pointclouds and PCL" => "examples/using_pcl.md",
56+
"Using Manifolds.jl" => "concepts/using_manifolds.md",
5457
"Flux (NN) Factors" => "concepts/flux_factors.md",
5558
],
5659
"Visualization" => [

docs/src/concepts/2d_plotting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Plotting 2D
1+
# [Plotting 2D](@id plotting_2d)
22

33
Once the graph has been built, 2D plot visualizations are provided by [RoMEPlotting.jl](http://www.github.com/JuliaRobotics/RoMEPlotting.jl) and [KernelDensityEstimatePlotting.jl](http://www.github.com/JuliaRobotics/KernelDensityEstimatePlotting.jl). These visualizations tools are readily modifiable to highlight various aspects of mobile platform navigation.
44

docs/src/concepts/arena_visualizations.md

+45-15
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,51 @@
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).
229

330
The sections below discuss 3D visualization techniques available to the Caesar.jl robot navigation system.
431
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.
532
Arena.jl supports a wide variety of general visualization as well as developer visualization tools more focused on research and development.
633
The visualizations are also intended to help with subgraph plotting for finding loop closures in data or compare two datasets.
734

8-
!!! warning
9-
10-
Arena and Amphitheater are being upgraded as part of the broader migration to DistributedFactorGraphs (1Q20)
35+
## Legacy Visualizers
1136

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.
1639
Different 2D plotting libraries have also been used, with evolutions to improve usability for a wider user base.
1740
Each epoch has been aimed at reducing dependencies and increasing multi-platform support.
1841

19-
!!! note
42+
### 3rd Generation MeshCat.jl (Three.js)
2043

21-
See [installation page](https://juliarobotics.org/Caesar.jl/latest/installation_environment/#Install-Visualization-Tools-1) for instructions.
2244

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.
2446

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.
2849

2950
Factor graphs of two or three dimensions can be visualized with the 3D visualizations provided by Arena.jl and it's dependencies.
3051
The 2D example above and also be visualized in a 3D space with the commands:
@@ -65,9 +86,18 @@ visualizeDensityMesh!(vc, fg, :l1)
6586
# visualizeallposes!(vc, fg, drawlandms=false)
6687
```
6788

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
6995

7096
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:
7197
```bash
7298
sudo apt-get install libvtk5-qt4-dev python-vtk
7399
```
100+
101+
### 1st Generation MIT LCM Collections viewer
102+
103+
This code has been removed.

docs/src/concepts/solving_graphs.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,18 @@ When building sysmtes with limited computation resources, the out-marginalizatio
2727
defaultFixedLagOnTree!(fg, 50, limitfixeddown=true)
2828
```
2929

30-
This call will keep the latest 50 variables fluid for inference during Bayes tree inference. The keyword `limitfixeddown=true` in this case will also prevent downward message passing on the Bayes tree from propagating into the out-marginalized branches on the tree. A later page in this documentation will discuss how the inference algorithm and Bayes tree aspects are put together.
30+
This call will keep the latest 50 variables fluid for inference during Bayes tree inference. The keyword `limitfixeddown=true` in this case will also prevent downward message passing on the Bayes tree from propagating into the out-marginalized branches on the tree. A later page in this documentation will discuss how the inference algorithm and Bayes tree aspects are put together.
31+
32+
## [Synchronizing Over a Factor Graph](@id sync_over_graph_solvable)
33+
34+
When adding Variables and Factors, use `solvable=0` to disable the new fragments until ready for inference, for example
35+
```julia
36+
addVariable!(fg, :x45, Pose2, solvable=0)
37+
newfct = addFactor!(fg, [:x11,:x12], Pose2Pose2, solvable=0)
38+
```
39+
40+
These parts of the factor graph can simply be activated for solving:
41+
```julia
42+
setSolvable!(fg, :x45, 1)
43+
setSolvable!(fg, newfct.label, 1)
44+
```

docs/src/concepts/using_manifolds.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,20 @@ The best way to show this is just dive straight into a factor that actually uses
8181
### Existing Manifolds
8282

8383
The most popular Manifolds used in Caesar.jl related packages are:
84-
- [`Sphere(N)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/sphere.html#Manifolds.Sphere) WORK IN PROGRESS.
84+
85+
#### Group Manifolds
86+
8587
- [`TranslationGroup(N)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/group.html#Manifolds.TranslationGroup) (future work will relax to `Euclidean(N)`).
8688
- [`SpecialOrthogonal(N)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/group.html#Manifolds.SpecialOrthogonal).
8789
- [`SpecialEuclidean(N)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/group.html#Special-Euclidean-group).
8890
- `_CircleEuclid` LEGACY, TODO.
8991
- `AMP.SE2_E2` LEGACY, TODO.
9092

93+
#### Riemannian Manifolds (Work in progress)
94+
95+
- [`Sphere(N)`](https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/sphere.html#Manifolds.Sphere) WORK IN PROGRESS.
96+
97+
9198
!!! note
9299
Caesar.jl encourages the JuliaManifolds approach to defining new manifolds, and can readily be used for Caesar.jl related operations.
93100

docs/src/examples/using_images.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Images and Fiducials
1+
# [Images and Fiducials](@id images_and_fiducials)
22

33
## AprilTags
44

@@ -28,3 +28,7 @@ bytes = Caesar.toFormat(format"PNG", img)
2828

2929
!!! note
3030
More details to follow.
31+
32+
### Images enables `ScatterAlign`
33+
34+
See [point cloud alignment page for details on `ScatterAlignPose`](@ref sec_scatter_align)

docs/src/examples/using_pcl.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Pointclouds and PCL Types
2+
3+
## Introduction Caesar._PCL
4+
5+
A wide ranging and well used [point cloud library exists called PCL](https://pointclouds.org/) which is implemented in C++. To get access to many of those features and bridge the Caesar.jl suite of packages, the base `PCL.PointCloud` types have been implemented in Julia and reside under `Caesar._PCL`. The main types of interest:
6+
- [`Caesar._PCL.PointCloud`](@ref),
7+
- [`Caesar._PCL.PCLPointCloud2`](@ref),
8+
- [`Caesar._PCL.PointXYZ`](@ref),
9+
- [`Caesar._PCL.Header`](@ref),
10+
- [`Caesar._PCL.PointField`](@ref),
11+
- [`Caesar._PCL.FieldMapper`](@ref).
12+
13+
These types are conditionally loaded once `Colors.jl` is included (see [Requires.jl](https://github.com/JuliaPackaging/Requires.jl)),
14+
```julia
15+
using Colors, Caesar
16+
using StaticArrays
17+
18+
# one point
19+
x,y,z,intens = 1f0,0,0,1
20+
pt = Caesar._PCL.PointXYZ(;data=SA[x,y,z,intens])
21+
22+
# etc.
23+
```
24+
25+
```@docs
26+
Caesar._PCL.PointCloud
27+
```
28+
29+
## Conversion with `ROS.PointCloud2`
30+
31+
Strong integration between PCL and [ROS](http://www.ros.org) predominantly through the message types
32+
- `@rosimport std_msgs.msg: Header`, `@rosimport sensor_msgs.msg: PointField`, `@rosimport sensor_msgs.msg: PointCloud2`.
33+
34+
These have been integrated through conversions to equivalent Julian types already listed above. ROS conversions requires RobotOS.jl be loaded, see page on using [ROS Direct](@ref ros_direct).
35+
36+
```@docs
37+
Caesar._PCL.PCLPointCloud2
38+
Caesar._PCL.PointXYZ
39+
Caesar._PCL.Header
40+
Caesar._PCL.PointField
41+
Caesar._PCL.FieldMapper
42+
```
43+
44+
## Aligning Point Clouds
45+
46+
Caesar.jl is currently growing support for two related point cloud alignment methods, namely:
47+
- Continuous density function alignment [`ScatterAlignPose2`](@ref), [`ScatterAlignPose3`](@ref),
48+
- Traditional Iterated Closest Point (with normals) [`alignICP_Simple`](@ref).
49+
50+
### [`ScatterAlign` for `Pose2` and `Pose3`](@id sec_scatter_align)
51+
52+
These factors use minimum mean distance embeddings to cost the alignment between pointclouds and supports various other interesting function alignment cases. These functions require `Images.jl`, see page [Using Images](@ref images_and_fiducials).
53+
54+
```@docs
55+
Caesar.ScatterAlign
56+
Caesar.ScatterAlignPose2
57+
Caesar.ScatterAlignPose3
58+
```
59+
60+
!!! note
61+
Future work may include `ScatterAlignPose2z`, please open issues at Caesar.jl if this is of interest.
62+
63+
### Iterative Closest Point
64+
65+
Ongoing work is integrating ICP into a factor similar to `ScatterAlign`.
66+
67+
```@docs
68+
Caesar._PCL.alignICP_Simple
69+
```
70+
71+
## Visualizing Point Clouds
72+
73+
See work in progress on alng with example code on the page [3D Visualization](@ref viz_pointcloud_makie).

0 commit comments

Comments
 (0)