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

Changes for TORA v0.2.0 #4

Merged
merged 19 commits into from
Jun 3, 2022
Merged

Changes for TORA v0.2.0 #4

merged 19 commits into from
Jun 3, 2022

Conversation

ferrolho
Copy link
Collaborator

@ferrolho ferrolho commented Jun 3, 2022

The diff highlights are:

  • Adds type-stable non-allocating forward and inverse dynamics (with StaticArrays.jl)
  • Fixes a bunch of non-concrete array declarations
  • Deletes copies of third-party robot repositories (and fetches them as artifacts instead)

AFAICT, this includes no breaking changes.

Henrique Ferrolho and others added 19 commits December 15, 2020 16:06
Thanks to @MasonProtter for the help with StaticArrays.jl.

```julia
    function f(x, state, result)
        set_configuration!(state, x)
        set_velocity!(state, x)
        dynamics!(result, state, x)
    end

    x = @svector rand(robot.n_τ)

    # 2.531 μs (0 allocations: 0 bytes)
    @Btime $f($x, $robot.statecache[Float64], $robot.dynamicsresultcache[Float64])

    dx = @mVector zeros(robot.n_q + robot.n_v)
    x = @svector rand(2*robot.n_q + 2*robot.n_v + robot.n_τ)
    h = 0.001

    #  Current: 2.642 μs (0 allocations: 0 bytes)
    # Previous: 3.188 μs (12 allocations: 1.83 KiB)
    @Btime TORA.forward_dynamics_defects!($dx, $robot, $x, $h)
```
`Array{T}` is not a concrete type; replacing them with `Vector{T}`. Could also have used `Array{T,1}`.
```
Before:   2.120 μs (26 allocations: 4.80 KiB)
After:    1.110 μs ( 0 allocations: 0 bytes)
```
git-subtree-dir: kinova-ros
git-subtree-split: 38293ed73bc230e9ca7e7312fc268736821fd9cc
Replacing `Array{Float64,1}` and `Array{Float64,2}` with their aliases, i.e., `Vector{Float64}` and `Matrix{Float64}`, respectively.
…`ros_kortex`

These shall be added as Julia [Artifacts](https://pkgdocs.julialang.org/v1/artifacts/) in the next commit
@ferrolho ferrolho merged commit 2e8c9f2 into JuliaRobotics:main Jun 3, 2022
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