robotology / gym-ignition

Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo
https://robotology.github.io/gym-ignition
GNU Lesser General Public License v3.0
227 stars 26 forks source link

Unable to run ScenarIO Example #431

Open Vincenzo-Saffioti opened 1 year ago

Vincenzo-Saffioti commented 1 year ago

Description:

I have tried to install gym-ignition but cannot use the library as when I try to run the example code (https://robotology.github.io/gym-ignition/master/getting_started/scenario.html) I get an error from python.

Steps to reproduce

  1. conda env create -n gym-ignition python=3.9
  2. pip install gym-ignition
  3. create example.py (https://robotology.github.io/gym-ignition/master/getting_started/scenario.html)
  4. python3 example.py

The terminal returns:

python3 example.py 

Traceback (most recent call last):
  File "/home/robolab/Desktop/example.py", line 3, in <module>
    from scenario import gazebo as scenario_gazebo
  File "/home/robolab/miniconda3/envs/gym-ignitionv2/lib/python3.9/site-packages/scenario/__init__.py", line 227, in <module>
    check_gazebo_installation()
  File "/home/robolab/miniconda3/envs/gym-ignitionv2/lib/python3.9/site-packages/scenario/__init__.py", line 175, in check_gazebo_installation
    raise RuntimeError(msg)
RuntimeError: Failed to find Ignition Gazebo ~=6.0.0.dev (found incompatible version(s): [<Version('6.14.0')>])

I also tried to build gym-ignition 1.3.1 source code (idyntree latest version) but i had a compilation error when i execute cmake .. command. This is the error:

CMake Error at /home/robolab/miniconda3/envs/gym-ignition/lib/cmake/iDynTree/iDynTreeTargets.cmake:107 (set_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "DEPRECATION" is not allowed.
Call Stack (most recent call first):
  /home/robolab/miniconda3/envs/gym-ignition/lib/cmake/iDynTree/iDynTreeConfig.cmake:21 (include)
  scenario/src/controllers/CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/robolab/gym-ignition-1.3.1/build/CMakeFiles/CMakeOutput.log".
See also "/home/robolab/gym-ignition-1.3.1/build/CMakeFiles/CMakeError.log".

Environment

traversaro commented 1 year ago

Hello @Vincenzo-Saffioti, unfortunately the project does not work with the latest ignition gazebo, see https://github.com/robotology/gym-ignition/issues/430 for more info.