Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RigidBodyDynamics.jl v2.5.0 #646

Merged
merged 4 commits into from
Nov 8, 2024
Merged

RigidBodyDynamics.jl v2.5.0 #646

merged 4 commits into from
Nov 8, 2024

Conversation

ferrolho
Copy link
Member

@ferrolho ferrolho commented Nov 6, 2024

This is my proposal for RigidBodyDynamics.jl 2.5.0.

Summary of changes

  • Fixes GitHub CI
    • Update GitHub CI workflow and .gitignore files
      • Now running on Julia 1.9, 1.10 (LTS) and 1.11
    • Update Manifest.toml of all examples/
    • Remove examples/Manifest.toml
    • Test notebooks only on Julia 1.9 — temporary
  • Update benchmark results
  • Use numerically robust norm
  • Add WrenchesCache

Issues and PRs that can be closed after this is merged

ferrolho and others added 4 commits November 6, 2024 11:49
- Update GitHub CI workflow and .gitignore
- Update Manifest.toml of all examples
- Remove examples/Manifest.toml
- Test notebooks only on Julia 1.9 (temporary)
This PR is mostly a FYI regarding JuliaArrays/StaticArrays.jl#913
Depending on whether or not that issue is closed, you may want to switch to explicitly calling `generic_norm2` on static vectors to circumvent the accuracy issue. The issue arises when combining static arrays with ForwardDiff, in our case it occured in `exp(::SkewSymmetric)`.

I did some benchmarking, and `generic_norm2` is faster than `norm` for all standard arrays up to at least length 9. For static arrays, it appears to do okay as well, while avoiding the accuracy issue.
```julia
julia> a
3-element SVector{3, Int64} with indices SOneTo(3):
 1
 2
 3

julia> @Btime norm($(Ref(a))[]) # standard norm of static array
  5.135 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime norm($(Ref(Vector(a)))[]) # standard norm of  array
  8.545 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime LinearAlgebra.generic_norm2($(Ref((a)))[]) # generic_norm2 of static array
  4.490 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime LinearAlgebra.generic_norm2($(Ref(Vector(a)))[]) # generic_norm2 of array
  7.671 ns (0 allocations: 0 bytes)
3.74166

```
@ferrolho
Copy link
Member Author

ferrolho commented Nov 6, 2024

@rdeits I can't edit the list of reviewers, so I'm tagging you in this comment instead. 😛

@rdeits
Copy link
Collaborator

rdeits commented Nov 8, 2024

Thanks for putting this all together! I think we may be able to revert back to norm() after this is merged (looks like the StaticArrays issue was fixed long ago).

@rdeits rdeits merged commit d6df4eb into JuliaRobotics:master Nov 8, 2024
7 checks passed
@ferrolho ferrolho deleted the hf/dev branch November 8, 2024 10:51
@ferrolho
Copy link
Member Author

ferrolho commented Nov 8, 2024

Thanks for putting this all together! I think we may be able to revert back to norm() after this is merged (looks like the StaticArrays issue was fixed long ago).

You are right. I have opened #647 to revert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants