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

Gazebo on Windows: vcpkg installation #3202

Open
j-rivero opened this issue Mar 24, 2022 · 9 comments
Open

Gazebo on Windows: vcpkg installation #3202

j-rivero opened this issue Mar 24, 2022 · 9 comments
Labels
help wanted Extra attention is needed os::windows

Comments

@j-rivero
Copy link
Contributor

The vcpkg project has available a port for Gazebo11. The Goal of the ticket is to evaluate if this installation is stable enough to go into our documentation.

Help wanted:
We are interested in knowing if our users on Windows can install and use it without problems. If you want to help, please follow vcpkg instructions to bootstrap vcpkg, try to compile Gazebo and try to run a basic simulation on it. Please comment in the issue with details about Windows version, problems/not-problems found, graphic card drivers installed and other information you find useful. You are also welcome to comment and help with other people's problem.

Windows specific: check #2901 for the list of configurations, problems or issues on Windows.

@j-rivero j-rivero added help wanted Extra attention is needed os::windows labels Mar 24, 2022
@j-rivero
Copy link
Contributor Author

First of all, thanks so much @Ace314159 for the work done to bring Gazebo to vcpkg. Really cool work.

I was able to use my Windows10 to install the Gazebo port without problems in the compilation of all the dependencies and gazebo itself (well, limiting the compilation threads for Gazebo using VCPKG_MAX_CONCURRENCY variable).

Playing with vcpkg directories (buildtress, installed and packages) I was wondering, what is the way of invoking Gazebo? Are there some instructions about how to run it?

Thanks!

@Ace314159
Copy link
Contributor

@j-rivero I'm glad you were able to build successfully with that minor tweak!

The buildtrees folder has intermediates used while building and can be deleted. Both the packages and installed folder contain the same files, just organized differently. Due to how vcpkg builds are done, by default gazebo loads the built-in models from the packages folder, so both the installed and packages folders are recommended to keep.

In order to run gazebo, you need to set the HOME environment variable to your users directory (i.e. C:\Users\{name}). Then, you can just double click the gazebo executable in the installed/x64-windows/tools/gazebo folder.

You can also run the the executable through cmd or Powershell (with the HOME environment variable set), but I have noticed that using ctrl+c to kill it sometimes doesn't kill the gzclient and gzserver child processes. I have made #3167 to attempt to fix this, and it seems to work for me.

@traversaro
Copy link
Collaborator

I am not sure, but I think that microsoft/vcpkg#27107 broke gazebo on vcpkg, at least when using the default version of the libraries at it bumped ogre from 1.12.9 to 13.4.4 .

Indeed, I was quite curious about why the vcpkg CI did not catched the gazebo failure, and it seems that gazebo was skipped in CI as apparently VS 2022 Update 3 broke its compilation (see microsoft/vcpkg#26283 (comment)) and so it was removed from the CI.

@talregev
Copy link
Contributor

talregev commented Mar 22, 2023

I already did a PR that try to solve the cmake issue there.
Also I revive it recently. I can make a PR again, and help will apricate.
Now day vcpkg support ogre 13.6.2 that was break the api of the previous one.
Can you help me patch gazebo that it will compile with the new ogre?

If some one is want to help, please comment here, and I will share a link for the new attempt to compile gazebo in vcpkg.

@traversaro
Copy link
Collaborator

Can you help me patch gazebo that it will compile with the new ogre?

There is a relaed issue in #2700, unfortunatly I am afraid it will not be trivial.

@talregev
Copy link
Contributor

@traversaro I try to compile gazebo with the new ogre lib. But gazebo using private headers that vcpkg don't export.
I discuss it here
OGRECave/ogre#2813
microsoft/vcpkg#30376

Anybody can help me?

@talregev
Copy link
Contributor

I made a PR of gazebo in here. It still not fully compile, but It start to build. It need patch gazebo to fit the new ogre that vcpkg is using.
microsoft/vcpkg#30424

If you can help, please common on the vcpkg PR. Thank you.

@talregev
Copy link
Contributor

I was able to compile Gazebo on windows with my fix PR with ogre 1.12.9 and qwt 6.1.5 and graphviz 2.49.1.
Please before your compile MAKE SURE your visual studio is the latest update. It have an atomic error bug in the middle versions.
Also I did this for overcome the bug. Not sure if that help:
For compile on windows I did this for atomic error I had:
https://stackoverflow.com/questions/67732065/why-does-vs2019-pro-have-compile-errors-with-xutility-xmemory-and-atomic-when

For compiling:

git clone https://github.com/talregev/vcpkg -b TalR/fix_gazebo2
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install  --x-manifest-root=ports/gazebo/ --x-install-root=installed --triplet=x64-windows-release --host-triplet=x64-windows-release --clean-after-build
vcpkg install gazebo[tools,plugins] --triplet=x64-windows-release --host-triplet=x64-windows-release

This compile gazebo but I didn't succeeded to run it.
Can you help me to understand how to run it?
I also can compile gazebo with ogre 1.11.x if needed. Write me on the comment, and I will make one.

Also vcpkg tool can help you to compile your 3rd libraries for windows and linux. Maybe for mac with extra work.

@talregev
Copy link
Contributor

talregev commented Apr 5, 2023

I made a PR that compile gazebo in windows.
#3312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed os::windows
Projects
None yet
Development

No branches or pull requests

4 participants