rdeits / MeshCat.jl

WebGL-based 3D visualizer in Julia
MIT License
233 stars 42 forks source link

Animation not executed #149

Closed janbruedigam closed 4 years ago

janbruedigam commented 4 years ago

When running an animation, objects are created and displayed in their initial configuration, but no transformations are executed. I also don't see the "default" tab and respective buttons (play, pause, reset, timeScale) in the "Animations" tab of the control pane of the visualizer. Version v0.9.1 works for me, v0.10.0 does not. Specifically, the code up to commit 8d743b7 works for me, from f1949ec on it does not.

I'm using Julia v1.4 (but had the same issue on v1.3), VS Code (same issue on Atom), and Windows 10 (64 bit)

A minimal not-working example would be the code from the animation notebook (tried both the default visualizer and Blink):

using Blink, MeshCat, GeometryTypes, CoordinateTransformations

vis = Visualizer()
open(vis, Blink.Window())
# open(vis)

setobject!(vis[:box1], 
    HyperRectangle(Vec(0., 0, 0), Vec(0.1, 0.2, 0.3)))

anim = Animation()

atframe(anim, 0) do
    settransform!(vis[:box1], Translation(0., 0, 0))
end
atframe(anim, 30) do
    settransform!(vis[:box1], Translation(0., 1, 0))
end

setanimation!(vis, anim)
rdeits commented 4 years ago

Thanks for reporting this! I just downloaded a clean copy of the latest master branch and tried your example, and it worked correctly (on Linux with Julia 1.3.1). I'm not sure yet what's causing the problem on your system. I'll try installing v0.10.0 on Windows and see if it works for me.

Meanwhile, can you try running ]build MeshCat and then restarting Julia? I wonder if your meshcat javascript assets somehow got out of date.

janbruedigam commented 4 years ago

Thanks for looking into it! ]build MeshCat and restarting sadly didn't help.

rdeits commented 4 years ago

I just installed the latest master branch on a clean Windows 10 install of Julia 1.4. Your example works correctly for me--the animation plays and the controls show up as expected. I'm increasingly confused about what could be going wrong in your case.

janbruedigam commented 4 years ago

I reinstalled Julia 1.4 and only the packages required for the example but still have the same issue. I'll try it on a clean Windows 10 install at a later time (in a few weeks), I'll let you know.

rdeits commented 4 years ago

You've only tried this on Windows, right? I wonder if this could be some weird antivirus thing that's blocking local websocket traffic...

janbruedigam commented 4 years ago

I'm also confused now: Just tried to run the example on Linux (external drive on the same computer) and it fails at the same commit as before. I also ran the example on another Windows machine and have the same issue. Also, disabling the firewall on Windows did not help. I guess it's not a Windows issue then?

janbruedigam commented 4 years ago

Works perfectly now on v0.11.2, no idea what the issue was though.