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

Avoid to use YARP_ROBOT_NAME to permit users to set either icub or ergocub #29

Open
traversaro opened this issue Nov 26, 2024 · 2 comments

Comments

@traversaro
Copy link
Member

Reading the README, it seems to me that in the repo the YARP_ROBOT_NAME can be set to either icub or ergocub to select if icub or ergocub is used (see

robot_name = os.environ["YARP_ROBOT_NAME"]
xacro_file = os.path.join(get_package_share_directory(robot_name+'_moveit_config'), 'config', robot_name+'.urdf.xacro')
). However, such a usage is not compatible with the common use of the YARP_ROBOT_NAME env variable in iCub and ergoCub setups, where the YARP_ROBOT_NAME is set to a name like iCubGenova09 or ergoCubSN002, to load the corresponding configuration files (for example installed via https://github.com/robotology/robots-configuration) via the YARP's ResourceFinder infrastructure (see https://www.yarp.it/latest/yarp_resource_finder_tutorials.html).

Note that some other usages (such as

if "icub" in os.environ["YARP_ROBOT_NAME"].casefold():
yarp_robot_name = "icub"
elif "ergocub" in os.environ["YARP_ROBOT_NAME"].casefold():
yarp_robot_name = "ergocub"
return yarp_robot_name
) do not induce the expectation that YARP_ROBOT_NAME is exactly set to icub or ergocub, so they are compatible with the usual values of YARP_ROBOT_NAME set in robots setup.

@martinaxgloria
Copy link
Member

Hi @traversaro,

if I remember correctly, the use of YARP_ROBOT_NAME was strictly related to the simulation environment and/or when I was testing these packages on my machine where this variable was not set. Maybe this could be written well in the documentation and revised how to handle this variable when using simulated models

cc @Nicogene

@traversaro
Copy link
Member Author

I see! Just FYI, also simulated robots have their own YARP_ROBOT_NAME, see for example https://github.com/robotology/icub-models?tab=readme-ov-file#model-details . Could it make sense to use those? If instead we need a variable that is icub or ergocub, I suggest to use a different env variable to avoid confusion.

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