ami-iit / robot-log-visualizer

Visualizer to display the data logged with YarpRobotLoggerDevice
BSD 3-Clause "New" or "Revised" License
22 stars 4 forks source link

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

Closed GiulioRomualdi closed 1 year ago

GiulioRomualdi commented 1 year ago

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 commented 1 year ago

Probably we should add share to AMENT_PREFIX_PATH directories, see https://github.com/stack-of-tasks/pinocchio/issues/1520 ?

traversaro commented 1 year ago

@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 https://github.com/robotology/idyntree/issues/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 commented 1 year ago

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

Done in https://github.com/ami-iit/robot-log-visualizer/pull/51/commits/fbe349de5371293b77eed49c6baf14995f31b4c6

GiulioRomualdi commented 1 year ago

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

GiulioRomualdi commented 1 year ago

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