Package: icub-models
icub-modelsRepository containing URDF and SDF models of iCub humanoid robots.The model contained in this repo are licensed under theCreative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).Installationconda (recommended)You can easily install theicub-modelsand the C++ and Python helper libraries viaconda-forgeusing the following commandconda install -c conda-forge icub-modelsIf you are not familiar with conda or conda-forge, you can read an introduction document inconda-forge overview.robotology-superbuild (advanced)If you use apt to install your dependencies or if you are installicub-modelsfor use as part ofiCub humanoid robot software installation, you may want to install icub-models through therobotology-superbuild, an easy way to download, compile and install the robotology software on multiple operating systems, using theCMakebuild system and its extensionYCM.icub-modelsis always installed byrobotology-superbuild.Build from source (advanced)If you want to build icub-models directly from source of from the repo, you can check the documentation inbuild-from-source.md.Model DetailsThe models contained inicub-modelsare listed in the following table. Most models are identified by a name likeiCub<Something><Number>, that we refer asYARP_ROBOT_NAME. Historically, on iCub robot setups, theYARP_ROBOT_NAMEenv variable identified the specific robot to use.YARP_ROBOT_NAMEpackage:/-URINotesiCubErzelli02package://iCub/robots/iCubErzelli02/model.urdfv2.5.5iCubGazeboV2_5package://iCub/robots/iCubGazeboV2_5/model.urdfv2.5.5, joint damping, and inertias of some links increased in a non realistic way to run smoothly in Gazebo Classic (ODE).iCubGazeboV2_5_visuomanippackage://iCub/robots/iCubGazeboV2_5/model.urdfv2.5.5 with hands and eyes, base_link fixed to the ground and legs disabled.iCubGazeboV2_5_KIT_007package://iCub/robots/iCubGazeboV2_5_KIT_007/model.urdfv2.5 +KIT_007with backpack, joint damping, and inertias of some links increased in a non realistic way to run smoothly in Gazebo Classic (ODE).iCubGazeboV2_6package://iCub/robots/iCubGazeboV2_6/model.urdfv2.6 with  joint damping, and inertias of some links increased in a non realistic way to run smoothly in Gazebo Classic (ODE).iCubGazeboV2_7package://iCub/robots/iCubGazeboV2_7/model.urdfv2.7 with  joint damping, and inertias of some links increased in a non realistic way to run smoothly in Gazebo Classic (ODE).iCubGazeboV3package://iCub/robots/iCubGazeboV3/model.urdfv3 with  joint damping, and inertias of some links increased in a non realistic way to run smoothly in Gazebo Classic (ODE).iCubGazeboV3_visuomanippackage://iCub/robots/iCubGazeboV3_visuomanip/model.urdfv3 with hands and eyesiCubGenova02package://iCub/robots/iCubGenova02/model.urdfv2.5.5 +KIT_007with backpackiCubGenova03package://iCub/robots/iCubGenova03/model.urdfv2 with legs v1 and feet v2.5iCubGenova11package://iCub/robots/iCubGenova11/model.urdfv2.7iCubLisboa01package://iCub/robots/iCubLisboa01/model.urdfv1 with head v2iCubNancy01package://iCub/robots/iCubNancy01/model.urdfv2.5 with arms v1 and head v2iCubWaterloo11package://iCub/robots/iCubWaterloo11/model.urdfv2.7UsageUse the models with ROSModels contained inicub-modelscan be used using thepackage:/-URI listed in previous table. This URI always follow the structurepackage://iCub/robots/<name>/model.urdf, where<name>isiCubErzelli02,iCubGazeboV2_5or a similar identifier.Use the models with Classic GazeboNote that only the models that are known to work fine with the default physics engine settings of Classic Gazebo (the one that start withiCubGazebo)
are installed. If you want to make available in Gazebo all the models, enable theICUB_MODELS_INSTALL_ALL_GAZEBO_MODELSCMake option.To include the model in a Classic Gazebo world, use the following SDF:<include><pose>000.50-0.13.14</pose><uri>model://iCubGazeboV2_5</uri></include>Themodel:/string is used to include the model, following the structuremodel://<name>, where<name>isiCubGazeboV2_5,iCubGazeboV2_7or a similar identifier. Note that you can also use the structuremodel://iCub/robots/<name>.Use the models from C++ helper libraryIn order to use these models inc++application you can exploit theicub-modelslibrary.icub-modelsprovides nativeCMakesupport which allows the library to be easily used inCMakeprojects.icub-modelsexports a CMake target calledicub-models::icub-modelswhich can be imported using thefind_packageCMake command and used by callingtarget_link_librariesas in the following example:cmake_minimum_required(VERSION3.5)project(myproject)find_package(icub-modelsREQUIRED)add_executable(exampleexample.cpp)target_link_libraries(exampleicub-models::icub-models)Theexample.cppwill contains#include<iCubModels/iCubModels.h>#include<iostream>intmain(){std::cout<<"Models have been installed in: "<<iCubModels::getModelsPath()<<std::endl;std::cout<<"Available robots: "<<std::endl;for(constauto&robot:iCubModels::getRobotNames()){std::cout<<" - "<<robot<<": "<<iCubModels::getModelFile(robot)<<std::endl;}returnEXIT_SUCCESS;}Note: The ABI and the API of the C++ helper library has breaking changes only at major releases of theicub-modelspackage.Use the models from C++ using YARPTo find the model in C++ using YARP, you just need to make sure thatYARP_ROBOT_NAMEenvironment variable is set, and search for themodel.urdffile:std::string modelAbsolutePath =yarp::os::ResourceFinder::getResourceFinderSingleton().findFileByName("model.urdf");Use the models from Python icub-models libraryThe following script can be used to locate the modelsimporticub_modelsprint(f"Models have been installed in:{icub_models.get_models_path()}")print(f"Available robots:{icub_models.get_robot_names()}")forrobot_nameinicub_models.get_robot_names():print(f"{robot_name}:{icub_models.get_model_file(robot_name)}")Use the models from Python using resolve-robotics-uri-pyFirst of all, make sure that you installedresolve-robotics-uri-pypython library. Then, you can find theicub-modelsmodels usingpackage:/ormodel:/URIs, as you would use with Gazebo or ROS:absolute_path = resolve_robotics_uri_py.resolve_robotics_uri("package://iCub/robots/iCubGazeboV2_7/model.urdf")orabsolute_path = resolve_robotics_uri_py.resolve_robotics_uri("model://iCub/robots/iCubGazeboV2_7/model.urdf")FAQsChange the orientation of the root frameThe iCub robotroot frameis defined asx-backward, meaning that the x-axis points behind the robot. Nevertheless, in the robotics community, sometimes the root frame of a robot is defined asx-forward. As a consequence, to use the iCub models with software developed for thex-forwardconfiguration (e.g.IHMC-ORS), might be necessary to quickly update the root frame orientation.For this purpose, locate the joint<joint name="base_fixed_joint" type="fixed">in theURDFmodel and perform the following substitution in theoriginsection:-  <origin xyz="0 0 0" rpy="0 -0 0"/>
+  <origin xyz="0 0 0" rpy="0 -0 3.14159265358979323846"/>