Skip to content

Commit

Permalink
Merge pull request #24 from JuliaRobotics/rd/new-interp
Browse files Browse the repository at this point in the history
Support new Interpolations.jl behavior
  • Loading branch information
rdeits authored Nov 18, 2018
2 parents 0295e98 + d85c17d commit a215565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ ColorTypes 0.2.0
CoordinateTransformations 0.4.1
OrderedCollections 1.0
GeometryTypes 0.4
Interpolations 0.3.6
Interpolations 0.9
InteractBase 0.8
LoopThrottle 0.0.1
MechanismGeometries 0.0.1
MechanismGeometries 0.1.2
MeshCat 0.2.1
RigidBodyDynamics 0.4
4 changes: 2 additions & 2 deletions src/animate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function animate(vis::MechanismVisualizer,
walltime0 = time()
@throttle framenum while true
t = min(tf, t0 + (time() - walltime0) * realtimerate)
q = interpolated_configurations[t]
q = interpolated_configurations(t)
set_configuration!(state, q)
rbd.normalize_configuration!(state)
_render_state!(vis)
Expand All @@ -43,7 +43,7 @@ function MeshCat.setanimation!(mvis::MechanismVisualizer,
num_frames = floor(Int, (times[end] - first(times)) * fps)
for frame in 0:num_frames
time = first(times) + frame / fps
set_configuration!(state(mvis), interpolated_configurations[time])
set_configuration!(state(mvis), interpolated_configurations(time))
atframe(animation, visualizer(mvis), frame) do frame_visualizer
_render_state!(MechanismVisualizer(state(mvis), frame_visualizer))
end
Expand Down

0 comments on commit a215565

Please sign in to comment.