Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The drake_cmake_installed example Particle does not plot in visualizer #233

Closed
huweiATgithub opened this issue Jul 24, 2022 · 3 comments · Fixed by #355
Closed

The drake_cmake_installed example Particle does not plot in visualizer #233

huweiATgithub opened this issue Jul 24, 2022 · 3 comments · Fixed by #355

Comments

@huweiATgithub
Copy link

How to reproduce

  • Clone and change directory to particle example
  • mkdir build && cd build && cmake .. && make
  • Terminal 1: /opt/drake/bin/drake-visualizer; Terminal 2: ./uniformly_accelerated_particle

Then, the texts on the visualizer keep updating (sim time: xxx, real time factor: xxx). But I cannot find the particle. Also, from the Scene Browser of drake-visualizer, I see no scene of the added particle. (neither does the control pane in the meshcat)

What did I try

  • Replace DrakeVisualizer with MeshCatVisualizer.
  • Add a simulator->Initialize(); and a sleep after it to look at the visualizer carefully.

Thoughts

In class ParticleGeometry, the geometry has been added to the scene_graph with the illustration role assigned. Then, I think they will automatically be added to the visualizer attached later?

@jwnimmer-tri
Copy link
Contributor

jwnimmer-tri commented Jul 26, 2022

Thanks for the report, we'll take a look.

The purpose of drake-external-examples is to show how to set up the build system for your projects. To see examples of Drake's features, a better place to look is https://drake.mit.edu/#tutorials or https://github.com/RobotLocomotion/drake/tree/master/examples/.

Of course the programs and demo instructions here should still work correctly, but in that light I will probably resolve this bug by deleting the particle code here and replacing it with something simpler.

@huweiATgithub
Copy link
Author

I might have found out the cause of this issue as raised in the drake repo: RobotLocomotion/drake#17649

A current workaround to have things working properly is to drop usage of BuildInto.
I can submit a PR if you think this is ok.

@jwnimmer-tri
Copy link
Contributor

Thanks for reporting this!

The discussion in RobotLocomotion/drake#17649 is more detailed at this point, so I'm going to close this issue as a duplicate of that other issue. It's still a bug to be fixed, but it will be easier for the Drake team to track it using the other issue number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants