Skip to content

Commit 6eec738

Browse files
authored
Merge pull request #912 from JuliaRobotics/master
v0.13.5-rc1
2 parents b97fd36 + cd03d56 commit 6eec738

20 files changed

Lines changed: 503 additions & 91 deletions

.github/workflows/ci.yml

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- develop
88
- release**
99
jobs:
10-
test:
10+
basic-functional:
1111
name: Julia ${{ matrix.version }} - ${{ matrix.arch }} - ${{ matrix.group }} - ${{ matrix.os }}
1212
runs-on: ${{ matrix.os }}
1313
env:
@@ -16,16 +16,14 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
version:
19-
- '1.6'
20-
- '1.7'
19+
- '1.8'
2120
- 'nightly'
2221
os:
2322
- ubuntu-latest
2423
arch:
2524
- x64
2625
group:
2726
- 'basic_functional_group'
28-
- 'test_cases_group'
2927
steps:
3028
- uses: actions/checkout@v2
3129
- uses: julia-actions/setup-julia@v1
@@ -55,7 +53,53 @@ jobs:
5553
with:
5654
file: lcov.info
5755

58-
test-masters:
56+
test-cases:
57+
name: Julia ${{ matrix.version }} - ${{ matrix.arch }} - ${{ matrix.group }} - ${{ matrix.os }}
58+
runs-on: ${{ matrix.os }}
59+
env:
60+
JULIA_PKG_SERVER: ""
61+
strategy:
62+
fail-fast: false
63+
matrix:
64+
version:
65+
- '1.8'
66+
os:
67+
- ubuntu-latest
68+
arch:
69+
- x64
70+
group:
71+
- 'test_cases_group'
72+
continue-on-error: true
73+
steps:
74+
- uses: actions/checkout@v2
75+
- uses: julia-actions/setup-julia@v1
76+
with:
77+
version: ${{ matrix.version }}
78+
arch: ${{ matrix.arch }}
79+
- uses: actions/cache@v1
80+
env:
81+
cache-name: cache-artifacts
82+
with:
83+
path: ~/.julia/artifacts
84+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
85+
restore-keys: |
86+
${{ runner.os }}-test-${{ env.cache-name }}-
87+
${{ runner.os }}-test-
88+
${{ runner.os }}-
89+
- uses: julia-actions/julia-buildpkg@latest
90+
- run: |
91+
git config --global user.name Tester
92+
git config --global user.email te@st.er
93+
- uses: julia-actions/julia-runtest@latest
94+
continue-on-error: ${{ matrix.version == 'nightly' }}
95+
env:
96+
IIF_TEST_GROUP: ${{ matrix.group }}
97+
# - uses: julia-actions/julia-processcoverage@v1
98+
# - uses: codecov/codecov-action@v1
99+
# with:
100+
# file: lcov.info
101+
102+
test-dev-main:
59103
#if: github.ref != 'refs/heads/release**'
60104
name: Upstream Dev
61105
runs-on: ubuntu-latest
@@ -66,7 +110,7 @@ jobs:
66110

67111
- uses: julia-actions/setup-julia@v1
68112
with:
69-
version: 1.7
113+
version: 1.8
70114
arch: x64
71115

72116
- uses: actions/cache@v1
@@ -107,7 +151,7 @@ jobs:
107151
- uses: actions/checkout@v2
108152
- uses: julia-actions/setup-julia@v1
109153
with:
110-
version: 1.7
154+
version: 1.8
111155
- name: 'Docs on ${{ github.head_ref }}'
112156
run: |
113157
export JULIA_PKG_SERVER=""

Project.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ 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.4"
5+
version = "0.13.5"
66

