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

Migration to gazebo sim garden #433

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

andreaostuni
Copy link

How stated in #430 I have ported to my best capabilities this repo to the garden version of gazebo and completing the steps:

  • Upgrade the C++ sources (ScenarIO) to Gazebo Sim Garden. It will take some effort due to the Ignition -> Gazebo Sim rebranding.

  • Understand the root of the GUI problems and fix them.

  • Align the vendored Physics system with Gazebo Sim Garden.

  • From the Python side, drop the unmaintained openai/gym support and migrate towards Farama-Foundation/Gymnasium.

I'm still having issues adapting the CICD to build gazebo from source.

@traversaro
Copy link
Contributor

Thanks a lot for this! fyi @diegoferigo @DanielePucci

@NDevDrone
Copy link

Hi @traversaro @andreaostuni , appreciate all of your work. Could I ask about the state of the migration work you were trying here? we may me able to dedicate some resources to investigate it.

@traversaro
Copy link
Contributor

Hello @andreaostuni @NDevDrone, thanks a lot for your work and interest. At the moment on the IIT side (the organization the originally worked on this) no one is working on the migration, if you like we can have a chat using Skype/Teams/Zoom or what you prefer to align on the gym-ignition status? Thanks in advance!

@NDevDrone
Copy link

Thanks for the offer @traversaro .

Right now we've tried building this from the source here provided by Andrea, as well as by the old python package install, as well as the models repo. Unfortunately , we get close to a working install, however the idyntree dependency is not functional. I presume this has something to do with the "Align the vendored Physics system with Gazebo Sim Garden" issue?

@traversaro
Copy link
Contributor

Unfortunately , we get close to a working install, however the idyntree dependency is not functional. I presume this has something to do with the "Align the vendored Physics system with Gazebo Sim Garden" issue?

No, the "Align the vendored Physics system with Gazebo Sim Garden" is unrelated to iDynTree, I do not expect anything too difficult to solve related to iDynTree.

@NDevDrone
Copy link

Unfortunately , we get close to a working install, however the idyntree dependency is not functional. I presume this has something to do with the "Align the vendored Physics system with Gazebo Sim Garden" issue?

No, the "Align the vendored Physics system with Gazebo Sim Garden" is unrelated to iDynTree, I do not expect anything too difficult to solve related to iDynTree.

Thanks. In the interest of transparency, allow me to explain what I've tried thus far. Please remember I am not a skilled software developer, so my mistakes may be obvious to others:

When attempt to build scenario within the scenario subfolder of gz-sim (gz-ignition) using pip install scenario or pip install . , the following shows up:

`Processing /Users/username/workspace/gym-gz/scenario
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting packaging (from scenario==0.1.dev1611+dirty)
Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Using cached packaging-24.1-py3-none-any.whl (53 kB)
Building wheels for collected packages: scenario
Building wheel for scenario (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for scenario (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [144 lines of output]
running bdist_wheel
running build
running build_ext

  A module that was compiled using NumPy 1.x cannot be run in
  NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
  versions of NumPy, modules must be compiled with NumPy 2.0.
  Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
  
  If you are a user of the module, the easiest solution will be to
  downgrade to 'numpy<2' or try to upgrade the affected module.
  We expect that some modules will need time to support NumPy 2.
  
  Traceback (most recent call last):  File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 10, in <module>
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 114, in run
      self.build_extension(ext)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 132, in build_extension
      importlib.import_module(pkg)
    File "/Users/username/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/idyntree/__init__.py", line 1, in <module>
      from . import swig
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/idyntree/swig.py", line 10, in <module>
      from . import _iDynTree
  Traceback (most recent call last):
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
      raise ImportError(msg)
  ImportError:
  A module that was compiled using NumPy 1.x cannot be run in
  NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
  versions of NumPy, modules must be compiled with NumPy 2.0.
  Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
  
  If you are a user of the module, the easiest solution will be to
  downgrade to 'numpy<2' or try to upgrade the affected module.
  We expect that some modules will need time to support NumPy 2.
  
  
  Traceback (most recent call last):
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 132, in build_extension
      importlib.import_module(pkg)
    File "/Users/username/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/idyntree/__init__.py", line 1, in <module>
      from . import swig
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/idyntree/swig.py", line 10, in <module>
      from . import _iDynTree
  ImportError: numpy.core.multiarray failed to import
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 10, in <module>
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 114, in run
      self.build_extension(ext)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-_tjum2d7/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 134, in build_extension
      raise ValueError(f"Failed to import '{pkg}'")
  ValueError: Failed to import 'idyntree'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scenario
Failed to build scenario
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (scenario)
`
You'll note it states numpy is to blame. I've tried both numpy2.0. and numpy-1.26.4 now, both yield the same error.

