RobotLocomotion / drake

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

Use ApplyVisualizationConfig in ManipulationStation #17735

Closed JoseBarreiros-TRI closed 3 months ago

JoseBarreiros-TRI commented 2 years ago

Edit: Original issue title was Meldis does not update the collision geometry from ManipulationStation

What happened?

Ran joint_teleop.py from manipulation station and Meldis for visualization. Meldis does not seem to update the collision geometry. Perhaps it's a problem with the piping of the visualizer.

meldis_problem

Version

No response

What operating system are you using?

Ubuntu 20.04

What installation option are you using?

compiled from source code using Bazel

Relevant log output

No response

jwnimmer-tri commented 2 years ago

Please provide the exact commands and command-line arguments to reproduce the problem. The manipulation_station programs have a lot of command-line options that substantially change the programs' behavior.

SeanCurtis-TRI commented 2 years ago

It feels like this must be on me. Let me know if you'd like me to resolve this.

JoseBarreiros-TRI commented 2 years ago

I ran a modified version of ManipulationStation that has a kBoxCollision geometry for the iiwa by default. bazel run //tools:meldis -- -w bazel run //examples/manipulation_station:joint_teleop sorry for not adding these details before.

jwnimmer-tri commented 2 years ago

I don't see any collision geometry when I run those commands (with that patch), nor would I expect to. To see collision geometry alongside illustration geometry, some code would need to call either ApplyVisualizationConfig() or AddDefaultVisualization(), and neither of those calls appear within the manipulation_station code anywhere.

Is it possible that you had a long-running meldis visualizer, which you used at one point to visualize the iiwa with collisions via some other commands, and then never restarted meldis prior to running those two commands?

JoseBarreiros-TRI commented 2 years ago

Perhaps (and it is likely) that was the cause of phantom collision geometry because I can not replicate the issue consistently. I included AddVisualizationConfig() in joint_teleop and it throws this error: ApplyVisualizationConfig( RuntimeError: DiagramBuilder: Cannot operate on ports of System scene_graph until it has been registered using AddSystem. What would be the right way to use meldis to visualize collision geometries in the manipulation station?

jwnimmer-tri commented 2 years ago

I'll look into adding collision visualization to that example, but the manipulation_station folder does things in an unusually boutique way compared to everything else in Drake, so it might take me a few days to find the time to dig in and re-learn how it all works.

jwnimmer-tri commented 1 year ago

Perhaps unsurprisingly, I never got around to updating manipulation_station. I'm putting this on the back burner for the moment.

jwnimmer-tri commented 3 months ago

... and realistically, nobody is going to work on improving drake/examples/manipulation_station anymore.