-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support passing additional search paths via package_dirs argument #13
Conversation
Can't we just add a In this way we can do: mesh_path = resolve_robotics_uri(
uri="package://example-robot-data/robots/ur_description/meshes/ur10/collision/shoulder.stl",
package_dirs=get_package_dirs(import_module(f"robot_descriptions.ur10_description")),
) as done in the rest of the robot_descriptions loaders in https://github.com/robot-descriptions/robot_descriptions.py/tree/d0dc260953a459450e73d9a4b456fd0b02ace59d/robot_descriptions/loaders ? I think I know the answer to my question, but I want to understand your rationale. |
- `GZ_SIM_RESOURCE_PATH` | ||
- `IGN_GAZEBO_RESOURCE_PATH` | ||
- `ROS_PACKAGE_PATH` | ||
- `SDF_PATH` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should specify how the extra variable is interpreter. For example, if the uri is package://StrangeModel/Nested/mesh.st
, and the actual mesh is in /usr/local/share/StrangeModel/Nested/mesh.stl
, what should contain the extra path? /usr/local/share
, /usr/local
or /usr/local/share/StrangeModel
. In theory we should also explicitly document how we interpret all the env variables listed here, but that is a more mitigated problems as they are documented in their respective projects, while the extra_path
is something we add only here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 2633149
Yes it totally makes sense, I'll do the modification |
38ad20d
to
7fa1139
Compare
Ready for review after applying your suggestion in c1000b7. Thanks a lot! |
Co-authored-by: Silvio Traversaro <silvio.traversaro@iit.it>
7fa1139
to
2633149
Compare
Co-authored-by: Silvio Traversaro <silvio@traversaro.it>
Thanks @flferretti ! I release v0.3.0 . |
This pull request adds support for custom environment variables as additional search paths when resolving a robotics URI. The
resolve_robotics_uri
function now accepts an optionalextra_path
parameter, which allows users to specify the name of an environment variable associated with a search path. Ifextra_path
is provided, the function will include the path associated with the environment variable to the search paths.Example usage to find meshes path:
Solves #12