Skip to content

Commit

Permalink
Merge pull request #8 from JuliaRobotics/more-overloads
Browse files Browse the repository at this point in the history
overload open() and wait() for mechvis
  • Loading branch information
rdeits authored Mar 19, 2018
2 parents fc5b696 + 9702aed commit b1e9e1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/visualizer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ function rbd.set_configuration!(mvis::MechanismVisualizer, args...)
_render_state!(mvis)
end

MeshCat.IJuliaCell(mvis::MechanismVisualizer) = MeshCat.IJuliaCell(mvis.visualizer)
MeshCat.IJuliaCell(mvis::MechanismVisualizer) = MeshCat.IJuliaCell(mvis.visualizer)
Base.open(mvis::MechanismVisualizer) = open(mvis.visualizer)
Base.wait(mvis::MechanismVisualizer) = wait(mvis.visualizer)
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ using ValkyrieRobot
using NBInclude

vis = Visualizer()
if !haskey(ENV, "CI")
open(vis)
wait(vis)
end

@testset "MeshCatMechanisms" begin
@testset "URDF mechanism" begin
urdf = joinpath(@__DIR__, "urdf", "Acrobot.urdf")
robot = parse_urdf(Float64, urdf)
mvis = MechanismVisualizer(robot, URDFVisuals(urdf), vis)
if !haskey(ENV, "CI")
open(mvis)
wait(mvis)
end
set_configuration!(mvis, [1.0, -0.5])

@testset "simulation and animation" begin
Expand Down

0 comments on commit b1e9e1c

Please sign in to comment.