Skip to content

Commit d6df4eb

Browse files
authored
Merge pull request #646 from ferrolho/hf/dev
RigidBodyDynamics.jl v2.5.0
2 parents 7cd36b9 + 6e694d7 commit d6df4eb

File tree

20 files changed

+1843
-1382
lines changed

20 files changed

+1843
-1382
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: CI
2+
3+
# Run on master, tags, or any pull request
24
on:
35
push:
46
branches:
@@ -15,21 +17,31 @@ jobs:
1517
fail-fast: false
1618
matrix:
1719
version:
18-
- '1.6'
19-
- '1'
20+
- 'lts'
21+
- '1.9' # Temporary for notebooks
22+
- '1.11'
2023
os:
2124
- ubuntu-latest
22-
- macOS-latest
23-
- windows-latest
2425
arch:
2526
- x64
27+
include:
28+
- os: macOS-latest
29+
version: 1.11
30+
arch: arm64
31+
- os: macOS-latest
32+
version: 1.11
33+
arch: x64
34+
- os: windows-latest
35+
version: 1.11
36+
arch: x64
37+
2638
steps:
27-
- uses: actions/checkout@v2
28-
- uses: julia-actions/setup-julia@v1
39+
- uses: actions/checkout@v4
40+
- uses: julia-actions/setup-julia@v2
2941
with:
3042
version: ${{ matrix.version }}
3143
arch: ${{ matrix.arch }}
32-
- uses: actions/cache@v1
44+
- uses: actions/cache@v3
3345
env:
3446
cache-name: cache-artifacts
3547
CI: true
@@ -40,15 +52,15 @@ jobs:
4052
${{ runner.os }}-test-${{ env.cache-name }}-
4153
${{ runner.os }}-test-
4254
${{ runner.os }}-
43-
- uses: julia-actions/julia-buildpkg@v1
55+
- uses: julia-actions/julia-buildpkg@latest
4456
- uses: julia-actions/julia-runtest@v1
45-
env:
46-
PYTHON: ""
47-
JULIA_NUM_THREADS: "2"
57+
with:
58+
prefix: ${{ matrix.prefix }}
4859
- uses: julia-actions/julia-processcoverage@v1
49-
- uses: codecov/codecov-action@v1
60+
- uses: codecov/codecov-action@v2
5061
with:
5162
file: lcov.info
63+
5264
docs:
5365
name: Documentation
5466
runs-on: ubuntu-latest

.gitignore

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
# Files generated by invoking Julia with --code-coverage
12
*.jl.cov
23
*.jl.*.cov
4+
5+
# Files generated by invoking Julia with --track-allocation
36
*.jl.mem
7+
8+
# System-specific files and directories generated by the BinaryProvider and BinDeps packages
9+
# They contain absolute paths specific to the host computer, and so should not be committed
410
deps/deps.jl
5-
*.ipynb_checkpoints
11+
deps/build.log
12+
deps/downloads/
13+
deps/usr/
14+
deps/src/
15+
16+
# Build artifacts for creating documentation generated by the Documenter package
617
docs/build/
718
docs/site/
8-
perf/benchmarkparams.jld
9-
/Manifest.toml
1019

20+
# File generated by Pkg, the package manager, based on a corresponding Project.toml
21+
# It records a fixed state of all packages used by the project. As such, it should not be
22+
# committed for packages, but should be committed for applications that require a static
23+
# environment.
24+
Manifest.toml
25+
26+
# Jupyter
27+
.ipynb_checkpoints/

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "RigidBodyDynamics"
22
uuid = "366cf18f-59d5-5db9-a4de-86a9f6786172"
3-
version = "2.4.0"
3+
version = "2.5.0"
44

55
[deps]
66
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
@@ -19,8 +19,8 @@ UnsafeArrays = "c4a57d5a-5b31-53a6-b365-19f8c011fbd6"
1919
DocStringExtensions = "0.4.1, 0.5, 0.6, 0.7, 0.8, 0.9"
2020
LightXML = "0.8, 0.9"
2121
LoopThrottle = "0.1"
22-
Reexport = "0.2, 1.0"
23-
Rotations = "1.1 - 1.2"
22+
Reexport = "0.2, 1"
23+
Rotations = "1"
2424
StaticArrays = "0.8, 0.9, 0.10, 0.11, 0.12, 1"
2525
TypeSortedCollections = "1"
2626
UnsafeArrays = "1"

docs/src/benchmarks.md

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Benchmarks
22

3-
To attain maximal performance, it is recommended to pass `-O3`, `--check-bounds=no` as command line flags to `julia`. As of Julia 1.1, maximizing performance for the `dynamics!` algorithm requires either setting the number of BLAS threads to 1 (`using LinearAlgebra; BLAS.set_num_threads(1)`) if using OpenBLAS (the default), or compiling Julia with MKL. See [this issue](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/issues/500) for more information.
3+
To attain maximal performance, it is recommended to pass `-O3` and `--check-bounds=no` as command line flags to `julia`:
4+
5+
```bash
6+
cd RigidBodyDynamics.jl
7+
julia -O3 --check-bounds=no perf/runbenchmarks.jl
8+
```
9+
10+
> **Warning**
11+
> For Julia versions previous to `v1.8`, maximizing performance for the `dynamics!` algorithm requires either setting the number of BLAS threads to 1 (`using LinearAlgebra; BLAS.set_num_threads(1)`) if using OpenBLAS (the default), or compiling Julia with MKL. See [this issue](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/issues/500) for more information.
412
513
Run `perf/runbenchmarks.jl` to see benchmark results for the Atlas robot (v5). Results below are for the following scenarios:
614