So then, I try building using cmake. This works out:

cmake -S . -B build/ cmake --build build/ --target install

I then go back to the top level gz-sim (gz-ignition) directory, and run pip install .
The build fails, saying scenario has not been built, with the same error as the previous attempt to install it via pip...

`Building wheels for collected packages: gym_gz, scenario, gym-gz-models
Building wheel for gym_gz (pyproject.toml) ... done
Created wheel for gym_gz: filename=gym_gz-0.1.dev1611+dirty-py3-none-any.whl size=62503 sha256=787690e605ed7ca7dcd65bd6dd943822aff5a46e120b1d1fa938268f1ac84313
Stored in directory: /Users/username/Library/Caches/pip/wheels/5d/1d/b6/cc654556cb5cf80820e51554cafb5119cced7e9047caec398d
Building wheel for scenario (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for scenario (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [144 lines of output]
running bdist_wheel
running build
running build_ext

  A module that was compiled using NumPy 1.x cannot be run in
  NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
  versions of NumPy, modules must be compiled with NumPy 2.0.
  Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
  
  If you are a user of the module, the easiest solution will be to
  downgrade to 'numpy<2' or try to upgrade the affected module.
  We expect that some modules will need time to support NumPy 2.
  
  Traceback (most recent call last):  File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 10, in <module>
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 114, in run
      self.build_extension(ext)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 132, in build_extension
      importlib.import_module(pkg)
    File "/Users/username/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/idyntree/__init__.py", line 1, in <module>
      from . import swig
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/idyntree/swig.py", line 10, in <module>
      from . import _iDynTree
  Traceback (most recent call last):
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
      raise ImportError(msg)
  ImportError:
  A module that was compiled using NumPy 1.x cannot be run in
  NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
  versions of NumPy, modules must be compiled with NumPy 2.0.
  Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
  
  If you are a user of the module, the easiest solution will be to
  downgrade to 'numpy<2' or try to upgrade the affected module.
  We expect that some modules will need time to support NumPy 2.
  
  
  Traceback (most recent call last):
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 132, in build_extension
      importlib.import_module(pkg)
    File "/Users/username/.pyenv/versions/3.10.4/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/idyntree/__init__.py", line 1, in <module>
      from . import swig
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/idyntree/swig.py", line 10, in <module>
      from . import _iDynTree
  ImportError: numpy.core.multiarray failed to import
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/username/workspace/gym-gz/new-env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 10, in <module>
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
      self.run_command(cmd_name)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 976, in run_command
      super().run_command(command)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 114, in run
      self.build_extension(ext)
    File "/private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-build-env-2cckphkv/overlay/lib/python3.10/site-packages/cmake_build_extension/build_extension.py", line 134, in build_extension
      raise ValueError(f"Failed to import '{pkg}'")
  ValueError: Failed to import 'idyntree'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scenario
Building wheel for gym-gz-models (pyproject.toml) ... done
Created wheel for gym-gz-models: filename=gym_gz_models-1.2rc1.dev9-cp310-cp310-macosx_14_0_arm64.whl size=15078662 sha256=5bea6a435d52c6ce6417938b1483ebca42953e48b3a717b2437c1bba003c035b
Stored in directory: /private/var/folders/g2/v3n2d3j97t78l8mbm9wh1kvr0000gn/T/pip-ephem-wheel-cache-v7hk967a/wheels/67/ad/b0/3342847556afd7e5598064d23cb5e77a2f9e8702f5e6336364
Successfully built gym_gz gym-gz-models
Failed to build scenario
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (scenario)
`

Now, i figure this has to be an issue with using cmake and python not being able to see that built version. I'm unsure how to rectify that. None the less, I try to run pytest and no luck unfortunately.

if you happen to review all of that, thank you for your time!

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

Successfully merging this pull request may close these issues.

3 participants