Skip to content

Look for the urdf model inside a set of environment variables #51

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

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

GiulioRomualdi
Copy link
Member

@GiulioRomualdi GiulioRomualdi commented Mar 9, 2023

The following environment variables are supported: GAZEBO_MODEL_PATH, ROS_PACKAGE_PATH, AMENT_PREFIX_PATH

This closes #35

This means that, given a dataset collected from the ergoCub robot, the model will be automatically loaded if installed in the system

@traversaro do you think we should look into other folders? Moreover, do you think we should port this feature in iDynTree? For instance with a function named loadModelFromEnv()

cc @xEnVrE

@traversaro
Copy link
Contributor

traversaro commented Mar 9, 2023

Probably we should add share to AMENT_PREFIX_PATH directories, see stack-of-tasks/pinocchio#1520 ?

@traversaro
Copy link
Contributor

traversaro commented Mar 9, 2023

@traversaro do you think we should look into other folders?

Fortunatly, no.

Moreover, do you think we should port this feature in iDynTree? For instance with a function named loadModelFromEnv()

Yes, see robotology/idyntree#942. I think we could avoid to use new functions, just modify iDynTree::ModelLoader::loadModelFromFile to support filename that contain package:// and model:// . In this way, all command line tools and any software that use iDynTree::ModelLoader::loadModelFromFile, for example with string obtained from a configuration file, will start supporting package:// and model:// .

@GiulioRomualdi
Copy link
Member Author

Probably we should add share to AMENT_PREFIX_PATH directories, see stack-of-tasks/pinocchio#1520 ?

Done in fbe349d

@GiulioRomualdi GiulioRomualdi force-pushed the model_env branch 5 times, most recently from f40bc94 to 96bb7df Compare March 10, 2023 15:27
@GiulioRomualdi
Copy link
Member Author

@paolo-viceconte, @traversaro if you agree I can merge the PR and release the software

The following environment variables are supported:
- GAZEBO_MODEL_PATH
- ROS_PACKAGE_PATH
- AMENT_PREFIX_PATH
@GiulioRomualdi GiulioRomualdi merged commit 1bb9bcc into main Mar 11, 2023
@GiulioRomualdi GiulioRomualdi deleted the model_env branch March 11, 2023 11:07
@GiulioRomualdi
Copy link
Member Author

Thanks to this PR, the visualizer can also be used to show the human model or the ironCub robot automatically (i.e., no need to install the model in a specific folder)

cc @gabrielenava @lrapetti @DanielePucci

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.

Look for the model.urdf inside the installation folders
2 participants