Repository containing models automatically generated from the CAD file by icub-model-generator.
The model in the repo can be used either directly from the repo, or by installing them.
While the files can be used directly by pointing your software to their location, they are
tipically used by software that uses either YARP, ROS or Gazebo. For this reason, the models
are installed as part of the iCub
ROS package (instructions) and following the YARP guidelines on installing configuration files.
To make sure that this models are found by the software even when they are not installed in
system directories, tipically the YARP_DATA_DIRS
,
ROS_PACKAGE_PATH
, and the GAZEBO_MODEL_PATH
enviromental variables are modified appropriatly.
In the case models are used from the repo, the first step is configure it with the following commands:
mkdir build
cd build
cmake ..
If <icub-models>
is the location of the repo, some folders need to be appended to the mentioned env variables. On *nix system, this can be achived by adding to the .bashrc
or equivalent file the following three lines:
export YARP_DATA_DIRS=${YARP_DATA_DIRS}:<icub-models>/build/iCub
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:<icub-models>/build
To install the models instead, execute:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<prefix> ..
cmake --build . --target install
Once the models are installed into a given prefix, edit the env variables as follows:
export YARP_DATA_DIRS=${YARP_DATA_DIRS}:<prefix>/share/iCub
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:<prefix>/share
In order to use these models in Gazebo, set up the simulation environment following the instructions provided in the icub-gazebo repository, and add the following line to your .bashrc
:
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:<prefix>/share/iCub/robots:<prefix>/share
Note that only the models that are known to work fine with the default physics engine settings of Gazebo (iCubGazeboV2_5
and iCubGazeboV2_5_plus
)
are installed. If you want to make available in Gazebo all the models, enable the ICUB_MODELS_INSTALL_ALL_GAZEBO_MODELS
CMake option.
Note that it is still a Work In Progress. See the issue robotology#7
The iCub robot root frame
is defined as x-backward
, meaning that the x-axis points behind the robot. Nevertheless, in the robotics community, sometimes the root frame of a robot is defined as x-forward
. As a consequence, to use the iCub models with software developed for the x-forward
configuration (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 the URDF
model and perform the following substitution in the origin
section:
- <origin xyz="0 0 0" rpy="0 -0 0"/>
+ <origin xyz="0 0 0" rpy="0 -0 3.14159265358979323846"/>