-
Notifications
You must be signed in to change notification settings - Fork 0
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
Avoid hardcoded absolute paths in .ini files #61
Comments
Yes, that looks elegant.
👍 |
Mmm thinking again, anything really wrong with non-unique |
YARP will find the first context directory and .ini file that match the Per
Per
As you see, only the first item is picked even if two occurrences were found. I thought that unique context names may be preferable over unique .ini file names in terms of readability (only one prefix in the directory name instead of prefixing every file). |
Ok, makes perfect sense! |
There is also another option to |
To sum up: prefix context file names with the robot name (e.g. <module>
<name>BasicCartesianControl</name>
<parameters>--from /usr/local/share/teo-configuration-files/contexts/kinematics/fixedTrunk-leftArm-fetch-kinematics.ini ...</parameters>
<node>localhost</node>
<deployer>yarpdev</deployer>
</module> would become: <module>
<name>BasicCartesianControl</name>
<parameters>--from teo-fixedTrunk-leftArm-fetch-kinematics.ini ...</parameters>
<node>localhost</node>
<deployer>yarpdev</deployer>
</module> This is entirely dependent on the implementation of each module. Here, BasicCartesianControl should either parse @jgvictores do you agree? |
I think so. Maybe we could close this issue because too broad then?
|
I think it's not that hard at all, the only occurrence of hardcoded paths I could find in teo-config-files is the bcc-kinematics thing. Same goes for amor-/asibot-config-files, probably. |
BTW we got rid of long absolute paths pointing at OpenRAVE environment descriptor files at roboticslab-uc3m/openrave-yarp-plugins#99. |
I didn't notice my original proposal was to rename contexts instead of individual files. However, now I realize modules can hardcode this context name behind the scenes (ref). It kinda makes sense doing so since:
@jgvictores OK with roboticslab-uc3m/teo-configuration-files@a89480f? |
That's perfect, thanks a lot! |
Done, now we point at filenames instead of full paths (see linked commits). |
Following the lines of #52, I'd be tempted to mimick the CMake
configure_file
mechanism in several absolute paths found throughout out <robot>-configuration-files repos. Example:Note the
/usr/local/share/...
part. Since moving everything into acmake/templates/
in the form of a*.xml.in
would mess the directory structure of the affected repositories, YARP context paths might come into play as a better approach, e.g.... --context teo-kinematics --from rightArmKinematics.ini
. Keep in mind that context names should be unique, hence theteo-
prefix.The text was updated successfully, but these errors were encountered: