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

py systems: Add keep_alive cycle to DiagramBuilder.AddSystem #14356

Conversation

EricCousineau-TRI
Copy link
Contributor

@EricCousineau-TRI EricCousineau-TRI commented Nov 18, 2020

This is a workaround to ensure we propagate keep_alive relationships

Resolves #14355


This change is Reviewable

Copy link
Contributor Author

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

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

+@RussTedrake for feature review, please!
+@sammy-tri for platform review, please!

On the whole, my feelings for this PR: 🤮
But it works, so my more dominant feelings as well: 🤷

Reviewable status: LGTM missing from assignees RussTedrake(platform),sammy-tri(platform) (waiting on @RussTedrake and @sammy-tri)

Copy link
Contributor

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

:lgtm: thanks!

Reviewed 2 of 2 files at r1.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee sammy-tri(platform) (waiting on @EricCousineau-TRI and @sammy-tri)


bindings/pydrake/systems/framework_py_semantics.cc, line 461 at r1 (raw file):

            py::arg("system"),
            // TODO(eric.cousineau): These two keep_alive's purposely form a
            // reference cycle as a workaround or #14355. We should find a

nit: or => for

Copy link
Contributor Author

@EricCousineau-TRI EricCousineau-TRI 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 sammy-tri(platform) (waiting on @RussTedrake and @sammy-tri)


bindings/pydrake/systems/framework_py_semantics.cc, line 461 at r1 (raw file):

Previously, RussTedrake (Russ Tedrake) wrote…

nit: or => for

Done.

Copy link
Contributor

@RussTedrake RussTedrake left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@sammy-tri sammy-tri left a comment

Choose a reason for hiding this comment

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

Not a huge fan of this "workaround" myself but after spelunking in the issues/discussions I guess I could l live with it. Holding off final review until CI is happy.

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Reviewable status: LGTM missing from assignee sammy-tri(platform)

This is a workaround to ensure we propagate keep_alive relationships

Resolves RobotLocomotion#14355
Copy link
Contributor Author

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

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

Fixed CI error - had to propagate new expectations due to the hack

Reviewable status: LGTM missing from assignee sammy-tri(platform) (waiting on @RussTedrake and @sammy-tri)

@EricCousineau-TRI
Copy link
Contributor Author

Yup, looks like it's good to go!

Copy link
Contributor

@sammy-tri sammy-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:

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignees sammy-tri(platform),RussTedrake(platform)

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.

py systems: DiagramBuilder.AddSystem() may not propagate existing keep-alive "edges"
3 participants