77
[deps]
88
ApproxManifoldProducts = "9bbbb610-88a1-53cd-9763-118ce10c1f89"
9+
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
910
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1011
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
1112
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -59,7 +60,7 @@ FFTW = "1"
5960
FileIO = "1"
6061
ImageCore = "0.8, 0.9"
6162
ImageMagick = "1"
62-
IncrementalInference = "0.30"
63+
IncrementalInference = "0.30, 0.31"
6364
JLD2 = "0.3, 0.4"
6465
JSON = "0.20, 0.21"
6566
JSON2 = "0.3, 0.4"
@@ -71,7 +72,7 @@ Optim = "1"
7172
ProgressMeter = "1"
7273
Reexport = "1"
7374
Requires = "1"
74-
RoME = "0.20"
75+
RoME = "0.20, 0.21"
7576
Rotations = "1.1"
7677
StaticArrays = "1"
7778
StatsBase = "0.33"

docs/src/examples/custom_factor_features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ The MM-iSAMv2 algorithm relies on the Kolmogorov-Criteria as well as uncorrelate
2020

2121
At present `cfo` contains three main fields:
2222
- `cfo.factor::MyFactor` the factor object as defined in the `struct` definition,
23-
- `cfo.metadata::FactorMetadata`, which is currently under development and likely to change.
24-
- This contains references to the connected variables to the factor and more, and is useful for large data retrieval such as used in Terrain Relative Navigation (TRN).
23+
- `cfo.fullvariables`, which can be used for large data blob retrieval such as used in Terrain Relative Navigation (TRN).
24+
- Also see [Stashing and Caching](@ref section_stash_and_cache)
2525
- `cfo._sampleIdx` is the index of which computational sample is currently being calculated.
2626

2727

docs/src/refs/literature.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Newly created page to list related references and additional literature pertaini
1010

