Closed CarlottaSartore closed 3 years ago
By quickly inspecting the ignition-gazebo homebrew formulas, it seems that they are compiled using the normal system compiler, so probably I would avoid setting manually gcc8 when compiling gym-ignition .
@CarlottaSartore What is in Mojave the default compiler? The compilers tested by our CI infrastructure are the following:
Maybe as @traversaro wrote the default version of the compiler on your OSX distribution is already good enough.
The default compiler is AppleClang 11.0.0.11000033
and with that, I succeeded in compiling gym ignition.
I still have to run the example and check that everything is working fine but at least the compilation worked quite easy without setting manually gcc8.
Cool, let us know if the examples work fine. With some work me maybe could even think to officially support osx. Though, before announcing it we should at least also 1) distribute a binary wheel for osx, and that might take some effort, and 2) have a osx maintainer (@CarlottaSartore :eyes: ).
Though, before announcing it we should at least also 1) distribute a binary wheel for osx, and that might take some effort, and 2) have a osx maintainer (@CarlottaSartore 👀 ).
Before deciding to distribute a binary wheel for macOS, I would first do to a due diligence on the public dependencies of ignition-gazebo, to see if they include boost or other problematic dependencies, as homebrew is unfortunately a rolling release system, so the ABI of the dependencies can change without any advice, breaking any binary that depends on such ABI. The ABI changes should not be a problem for ignition libraries as each major version is considered as a different homebrew package, but for transitive dependencies this could be a problem. See https://github.com/ros-infrastructure/bloom/issues/254#issuecomment-379359911 for a related comment.
@CarlottaSartore, out of curiosity, were you at least able to launch Ignition-Gazebo on the MacOs Mojave from command line? e.g:
$ ign gazebo -r rolling_shapes.sdf
According to this PR, the ign gazebo
command line tool is not working on Mac.
@diegoferigo @traversaro, does the cartpole
example make usage of the Ignition GUI Simulator? i.e. is there any rendering happening or just console outputs?
@diegoferigo @traversaro, does the cartpole example make usage of Ignition GUI Simulator?
Gym-Ignition executes simulations typically in headless mode. The framework, in line with the OpenAI Gym interface, provides an optional render()
method that spawns a new process and allows visualizing the simulated environment in a graphical frontend. In the cartpole demo the GUI is enabled by default, though commenting out the render method the execution would happen entirely in the console.
This issue describes the very first attempt on MacOs done by @CarlottaSartore, and up to today there are no further updates beyond what reported here.
What's unfortunate is that we rely to the ign gazebo -g
command line to spawn the GUI process. Therefore, if the command line is not working properly on MacOs and Windows, the environments will not have rendering capabilities on those OSs.
@diegoferigo thanks for the clarification. Hopefully, the coming release of Ignition-Gazebo (Citadel) in December, addresses the support for MacOS and Windows since it works great on Ubuntu 18. Thank you for contributing this great component and making this RL capability available to Ignition.
What's unfortunate is that we rely to the
ign gazebo -g
command line to spawn the GUI process. Therefore, if the command line is not working properly on MacOs and Windows, the environments will not have rendering capabilities on those OSs.
A possible workaround (at least for Blueprint) is to use ign-gazebo -g
on macOS, even if deprecated, as it is the only one currently working.
Just to put another option on the table, there's also ign gui
, even though I suspect that it is an alias of ign gazebo -g
(or better, the other way around).
@IeiuniumLux I would just try to ping in the upstream's issue. As a temporary workaround, as commented there, installing ruby from homebrew and changing the shebang should work.
By the way, I actually meant to use ign-gazebo -g
(with the dash between ign
and gazebo
) that as far as I understand should be available also on macOS in ignition-gazebo2 .
As a test, I installed another ruby implementation with brew install ruby and modified the shebang line of /usr/local/bin/ign to point to that other ruby in /usr/local, and it was successful!
I was referring to this comment.
I am afraid that @diegoferigo did not actually tried the workaround mention in that comment, so probably it would make more sense to ask to @scpeters directly.
dartsim@6.10.0 is a forked version with some extra friction parameters that we have been using and hosting on our homebrew tap. It is keg-only so as to not interfere with the official package, but you need to set some extra environment variables to use it:
that looks like the following bug, and I just replied to your comment there
@CarlottaSartore Steve's comment about dart 6.10 applies also to your setup.
Thank you @scpeters for chiming in! Let's move the discussion about the command line to the upstream issue.
I believe that macOS situation has improved after 1.5 y. Especially, after https://github.com/ignitionrobotics/ign-gazebo/pull/477, the ign
command line should be functional. Please reopen the issue in case of further problems.
Trying to compile gym-ignition on
macOS Mojave 10.14.6
Installed
gazebo-ignition
viahomebrew
by following https://ignitionrobotics.org/docs/latest/install.brew install ignition-blueprint
Needed to unlink sdformta6
brew unlink sdformat6
for using sdformat8
Installed
gcc-8
brew install gcc@8
and exported
Cloned the repository, inside the repository, configure and make
CMakeWarning
Compilation Error
By putting to false (not solving the problem since ignition-common3 is present in the system)
The compilation continued
By adding the include asked
I have cheked and
google::protobuf::MessageLite::ParseFromIstream
exists in the related header located in/usr/local/Cellar/protobuf/3.10.0/include/google/protobuf/message_lite.h