JuliaRobotics / MeshCatMechanisms.jl

3D Visualization of mechanisms and URDFs using MeshCat.jl and RigidBodyDynamics.jl
Other
40 stars 10 forks source link

mvis without any geometries #65

Closed JurajLieskovsky closed 3 years ago

JurajLieskovsky commented 3 years ago

Hi,

Is there a way to initialize a MechanismVisualizer without any geometry elements? To give an example I have created a mechanism and I want only elements added using the setelement! method to be visible.

I know elements can be loaded from an URDF file (without auto-generated elements?), but I use for loops when creating my mechanism so that wouldn't be very practical.

I suppose other options would be to make all geometry elements invisible at some point and add my elements afterwards or make elements whose name matches r"^geometry_\d*$" invisible (or remove them).

I wanted to ask here before I go dive into the source code, all help will be appreciated.

JurajLieskovsky commented 3 years ago

Managed to find the solution mvis = MechanismVisualizer(state,MeshCatMechanisms.Visualizer())