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

Issue in loading world into Gazebo #8

Open
xela-95 opened this issue Jan 5, 2024 · 4 comments
Open

Issue in loading world into Gazebo #8

xela-95 opened this issue Jan 5, 2024 · 4 comments

Comments

@xela-95
Copy link
Contributor

xela-95 commented Jan 5, 2024

I'm trying to reproduce this tutorial by using a conda environment created in the following way:

mamba create -c conda-forge -c robotology -n yarp_tutorials_env  cmake ninja pkg-config make compilers yarp icub-contrib-common gazebo icub-models gazebo-yarp-plugins idyntree

I was able to compile and install.

I then started yarpserver and yarpmanager and from it I've launched the following applications:

Tutorial_on_Impedance_Control_system
image

Tutorial_on_Impedance_Control
image

This module is failing, maybe because icub is not loaded in Gazebo, probably an issue related to vvv-school/tutorial_gazebo-simple-model#1.

I've noted that the gzserver parameters are -slibgazebo_yarp_clock.so icub_simple_fixed_world/icub_simple_fixed.world, hence yarp tries to load Gazebo with icub_simple_fixed_world/icub_simple_fixed.world but it is not able to find this world file.

We searched for it but we didn't find it too. Where is placed this file?

@traversaro
Copy link
Contributor

This is related to robotology/robotology-superbuild#1563 .

@traversaro
Copy link
Contributor

This is related to robotology/robotology-superbuild#1563 .

Actually, this issue in particular is a bit more complicated. The icub_simple_fixed_world/icub_simple_fixed.world file is installed by https://github.com/robotology/icub-gazebo-wholebody, that is a project that we removed from the superbuild in 2021.02, see:

So, this repo would not work even if we use the robotology-superbuild from source, not only if you are using the conda packages.

@traversaro
Copy link
Contributor

The world itself is quite basic (see https://github.com/robotology/icub-gazebo-wholebody/blob/master/worlds/icub_simple_fixed_world/icub_simple_fixed.world), so probably the easiest fix is to include and install it as part of this repo. However, also the model://icub_fixed_no_hands model it refers to is not installed anymore (it used to be part of icub-gazebo, package now removed from the superbuild, see robotology/robotology-superbuild#542 and robotology/robotology-superbuild#646).

So probably if we actually want to use this repo, we should:

  • Copy the world in this repo, and update it to use SDF 1.7
  • Make it refer to a modern mantained model contained in icub-models or ergocub-software, such as model://iCubGazeboV2_5_fixed or a similar model from ergocub .

@xela-95
Copy link
Contributor Author

xela-95 commented Jan 10, 2024

The world itself is quite basic (see https://github.com/robotology/icub-gazebo-wholebody/blob/master/worlds/icub_simple_fixed_world/icub_simple_fixed.world), so probably the easiest fix is to include and install it as part of this repo. However, also the model://icub_fixed_no_hands model it refers to is not installed anymore (it used to be part of icub-gazebo, package now removed from the superbuild, see robotology/robotology-superbuild#542 and robotology/robotology-superbuild#646).

So probably if we actually want to use this repo, we should:

  • Copy the world in this repo, and update it to use SDF 1.7
  • Make it refer to a modern mantained model contained in icub-models or ergocub-software, such as model://iCubGazeboV2_5_fixed or a similar model from ergocub .

Just to summarize, this approach actually worked. The code is pushed in this branch of my fork of the tutorial: https://github.com/xela-95/tutorial_impedance-control/tree/fix-refs

Moreover in order to make Gazebo be able to find models and world files we added a bash script to add to Gazebo environment variables the folders in which models and world files are installed from the tutorial:

export GAZEBO_MODEL_PATH=${CONDA_PREFIX}/share/gazebo/models:${GAZEBO_MODEL_PATH}
export GAZEBO_RESOURCE_PATH=${CONDA_PREFIX}/share/gazebo/worlds:${GAZEBO_RESOURCE_PATH}

By placing it inside ${CONDA_PREFIX}/etc/conda/activate.d, the script will be activated automatically when activating the conda environment.

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