ami-iit / rod

The ultimate Python tool for RObot Descriptions processing.
https://pypi.org/project/rod/
BSD 3-Clause "New" or "Revised" License
13 stars 3 forks source link

URDF to SDF conversion is not working on Windows #25

Closed traversaro closed 1 month ago

traversaro commented 11 months ago

@diegoferigo in https://github.com/ami-iit/rod/pull/24 wrote:

On Windows, the gz sdf command line we use for the URDF to SDF conversion does not work for some reason, the pytest suite is disabled on this OS. cc @traversaro

Windows error
        if cp.returncode != 0:
            msg = f"Failed to find 'sdf' command part of {executable} installation"
           raise RuntimeError(msg)
           RuntimeError: Failed to find 'sdf' command part of C:\Miniconda3\envs\test\Library\bin\gz.BAT installation

I open this issue to track this problem.

diegoferigo commented 11 months ago

For the records, the windows error occurs when the gazebo dependency is installed with conda with the gz-sim7 package. It seems that the gz sdf ... subcommand is not available, while the plain gz instead is found.

I remember that gazebo has a weird ruby-based approach to extend the gz command with subcommands, maybe on windows this is not yet working on conda.

traversaro commented 11 months ago

Ah, I think this is just https://github.com/gazebosim/gz-tools/issues/71, a relative easy fix.

traversaro commented 11 months ago

Ah, I think this is just gazebosim/gz-tools#71, a relative easy fix.

Actually it is a bit complex to solve upstream as the goal is to support multiple config generators (see https://github.com/gazebosim/gz-plugin/pull/63). However, we use single config generators on conda-forge, so we can easily just fix the problem there.

traversaro commented 10 months ago

I guess this should have been fixed by https://github.com/conda-forge/libsdformat-feedstock/pull/94 (unless somebody install sdformat from source on Windows, but this seems quite a cornercase).

diegoferigo commented 10 months ago

Awesome, thanks @traversaro for addressing the problem. We should now check that things work here by removing the if in the CI workflow.

diegoferigo commented 8 months ago

Upstream should be fixed as well in https://github.com/gazebosim/sdformat/pull/1339. I still haven't tried to enable windows back in CI.

diegoferigo commented 1 month ago

After the upstream fixes and some final work on our side (#34, #35), the URDF to SDF conversion required by rod and performed by sdformat should work fine also on Windows :rocket: Our CI is already testing it by installing the required dependencies from conda-forge.

Closing.