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

GeometryProperties with aggregate values cannot be set in pydrake #22169

Open
SeanCurtis-TRI opened this issue Nov 13, 2024 · 0 comments
Open
Assignees
Labels
component: pydrake Python API and its supporting Starlark macros type: bug

Comments

@SeanCurtis-TRI
Copy link
Contributor

What happened?

Using the ("renderer", "accepting") property as a concrete example. The property is consumed by GeometryState and is used to determine if a geometry should be registered with a particular RenderEngine instance. The expected type of the property is std::set<string>.

Intuitively, one would expect in python, that to set the property, we could simply do:

properties = PerceptionProperties()
properties.AddProperty("rendererer", "accepting", set("A", "B"))

However, when GeometryState goes to extract the property, it does not find a property of type std::set<std::string>. Instead, it finds an instance of type drake:pydrake:Object.

There aren't too many properties of this type (this is the only one that immediately leaps to mind). Most other property values are instances of known primitive or C++ types bound in pydrake. So, the problem doesn't come up much. But it does prevent at least this one property from being set in python.

Version

No response

What operating system are you using?

No response

What installation option are you using?

No response

Relevant log output

No response

@SeanCurtis-TRI SeanCurtis-TRI added type: bug component: pydrake Python API and its supporting Starlark macros labels Nov 13, 2024
@SeanCurtis-TRI SeanCurtis-TRI self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pydrake Python API and its supporting Starlark macros type: bug
Projects
None yet
Development

No branches or pull requests

1 participant