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

Document in the README how the models can be find using YARP and ROS in C++ code #90

Open
traversaro opened this issue Jun 5, 2021 · 0 comments

Comments

@traversaro
Copy link
Member

This repo contains models for the iCub robots and installs them to be found easily by YARP and ROS resource locator infrastructure. However, for a novice user it may be not obvious how to find such models in YARP and ROS from C++. It would be nice to document this with simple snippets in the README, for example for YARP:

// This is typically set in the environment and not set in code
// See https://github.com/robotology/yarp/issues/593 for a related issue
setenv("YARP_ROBOT_NAME", "iCubGazeboV2_5_visuomanip");
std::string pathToModel =  yarp::os::ResourceFinder::getResourceFinderSingleton().findFileByName("model.urdf");

Or ROS1:

std::string icub_package_path = ros::package::getPath("iCub");
std::string icub_model_path = icub_package_path + "robots/iCubGazeboV2_5_visuomanip/model.urdf"

And so on so forth.

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

1 participant