1111
[1.3] Fourie, D., Claassens, S., Pillai, S., Mata, R., Leonard, J.: ["SLAMinDB: Centralized graph databases for mobile robotics"](http://people.csail.mit.edu/spillai/projects/cloud-graphs/2017-icra-cloudgraphs.pdf), IEEE Intl. Conf. on Robotics and Automation (ICRA), Singapore, 2017.
1212

13-
[1.4] Cheung, M., Fourie, D., Rypkema, N., Vaz Teixeira, P., Schmidt, H., and Leonard, J.: ["Non-Gaussian SLAM utilizing Synthetic Aperture Sonar"](https://marinerobotics.mit.edu/sites/default/files/cheung_icra2019.pdf), Intl. Conf. On Robotics and Automation (ICRA), IEEE, Montreal, 2019.
13+
[1.4] Cheung, M., Fourie, D., Rypkema, N., Vaz Teixeira, P., Schmidt, H., and Leonard, J.: ["Non-Gaussian SLAM utilizing Synthetic Aperture Sonar"](https://ieeexplore.ieee.org/document/8793536), Intl. Conf. On Robotics and Automation (ICRA), IEEE, Montreal, 2019.
1414

1515
[1.5] Doherty, K., Fourie, D., Leonard, J.: ["Multimodal Semantic SLAM with Probabilistic Data Association"](https://dspace.mit.edu/bitstream/handle/1721.1/137995.2/doherty_icra2019_revised.pdf?sequence=4&isAllowed=y), Intl. Conf. On Robotics and Automation (ICRA), IEEE, Montreal, 2019.
1616

@@ -58,7 +58,7 @@ Newly created page to list related references and additional literature pertaini
5858

5959
[2.14] Arnborg, S., Corneil, D.G. and Proskurowski, A., 1987. ["Complexity of finding embeddings in a k-tree"](https://epubs.siam.org/doi/pdf/10.1137/0608024). SIAM Journal on Algebraic Discrete Methods, 8(2), pp.277-284.
6060

61-
[2.15a] Sola, J., Deray, J. and Atchuthan, D., 2018. ["A micro Lie theory for state estimation in robotics". arXiv preprint arXiv:1812.01537](https://arxiv.org/pdf/1812.01537), and [tech report](https://upcommons.upc.edu/bitstream/handle/2117/179757/2089-A-micro-Lie-theory-for-state-estimation-in-robotics%20(3).pdf).
61+
[2.15a] Sola, J., Deray, J. and Atchuthan, D., 2018. ["A micro Lie theory for state estimation in robotics". arXiv preprint arXiv:1812.01537](https://arxiv.org/pdf/1812.01537), and [tech report](https://upcommons.upc.edu/bitstream/handle/2117/179757/2089-A-micro-Lie-theory-for-state-estimation-in-robotics%20(3).pdf). And [cheatsheet w/ suspected typos](https://github.com/artivis/manif/blob/devel/paper/Lie_theory_cheat_sheet.pdf).
6262

6363
[2.15b] Delleart F., 2012. [Lie Groups for Beginners](https://raw.githubusercontent.com/devbharat/gtsam/master/doc/LieGroups.pdf).
6464

src/3rdParty/_PCL/_PCL.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ include("services/ICP_Simple.jl")
4040

4141
function __init__()
4242
@require RobotOS="22415677-39a4-5241-a37a-00beabbbdae8" include("services/ROSConversions.jl")
43+
@require Gadfly="c91e804a-d5a3-530f-b6f0-dfbca275c004" include("services/PlottingUtilsPCL.jl")
4344
end
4445

4546

src/3rdParty/_PCL/entities/PCLTypes.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Point Cloud Library (PCL) - www.pointclouds.org
55
Copyright (c) 2010, Willow Garage, Inc.
66
Copyright (c) 2012-, Open Perception, Inc.
7+
Copyright (c) 2022, NavAbility, Inc.
78
89
All rights reserved.
910
@@ -277,4 +278,4 @@ end
277278

278279

279280

280-
#
281+
#

src/3rdParty/_PCL/services/ConsolidateRigidTransform.jl

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,28 @@ end
4646
## FIXME, not-yet-consolidated rigid transform code that must be deprecated below
4747
## ============================================================
4848

49+
const _SO3_MANI = SpecialOrthogonal(3)
50+
const _SE3_MANI = SpecialEuclidean(3)
51+
4952
# name euler here is very ambiguous, these are Lie algebra elements
5053
# used to manipulate cartesian coordinates in a TranslationGroup(3) space.
51-
function euler_angles_to_linearized_rotation_matrix(α1, α2, α3)
52-
dR = [ 1 -α3 α2
53-
α3 1 -α1
54-
-α2 α1 1]
54+
function euler_angles_to_linearized_rotation_matrix(α1, α2, α3, rigid::Bool=true)
55+
dR = if rigid
56+
# TODO likely faster performance by using a retraction instead of expmap
57+
exp_lie(_SO3_MANI, hat(_SO3_MANI, SMatrix{3,3, Float64}(I), SA[α1, α2, α3]))
58+
else
59+
SMatrix{3,3,Float64}(1.0,0,0,0,1,0,0,0,1) +
60+
hat(_SO3_MANI, Identity(_SO3_MANI), SA[α1, α2, α3])
61+
# [ 1 -α3 α2
62+
# α3 1 -α1
63+
# -α2 α1 1]
64+
end
5565
end
66+
5667
function create_homogeneous_transformation_matrix(R, t)
57-
H = [R t
58-
zeros(1,3) 1]
68+
H = affine_matrix(_SE3_MANI, ArrayPartition(t, R))
69+
# H = [R t
70+
# zeros(1,3) 1]
5971
end
6072
function euler_coord_to_homogeneous_coord(XE)
6173
no_points = size(XE, 1)

src/3rdParty/_PCL/services/ICP_Simple.jl

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Downloads.download(lidar2_url, io2)
221221
X_fix = readdlm(io1)
222222
X_mov = readdlm(io2)
223223
224-
H, HX_mov = Caesar._PCL.alignICP_Simple(X_fix, X_mov; verbose=true)
224+
H, HX_mov, stat = Caesar._PCL.alignICP_Simple(X_fix, X_mov; verbose=true)
225225
```
226226
227227
Notes
@@ -244,16 +244,17 @@ function alignICP_Simple(
244244
max_overlap_distance::Number=Inf,
245245
min_change::Number=3,
246246
max_iterations::Integer=100,
247-
verbose::Bool=false
247+
verbose::Bool=false,
248+
H = Matrix{Float64}(I,4,4),
248249
)
249250
#
250251
size(X_fix)[2] == 3 || error(""""X_fix" must have 3 columns""")
251252
size(X_mov)[2] == 3 || error(""""X_mov" must have 3 columns""")
252-
correspondences >= 10 || error(""""correspondences" must be >= 10""")
253-
min_planarity >= 0 && min_planarity < 1 || error(""""min_planarity" must be >= 0 and < 1""")
254-
neighbors >= 2 || error(""""neighbors" must be >= 2""")
255-
min_change > 0 || error(""""min_change" must be > 0""")
256-
max_iterations > 0 || error(""""max_iterations" must be > 0""")
253+
10 <= correspondences || error(""""correspondences" must be >= 10""")
254+
0 <= min_planarity < 1 || error(""""min_planarity" must be >= 0 and < 1""")
255+
2 <= neighbors || error(""""neighbors" must be >= 2""")
256+
0 < min_change || error(""""min_change" must be > 0""")
257+
0 < max_iterations || error(""""max_iterations" must be > 0""")
257258

258259
dt = @elapsed begin
259260
verbose && @info "Create point cloud objects ..."
@@ -276,11 +277,12 @@ function alignICP_Simple(
276277
verbose && @info "Estimate normals of selected points ..."
277278
estimate_normals!(pcfix, neighbors)
278279

279-
H = Matrix{Float64}(I,4,4)
280280
residual_distances = Any[]
281281

282282
verbose && @info "Start iterations ..."
283+
count = 0
283284
for i in 1:max_iterations
285+
count += 1
284286
initial_distances = matching!(pcmov, pcfix)
285287
reject!(pcmov, pcfix, min_planarity, initial_distances)
286288
dH, residuals = estimate_rigid_body_transformation(
@@ -290,7 +292,7 @@ function alignICP_Simple(
290292

291293
push!(residual_distances, residuals)
292294
transform!(pcmov, dH)
293-
H = dH*H
295+
H .= dH*H
294296
pcfix.sel = sel_orig
295297
if i > 1
296298
if check_convergence_criteria(residual_distances[i], residual_distances[i-1],
@@ -324,7 +326,8 @@ function alignICP_Simple(
324326

325327
X_mov_transformed = [pcmov.x pcmov.y pcmov.z]
326328

327-
return H, X_mov_transformed
329+
stat = (;residual_mean=mean(residual_distances[end]), correspondences=length(residual_distances[end]),residual_std=std(residual_distances[end]), iterations=count)
330+
return H, X_mov_transformed, stat
328331
end
329332

330333

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
@info "Caesar._PCL is loading tools related to Gadfly.jl."
3+
4+
# import ..Gadfly as GF
5+
6+
## =====================================================================================
7+
## _PCL plotting utils
8+
## =====================================================================================
9+
10+
# NOTE moved pointcloud plotting to and see PR Arena.jl#94
11+
function plotPointCloud(pc::PointCloud)
12+
x = (s->s.data[1]).(pc.points)
13+
y = (s->s.data[2]).(pc.points)
14+
15+
Main.Gadfly.plot(x=x,y=y, Main.Gadfly.Geom.point)
16+
end

src/3rdParty/_PCL/services/PointCloud.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,21 @@ function PCLPointCloud2(cloud::PointCloud{T,P,R}; datatype = _PCL_FLOAT32) where
359359
)
360360
end
361361

362+
## =========================================================================================================
363+
## Useful utils
364+
## =========================================================================================================
365+
366+
367+
function _filterMinRange(
368+
pts::AbstractVector{<:AbstractVector{<:Real}},
369+
minrange::Real,
370+
maxrange::Real
371+
)
372+
# filter pointcloud section of interest
373+
msk = findall(x-> minrange < norm(x) < maxrange, pts)
374+
pts[msk]
375+
end
376+
362377

363378
## =========================================================================================================
364379
## Custom printing

0 commit comments

Comments
 (0)