robotology / gazebo-fmi

FMI import plugins for the Gazebo Simulator.
GNU Lesser General Public License v3.0
24 stars 5 forks source link

Review location in which FMU file are searched #46

Closed traversaro closed 5 years ago

traversaro commented 5 years ago

Currently the absolute filename of the FMU is searched with this logic (see gazebo-fmi-actuator plugin):

This name is passed to the gazebo::common::SystemPaths::FindFile method to find the absolute location of the FMU file. Adding the directory containing the FMUs to the GAZEBO_RESOURCE_PATH should be sufficient to make it visible to the plugin.

Is this good enough? @triccyx Did you ever had any problem with this?

triccyx commented 5 years ago

No problem with this as it is written in the docs, if I remember well. However, you can also consider the option to add an optional:

<fmu_path>~myname/fmu_folder</fmu_path>
<fmu>MotorTransmissionLHPY.fmu</fmu> 

to ignore the GAZEBO_RESOURCE_PATH in this case.

traversaro commented 5 years ago

As discussed by f2f, it is possible to specify an absolute path to fmu, so there is no need for any additional fmu_path option. The solution of searching in the GAZEBO_RESOURCE_PATH seems to be satisfactory, we can close this issue for now and eventually open a new issue if there is the need to change this.