@@ -9,69 +17,62 @@ Run `perf/runbenchmarks.jl` to see benchmark results for the Atlas robot (v5). R
917
3. Do inverse dynamics.
1018
4. Do forward dynamics.
1119

12-
Note that results on CI builds are **not at all** representative because of code coverage. Results on a reasonably fast laptop at commit [870bea6](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/commit/870bea668d5b11ce0555fa0552592d2c3cb15c54):
20+
> **Note**
21+
> Results on CI builds are **not at all** representative because of code coverage.
1322
14-
Output of `versioninfo()`:
23+
Below are the results for **RBD.jl 2.5.0** (commit [`93a5ea`](https://github.com/JuliaRobotics/RigidBodyDynamics.jl/commit/93a5eaf15a5f6714b1ec1ce621b053542dcb721d)) using **Julia 1.11.1** on an **Apple MacBook Air (M2, 2023)** (16GB RAM, 512GB SSD):
1524

25+
Output of `versioninfo()`:
1626
```
17-
Julia Version 1.5.3
18-
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
27+
Julia Version 1.11.1
28+
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
29+
Build Info:
30+
Official https://julialang.org/ release
1931
Platform Info:
20-
OS: macOS (x86_64-apple-darwin18.7.0)
21-
CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
32+
OS: macOS (arm64-apple-darwin22.4.0)
33+
CPU: 8 × Apple M2
2234
WORD_SIZE: 64
23-
LIBM: libopenlibm
24-
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
35+
LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
36+
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
2537
```
2638

27-
Note that this is a different machine than the one that was used for earlier benchmarks.
28-
29-
Mass matrix:
39+
> **Note**
40+
> This is a different machine than the one that was used for earlier benchmarks.
3041
42+
Mass matrix ([`mass_matrix!`](@ref)):
3143
```
32-
memory estimate: 0 bytes
33-
allocs estimate: 0
34-
--------------
35-
minimum time: 4.415 μs (0.00% GC)
36-
median time: 4.579 μs (0.00% GC)
37-
mean time: 4.916 μs (0.00% GC)
38-
maximum time: 19.794 μs (0.00% GC)
44+
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
45+
Range (min … max): 3.728 μs … 10.024 μs ┊ GC (min … max): 0.00% … 0.00%
46+
Time (median): 3.874 μs ┊ GC (median): 0.00%
47+
Time (mean ± σ): 3.903 μs ± 180.208 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
48+
Memory estimate: 0 bytes, allocs estimate: 0.
3949
```
4050

41-
Mass matrix and Jacobian from left hand to right foot:
42-
51+
Mass matrix ([`mass_matrix!`](@ref)) and Jacobian ([`geometric_jacobian!`](@ref)) from left hand to right foot:
4352
```
44-
memory estimate: 0 bytes
45-
allocs estimate: 0
46-
--------------
47-
minimum time: 4.860 μs (0.00% GC)
48-
median time: 4.982 μs (0.00% GC)
49-
mean time: 5.399 μs (0.00% GC)
50-
maximum time: 24.712 μs (0.00% GC)
53+
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
54+
Range (min … max): 3.941 μs … 9.020 μs ┊ GC (min … max): 0.00% … 0.00%
55+
Time (median): 4.103 μs ┊ GC (median): 0.00%
56+
Time (mean ± σ): 4.135 μs ± 196.842 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
57+
Memory estimate: 0 bytes, allocs estimate: 0.
5158
```
5259

5360
Note the low additional cost of computing a Jacobian when the mass matrix is already computed. This is because RigidBodyDynamics.jl caches intermediate computation results.
5461

55-
Inverse dynamics:
56-
62+
Inverse dynamics ([`inverse_dynamics!`](@ref)):
5763
```
58-
memory estimate: 0 bytes
59-
allocs estimate: 0
60-
--------------
61-
minimum time: 4.256 μs (0.00% GC)
62-
median time: 4.541 μs (0.00% GC)
63-
mean time: 4.831 μs (0.00% GC)
64-
maximum time: 21.625 μs (0.00% GC)
64+
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
65+
Range (min … max): 2.736 μs … 5.666 μs ┊ GC (min … max): 0.00% … 0.00%
66+
Time (median): 2.866 μs ┊ GC (median): 0.00%
67+
Time (mean ± σ): 2.882 μs ± 119.781 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
68+
Memory estimate: 0 bytes, allocs estimate: 0.
6569
```
6670

67-
Forward dynamics:
68-
71+
Forward dynamics ([`dynamics!`](@ref)):
6972
```
70-
memory estimate: 0 bytes
71-
allocs estimate: 0
72-
--------------
73-
minimum time: 13.600 μs (0.00% GC)
74-
median time: 14.419 μs (0.00% GC)
75-
mean time: 16.071 μs (0.00% GC)
76-
maximum time: 55.328 μs (0.00% GC)
73+
BenchmarkTools.Trial: 10000 samples with 10 evaluations.
74+
Range (min … max): 9.791 μs … 13.899 μs ┊ GC (min … max): 0.00% … 0.00%
75+
Time (median): 9.874 μs ┊ GC (median): 0.00%
76+
Time (mean ± σ): 9.942 μs ± 292.126 ns ┊ GC (mean ± σ): 0.00% ± 0.00%
77+
Memory estimate: 0 bytes, allocs estimate: 0.
7778
```

examples/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
**/*.ipynb
22
**/*.md
3-

0 commit comments

Comments
 (0)