RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.35k stars 1.27k forks source link

Need to run Command Line Argument Twice for Example to Properly Play #21493

Closed delara38 closed 2 weeks ago

delara38 commented 5 months ago

What happened?

Just following this tutorial (https://drake.guzhaoyuan.com/to-get-started) and doing the first example it recommends (this one https://github.com/RobotLocomotion/drake/tree/master/examples/multibody/inclined_plane_with_body) and I noticed that when I run the line of code below

bazel run //tools:meldis -- --open-window & 
bazel run //examples/multibody/inclined_plane_with_body:inclined_plane_with_body

I get the grid pictured below showing up but not the plane nor the rolling ball. I can only get the plane and ball to appear if I re-run the line above. Upon re-running the plane and ball appear in the original window and a new window with only the grid appears after the previous simulation finished.

Screenshot 2024-05-28 at 7 41 55 PM

I find that the new window is also then lagged in showing it's plane and ball until I run the command once more. I'm a complete beginner to Drake so I have no clue why this is happening or how I could fix it.

Thank you in advance for any help.

Version

No response

What operating system are you using?

macOS 14 (Sonoma)

What installation option are you using?

Unknown / Other

Relevant log output

No response

EricCousineau-TRI commented 5 months ago

Per platform checklist, assigning @joemasterjohn.

Per f2f, one suggestion is to change your commands to:

bazel build //tools:meldis //examples/multibody/inclined_plane_with_body:inclined_plane_with_body

# Terminal 1
bazel-bin/bindings/pydrake/visualization/meldis --open-window
# Terminal 2
bazel-bin/examples/multibody/inclined_plane_with_body/inclined_plane_with_body