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

PlanarSceneGraphVisualizer: Store convex hulls of meshes #13857

Conversation

avalenzu
Copy link
Contributor

@avalenzu avalenzu commented Aug 11, 2020

Prior to this commit, we stored all of the vertices of each mesh and then took
their convex hull after projecting them to the visualization plane every dt. Now
we only store the vertices of the 3D convex hull of each mesh. The 2D convex
hull must still be computed at each dt, but, for meshes with lots of interior
vertices, it will now be over a much smaller set of points.


This change is Reviewable

Copy link
Contributor Author

@avalenzu avalenzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@SeanCurtis-TRI for feature review.

Reviewable status: LGTM missing from assignee SeanCurtis-TRI(platform), needs at least two assigned reviewers (waiting on @SeanCurtis-TRI)

Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never run this visualizer. Can you give me a quick recipe for running something that exercises this? (I'm too lazy to go spelunking myself.)

Reviewed 1 of 1 files at r1.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee SeanCurtis-TRI(platform), needs at least two assigned reviewers (waiting on @avalenzu)


bindings/pydrake/systems/planar_scenegraph_visualizer.py, line 278 at r1 (raw file):

                    # vertices after projection, and will therefore be removed
                    # in _update_body_fill_verts().
                    hull = spatial.ConvexHull(patch_G.T)

BTW If you removed the .T in the definition of patch_G, then you wouldn't need one here when you call ConvexHull.

Copy link
Contributor Author

@avalenzu avalenzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Try this on for size

 bazel run -- //examples/manipulation_station:end_effector_teleop_sliders --setup planar

Reviewable status: 1 unresolved discussion, LGTM missing from assignee SeanCurtis-TRI(platform), needs at least two assigned reviewers (waiting on @avalenzu)

Prior to this commit, we stored all of the vertices of each mesh and then took
their convex hull after projecting them to the visualization plane every dt. Now
we only store the vertices of the 3D convex hull of each mesh. The 2D convex
hull must still be computed at each dt, but, for meshes with lots of interior
vertices, it will now be over a much smaller set of points.
@avalenzu avalenzu force-pushed the psgv-chull-first-ask-questions-later branch from 4d075a1 to 25e280e Compare August 11, 2020 17:03
Copy link
Contributor Author

@avalenzu avalenzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: LGTM missing from assignee SeanCurtis-TRI(platform), needs at least two assigned reviewers (waiting on @SeanCurtis-TRI)


bindings/pydrake/systems/planar_scenegraph_visualizer.py, line 278 at r1 (raw file):

Previously, SeanCurtis-TRI (Sean Curtis) wrote…

BTW If you removed the .T in the definition of patch_G, then you wouldn't need one here when you call ConvexHull.

Done.

Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:LGTM:

+@rpoyner-tri for platform review, please.

Reviewed 1 of 1 files at r2.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform) (waiting on @rpoyner-tri)

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees rpoyner-tri(platform),SeanCurtis-TRI(platform) (waiting on @rpoyner-tri)

@rpoyner-tri rpoyner-tri merged commit 79e1d4d into RobotLocomotion:master Aug 11, 2020
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 this pull request may close these issues.

3 participants