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

Update compat dependencies and add Julia LTS (1.10) to the CI #255

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
version:
- '1.6'
- '1.10'
- '1'
os:
- ubuntu-latest
Expand All @@ -22,11 +23,16 @@ jobs:
arch:
- x64
include:
- os: macOS-latest
arch: arm64
version: 1
Comment on lines +26 to +28
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a new runner for macOS on ARM.

- os: ubuntu-latest
prefix: xvfb-run
exclude:
- os: windows-latest
version: '1.6'
version:
- '1.6'
- '1.10'

steps:
- uses: actions/checkout@v3
Expand Down
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MeshCat"
uuid = "283c5d60-a78f-5afe-a0af-af636b173e11"
authors = ["Robin Deits <[email protected]>"]
version = "0.16.2"
version = "0.16.3"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor version bump for MeshCat.jl


[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down Expand Up @@ -33,13 +33,13 @@ DocStringExtensions = "0.5, 0.6, 0.7, 0.8, 0.9"
FFMPEG = "0.2, 0.3, 0.4"
GeometryBasics = "0.3, 0.4"
HTTP = "1"
Meshing = "0.5, 0.6"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to have

Suggested change
Meshing = "0.5, 0.6"
Meshing = "0.5, 0.6, 0.7"

but Meshing.jl v0.7 breaks the snippets for creating a Mesh using marching cubes.

See my comment here: JuliaGeometry/Meshing.jl#99 (comment)

MeshIO = "0.4"
Meshing = "0.5"
MsgPack = "1"
Parameters = "0.10, 0.11, 0.12"
Parameters = "0.10, 0.11, 0.12, 0.13"
PrecompileTools = "1"
Requires = "0.5, 1"
Rotations = "1.3"
Rotations = "1"
StaticArrays = "0.10, 0.11, 0.12, 1"
Tar = "1"
julia = "1.6"
Expand All @@ -48,8 +48,8 @@ julia = "1.6"
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
Electron = "a1bb12fb-d4d1-54b4-b10a-ee7951ef7ad3"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
Meshing = "e6723b4c-ebff-59f1-b4b7-d97aa5274f73"
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
4 changes: 2 additions & 2 deletions notebooks/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
MeshCat = "283c5d60-a78f-5afe-a0af-af636b173e11"
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
Meshing = "e6723b4c-ebff-59f1-b4b7-d97aa5274f73"
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"

[compat]
Colors = "0.9, 0.10, 0.11, 0.12"
FileIO = "1"
GeometryBasics = "0.3, 0.4"
MeshIO = "0.4"
Meshing = "0.5, 0.6"
MeshIO = "0.4"
6 changes: 3 additions & 3 deletions notebooks/Static HTML Visualizers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.10.2",
"display_name": "Julia 1.11.0",
"language": "julia",
"name": "julia-1.10"
"name": "julia-1.11"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.2"
"version": "1.11.0"
}
},
"nbformat": 4,
Expand Down
33 changes: 18 additions & 15 deletions notebooks/animation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,26 @@
"vis = Visualizer()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are a few different ways of opening the visualizer:\n",
"- In a new browser tab with `open(vis)`.\n",
"- Inside this jupyter notebook with `render(vis)`.\n",
"- In a standalone window with\n",
" ```julia\n",
" import Electron\n",
" open(vis, Electron.Application())\n",
" ```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## To open the visualizer in a new browser tab, do: \n",
"# open(vis)\n",
"\n",
"## To open the visualizer inside this jupyter notebook, do: \n",
"# render(vis)\n",
"\n",
"## To open this visualizer in a standalone window, do:\n",
"# import Electron\n",
"# open(vis, Electron.Application())\n",
"\n",
"render(vis)"
]
},
Expand Down Expand Up @@ -265,8 +269,7 @@
"metadata": {},
"outputs": [],
"source": [
"# MeshCat.convert_frames_to_video(\n",
"# \"/home/rdeits/Downloads/meshcat_1528401494656.tar\")"
"# MeshCat.convert_frames_to_video(expanduser(\"~/Downloads/meshcat_1528401494656.tar\"))"
]
}
],
Expand All @@ -276,15 +279,15 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.10.2",
"display_name": "Julia 1.11.0",
"language": "julia",
"name": "julia-1.10"
"name": "julia-1.11"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.2"
"version": "1.11.0"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions notebooks/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -530,15 +530,15 @@
"lastKernelId": null
},
"kernelspec": {
"display_name": "Julia 1.10.2",
"display_name": "Julia 1.11.0",
"language": "julia",
"name": "julia-1.10"
"name": "julia-1.11"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.2"
"version": "1.11.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion test/notebook.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using NBInclude
@nbinclude(joinpath(@__DIR__, "..", "notebooks", "demo.ipynb"))
@nbinclude(joinpath(@__DIR__, "..", "notebooks", "animation.ipynb"))
# @nbinclude(joinpath(@__DIR__, "..", "notebooks", "animation.ipynb"))
Copy link
Collaborator Author

@ferrolho ferrolho Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some issue with animations that I haven't figured out how to fix. Running ]test passes if animation.ipynb is commented and fails if this line is uncommented.

Here is the stack trace:

Stacktrace
MeshCat: Error During Test at /Users/henrique/git/MeshCat.jl/test/runtests.jl:12
  Got exception outside of a @test
  LoadError: MethodError: no method matching active_module()
  You may have intended to import Base.active_module
  The applicable method may be too new: running in world age 26682, while current world is 26743.

  Closest candidates are:
    active_module(::REPL.LineEditREPL) (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:595
    active_module() (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
    active_module(::REPL.REPLDisplay) (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:597
    ...

  Stacktrace:
    [1] #invokelatest#2
      @ ./essentials.jl:1054 [inlined]
    [2] invokelatest
      @ ./essentials.jl:1051 [inlined]
    [3] active_module
      @ ./show.jl:519 [inlined]
    [4] show_type_name(io::IOContext{IOBuffer}, tn::Core.TypeName)
      @ Base ./show.jl:1058
    [5] _show_type(io::IOContext{IOBuffer}, x::Type)
      @ Base ./show.jl:973
    [6] show(io::IOContext{IOBuffer}, x::Type)
      @ Base ./show.jl:970
    [7] show_delim_array(io::IOBuffer, itr::Tuple{DataType}, op::Char, delim::Char, cl::Char, delim_one::Bool, i1::Int64, n::Int64)
      @ Base ./show.jl:1435
    [8] show_delim_array
      @ ./show.jl:1420 [inlined]
    [9] show
      @ ./show.jl:1453 [inlined]
   [10] print(io::IOBuffer, x::Tuple{DataType})
      @ Base ./strings/io.jl:35
   [11] print_to_string(::String, ::Vararg{Any})
      @ Base ./strings/io.jl:148
   [12] string
      @ ./strings/io.jl:189 [inlined]
   [13] __overdub_generator__(world::UInt64, source::LineNumberNode, self::Type, context_type::Type, args::Tuple{DataType})
      @ Cassette ~/.julia/packages/Cassette/4UsSX/src/overdub.jl:619
   [14] atframe(f::Function, animation::Animation, frame::Int64)
      @ MeshCat ~/git/MeshCat.jl/src/atframe.jl:100
   [15] top-level scope
      @ ~/git/MeshCat.jl/notebooks/animation.ipynb:In[+6]:3
   [16] eval
      @ ./boot.jl:430 [inlined]
   [17] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base ./loading.jl:2628
   [18] include_string
      @ ./loading.jl:2638 [inlined]
   [19] my_include_string(m::Module, s::String, path::String, prev::String, softscope::Bool)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:30
   [20] #2
      @ ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:93 [inlined]
   [21] task_local_storage(body::NBInclude.var"#2#3"{Bool, Module, String, String, String, String}, key::Symbol, val::Bool)
      @ Base ./task.jl:315
   [22] nbinclude(m::Module, path::String; renumber::Bool, counters::UnitRange{Int64}, regex::Regex, anshook::typeof(identity), softscope::Bool)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:92
   [23] nbinclude(m::Module, path::String)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:57
   [24] top-level scope
      @ ~/git/MeshCat.jl/test/notebook.jl:3
   [25] include(fname::String)
      @ Main ./sysimg.jl:38
   [26] macro expansion
      @ ~/git/MeshCat.jl/test/runtests.jl:16 [inlined]
   [27] macro expansion
      @ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Test/src/Test.jl:1700 [inlined]
   [28] top-level scope
      @ ~/git/MeshCat.jl/test/runtests.jl:16
   [29] include(fname::String)
      @ Main ./sysimg.jl:38
   [30] top-level scope
      @ none:6
   [31] eval
      @ ./boot.jl:430 [inlined]
   [32] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:296
   [33] _start()
      @ Base ./client.jl:531
  in expression starting at /Users/henrique/git/MeshCat.jl/notebooks/animation.ipynb:In[+6]:3
  in expression starting at /Users/henrique/git/MeshCat.jl/test/notebook.jl:3

  caused by: MethodError: no method matching active_module()
  You may have intended to import Base.active_module
  The applicable method may be too new: running in world age 26682, while current world is 26743.

  Closest candidates are:
    active_module(::REPL.LineEditREPL) (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:595
    active_module() (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:591
    active_module(::REPL.REPLDisplay) (method too new to be called from this world context.)
     @ REPL ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/REPL/src/REPL.jl:597
    ...

  Stacktrace:
    [1] #invokelatest#2
      @ ./essentials.jl:1054 [inlined]
    [2] invokelatest
      @ ./essentials.jl:1051 [inlined]
    [3] active_module
      @ ./show.jl:519 [inlined]
    [4] show_type_name(io::IOContext{IOBuffer}, tn::Core.TypeName)
      @ Base ./show.jl:1058
    [5] _show_type(io::IOContext{IOBuffer}, x::Type)
      @ Base ./show.jl:973
    [6] show(io::IOContext{IOBuffer}, x::Type)
      @ Base ./show.jl:970
    [7] print(io::IOContext{IOBuffer}, x::Type)
      @ Base ./strings/io.jl:35
    [8] print(::IOContext{IOBuffer}, ::String, ::Type, ::Vararg{Any})
      @ Base ./strings/io.jl:46
    [9] print_within_stacktrace(::IOContext{IOBuffer}, ::String, ::Vararg{Any}; color::Symbol, bold::Bool)
      @ Base ./show.jl:0
   [10] print_within_stacktrace
      @ ./show.jl:2549 [inlined]
   [11] show_signature_function(io::IOContext{IOBuffer}, ft::Any, demangle::Bool, fargname::String, html::Bool, qualified::Bool)
      @ Base ./show.jl:2543
   [12] show_tuple_as_call(out::IOBuffer, name::Symbol, sig::Type; demangle::Bool, kwargs::Nothing, argnames::Nothing, qualified::Bool, hasfirst::Bool)
      @ Base ./show.jl:2577
   [13] show_tuple_as_call(out::IOBuffer, name::Symbol, sig::Type)
      @ Base ./show.jl:2557
   [14] sprint(::Function, ::Symbol, ::Vararg{Any}; context::Nothing, sizehint::Int64)
      @ Base ./strings/io.jl:114
   [15] sprint
      @ ./strings/io.jl:107 [inlined]
   [16] verbose_lineinfo!(ci::Core.CodeInfo, sig::Type{<:Tuple})
      @ Cassette ~/.julia/packages/Cassette/4UsSX/src/overdub.jl:56
   [17] reflect(sigtypes::Tuple, world::UInt64)
      @ Cassette ~/.julia/packages/Cassette/4UsSX/src/overdub.jl:128
   [18] __overdub_generator__(world::UInt64, source::LineNumberNode, self::Type, context_type::Type, args::Tuple{DataType})
      @ Cassette ~/.julia/packages/Cassette/4UsSX/src/overdub.jl:612
   [19] atframe(f::Function, animation::Animation, frame::Int64)
      @ MeshCat ~/git/MeshCat.jl/src/atframe.jl:100
   [20] top-level scope
      @ ~/git/MeshCat.jl/notebooks/animation.ipynb:In[+6]:3
   [21] eval
      @ ./boot.jl:430 [inlined]
   [22] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
      @ Base ./loading.jl:2628
   [23] include_string
      @ ./loading.jl:2638 [inlined]
   [24] my_include_string(m::Module, s::String, path::String, prev::String, softscope::Bool)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:30
   [25] #2
      @ ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:93 [inlined]
   [26] task_local_storage(body::NBInclude.var"#2#3"{Bool, Module, String, String, String, String}, key::Symbol, val::Bool)
      @ Base ./task.jl:315
   [27] nbinclude(m::Module, path::String; renumber::Bool, counters::UnitRange{Int64}, regex::Regex, anshook::typeof(identity), softscope::Bool)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:92
   [28] nbinclude(m::Module, path::String)
      @ NBInclude ~/.julia/packages/NBInclude/pfsyO/src/NBInclude.jl:57
   [29] top-level scope
      @ ~/git/MeshCat.jl/test/notebook.jl:3
   [30] include(fname::String)
      @ Main ./sysimg.jl:38
   [31] macro expansion
      @ ~/git/MeshCat.jl/test/runtests.jl:16 [inlined]
   [32] macro expansion
      @ ~/.julia/juliaup/julia-1.11.0+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Test/src/Test.jl:1700 [inlined]
   [33] top-level scope
      @ ~/git/MeshCat.jl/test/runtests.jl:16
   [34] include(fname::String)
      @ Main ./sysimg.jl:38
   [35] top-level scope
      @ none:6
   [36] eval
      @ ./boot.jl:430 [inlined]
   [37] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:296
   [38] _start()
      @ Base ./client.jl:531
Test Summary: | Error  Total   Time
MeshCat       |     1      1  17.2s
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/henrique/git/MeshCat.jl/test/runtests.jl:12
ERROR: Package MeshCat errored during testing

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh. It looks like Cassette hasn't been updated in the last few years, so it may just be starting to lose compatibility with modern Julia versions (it's pretty deeply tied into the behavior of the compiler, AFAIK). That error looks like it's pointing here: https://github.com/JuliaLabs/Cassette.jl/blob/44ae68ec0943523acae7134e13849aebefa72d8e/src/overdub.jl#L619 so there's some other error that we're not seeing which triggered an error while trying to print out its error message.

I wonder if this is mostly an issue with @nbinclude, which is doing its own eval stuff. Would you mind checking if putting that notebook's content into a normal .jl file and includeing it works?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we just had to wait a bit — https://github.com/JuliaLabs/Cassette.jl/releases/tag/v0.3.14 is no longer giving an error.

I wonder though, since we are only using Cassette.jl for these few lines

Cassette.@context AnimationCtx
function Cassette.overdub(ctx::AnimationCtx, ::typeof(settransform!), vis::Visualizer, tform::Transformation)
animation, frame = ctx.metadata
clip = getclip!(animation, vis.path)
_setprop!(clip, frame, "scale", "vector3", js_scaling(tform))
_setprop!(clip, frame, "position", "vector3", js_position(tform))
_setprop!(clip, frame, "quaternion", "quaternion", js_quaternion(tform))
end
function Cassette.overdub(ctx::AnimationCtx, ::typeof(setprop!), vis::Visualizer, prop::AbstractString, value)
animation, frame = ctx.metadata
clip = getclip!(animation, vis.path)
_setprop!(clip, frame, prop, get_property_type(prop), value)
end
function Cassette.overdub(ctx::AnimationCtx, ::typeof(setprop!), vis::Visualizer, prop::AbstractString, jstype::AbstractString, value)
animation, frame = ctx.metadata
clip = getclip!(animation, vis.path)
_setprop!(clip, frame, prop, jstype, value)
end
can we achieve the same without the use of Cassette.jl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, even though MeshCat.jl seems good now, there is a problem when using it with MeshCatMechanisms.jl. 😭

Here is a minimum working example that shows the problem:

using MeshCat
using MeshCatMechanisms
using RigidBodyDynamics

urdf = joinpath(dirname(pathof(MeshCatMechanisms)), "..", "test", "urdf", "Acrobot.urdf")
robot = parse_urdf(urdf)
vis = Visualizer()

mvis = MechanismVisualizer(robot, URDFVisuals(urdf), vis)
state = MechanismState(robot, randn(2), randn(2))

t, q, v = simulate(state, 5.0)
animation = Animation(mvis, t, q)
The function body AST defined by this @generated function is not pure. This likely means it contains a closure, a comprehension or a generator.
Stacktrace
Stacktrace:
  [1] StringMemory(::Int64)
    @ ./iobuffer.jl:44 [inlined]
  [2] StringMemory
    @ ./iobuffer.jl:44 [inlined]
  [3] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(Base.StringMemory), ::Int64)
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
  [4] #IOBuffer#519
    @ ./iobuffer.jl:128 [inlined]
  [5] recurse(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::Base.var"##IOBuffer#519", ::Bool, ::Bool, ::Nothing, ::Bool, ::Int64, ::Int64, ::Type{IOBuffer})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
  [6] kwcall(::@NamedTuple{sizehint::Int64}, ::Type{IOBuffer})
    @ ./iobuffer.jl:119 [inlined]
  [7] GenericIOBuffer
    @ ./iobuffer.jl:119 [inlined]
  [8] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(Core.kwcall), ::@NamedTuple{sizehint::Int64}, ::Type{IOBuffer})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
  [9] print_to_string
    @ ./strings/io.jl:146 [inlined]
 [10] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(Base.print_to_string), ::RigidBody{Float64})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [11] string(::RigidBody{Float64})
    @ ./strings/io.jl:189 [inlined]
 [12] string
    @ ./strings/io.jl:189 [inlined]
 [13] _broadcast_getindex_evalf(::typeof(string), ::RigidBody{Float64})
    @ ./broadcast.jl:673 [inlined]
 [14] _broadcast_getindex_evalf
    @ ./broadcast.jl:673 [inlined]
 [15] _broadcast_getindex
    @ ./broadcast.jl:646 [inlined]
 [16] getindex
    @ ./broadcast.jl:605 [inlined]
 [17] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(getindex), ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}}, typeof(string), Tuple{Base.Broadcast.Extruded{Vector{RigidBody{Float64}}, Tuple{Bool}, Tuple{Int64}}}}, ::Int64)
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [18] macro expansion
    @ ./broadcast.jl:968 [inlined]
 [19] macro expansion
    @ ./simdloop.jl:77 [inlined]
 [20] copyto!
    @ ./broadcast.jl:967 [inlined]
 [21] copyto!(::Vector{String}, ::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, typeof(string), Tuple{Vector{RigidBody{Float64}}}})
    @ ./broadcast.jl:920 [inlined]
 [22] copyto!
    @ ./broadcast.jl:920 [inlined]
 [23] copy
    @ ./broadcast.jl:892 [inlined]
 [24] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(string), Tuple{Vector{RigidBody{Float64}}}})
    @ ./broadcast.jl:867 [inlined]
 [25] materialize
    @ ./broadcast.jl:867 [inlined]
 [26] _path
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:130 [inlined]
 [27] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(MeshCatMechanisms._path), ::Mechanism{Float64}, ::RigidBody{Float64})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [28] getindex(::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, ::RigidBody{Float64})
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:48 [inlined]
 [29] getindex
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:48 [inlined]
 [30] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(getindex), ::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, ::RigidBody{Float64})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [31] _render_state!
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:147 [inlined]
 [32] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(MeshCatMechanisms._render_state!), ::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, ::MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [33] _render_state!(::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer})
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:135 [inlined]
 [34] _render_state!
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:135 [inlined]
 [35] set_configuration!
    @ ~/git/MeshCatMechanisms.jl/src/visualizer.jl:168 [inlined]
 [36] overdub(::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, ::typeof(set_configuration!), ::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, ::Vector{Float64})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [37] (::MeshCatMechanisms.var"
    @ ~/git/MeshCatMechanisms.jl/src/animate.jl:45 [inlined]
 [38] #5
    @ ~/git/MeshCatMechanisms.jl/src/animate.jl:45 [inlined]
 [39] overdub(overdub_context#230::Cassette.Context{MeshCat.var"##AnimationCtx#Name", Tuple{Animation, Int64}, Nothing, Cassette.var"##PassType#232", Nothing, Nothing}, overdub_arguments#231::MeshCatMechanisms.var"#5#6"{MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, Interpolations.GriddedInterpolation{Vector{Float64}, 1, Vector{SegmentedVector{JointID, Float64, Base.OneTo{JointID}, Vector{Float64}}}, Interpolations.Gridded{Interpolations.Linear{Interpolations.Throw{Interpolations.OnGrid}}}, Tuple{Vector{Float64}}}, Float64})
    @ Cassette ~/.julia/packages/Cassette/ROd5e/src/overdub.jl:0
 [40] atframe
    @ ~/.julia/packages/MeshCat/kXwul/src/atframe.jl:100 [inlined]
 [41] Animation(mvis::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, times::Vector{Float64}, configurations::Vector{SegmentedVector{JointID, Float64, Base.OneTo{JointID}, Vector{Float64}}}; fps::Int64)
    @ MeshCatMechanisms ~/git/MeshCatMechanisms.jl/src/animate.jl:44
 [42] Animation(mvis::MechanismVisualizer{MechanismState{Float64, Float64, Float64, TypeSortedCollections.TypeSortedCollection{Tuple{Vector{Joint{Float64, Revolute{Float64}}}}, 1}}, Visualizer}, times::Vector{Float64}, configurations::Vector{SegmentedVector{JointID, Float64, Base.OneTo{JointID}, Vector{Float64}}})
    @ MeshCatMechanisms ~/git/MeshCatMechanisms.jl/src/animate.jl:33
 [43] top-level scope
    @ In[10]:13

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we achieve the same without the use of Cassette.jl?

Yeah, I think that's a good question. For context, here's the change where we added cassette: #112 . It definitely improved the usability of the animation API, but it might not be worth the complexity we've added by depending on such an invasive tool.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed... As I get older I am realising that the least libraries something depends on the better. 😅

Loading