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

Allow user to pass custom search paths #12

Closed
flferretti opened this issue May 14, 2024 · 5 comments
Closed

Allow user to pass custom search paths #12

flferretti opened this issue May 14, 2024 · 5 comments

Comments

@flferretti
Copy link
Contributor

When using robot_descriptions, this library cannot resolve the URIs due to the fact that robot_descriptions does not expose any environment variable of the one supported:

SupportedEnvVars = {
    "AMENT_PREFIX_PATH",
    "GAZEBO_MODEL_PATH",
    "GZ_SIM_RESOURCE_PATH",
    "IGN_GAZEBO_RESOURCE_PATH",
    "ROS_PACKAGE_PATH",
    "SDF_PATH",
}

As a result, resolve_robotics_uri_py cannot locate the necessary resources. Do you think that it could be beneficial to allow passing an additional environment variable for specifying custom search path as in 1c9e78f?

C.C. @traversaro @lorycontixd

@traversaro
Copy link
Collaborator

Good point, this is indeed something supported by many libraries, see RobotLocomotion/drake-external-examples#170 .

Do you think that it could be beneficial to allow passing an additional environment variable for specifying custom search path as in 1c9e78f?

In which sense "an additional environment variable" ? I guess you want an additional argument to the function, not an env variable?

However, I am a bit confused how existing users of robot_descriptions can resolve package:// URIs if no env variables are set.

@traversaro
Copy link
Collaborator

traversaro commented May 14, 2024

However, I am a bit confused how existing users of robot_descriptions can resolve package:// URIs if no env variables are set.

Mistery solved, the library-specific loaders handle that (see https://github.com/robot-descriptions/robot_descriptions.py/blob/d0dc260953a459450e73d9a4b456fd0b02ace59d/robot_descriptions/loaders/idyntree.py#L54C39-L54C55 for example with iDynTree). Then I guess it totally make sense to have this functionality here, can you open a PR so it is easier to discuss the change?

@traversaro
Copy link
Collaborator

I would also try to clearly document what extraPath is supposed to contain, see for example the Note in https://robotology.github.io/idyntree/classiDynTree_1_1ModelLoader.html#afefe79c0d50cfbaad54d5b076a90f00d .

@flferretti
Copy link
Contributor Author

Good point, this is indeed something supported by many libraries, see RobotLocomotion/drake-external-examples#170 .

Do you think that it could be beneficial to allow passing an additional environment variable for specifying custom search path as in 1c9e78f?

In which sense "an additional environment variable" ? I guess you want an additional argument to the function, not an env variable?

However, I am a bit confused how existing users of robot_descriptions can resolve package:// URIs if no env variables are set.

Yes, sorry, I meant an extra argument that represents an environment variable associated with an additional search path

@flferretti
Copy link
Contributor Author

Closed by #13

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

No branches or pull requests

2 participants