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

Enable use of ign gazebo -s on Windows (take two) #1764

Merged
merged 3 commits into from
Oct 19, 2022

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Oct 19, 2022

New version of #1574 after the DCO errors.

🎉 New feature

This PR enable the use of ign gazebo -s on Windows. Similarly to what is done in macOS, as ign gazebo and ign gazebo -g are not supported, those options are explicitly disabled to give a nice error to the users.

Summary

Summary of changes:

  • Add src/cmd directory also on Windows
  • Correctly mark export visibility in ign.hh and ModelCommandAPI.hh
  • Ensure that the correct directory if used in cmdgazebo.rb.in to load the gazebo plugin
  • Fix the logic to copy the unversion versions of the plugins
  • Fix UNIT_ign_TEST to work correctly on Windows
  • Disable generation of test-only ruby scripts for ign-tools when using multiple config CMake generators, and consequently disable UNIT_ign_TEST and UNIT_ModelCommandAPI_TEST` when using multiple config CMake generators.
  • As only ign gazebo -s is working, explicitly disable ign gazebo -g and ign gazebo as done on macOS .

Test it

Note, the following instructions are not complete as a version of libignition-common4 with gazebosim/gz-common#389 needs to be released before the tests work again.

Personally, I tested it with conda-forge provided depedencies. I created an environment with:

mamba create -n igngaz vs2019_win-64 cmake ninja pkg-config libignition-cmake2 libsdformat12 libignition-plugin1 libignition-transport11 libignition-msgs8 libignition-common4 libignition-fuel-tools7 libignition-gui6 libignition-physics5 libignition-sensors6 libignition-rendering6 libignition-math6 libignition-tools1 libprotobuf qt-main tinyxml2

Then, I compiled ign-gazebo with:

mamba activate igngaz
git clone https://github.com/traversaro/ign-gazebo
cd ign-gazebo
git checkout fixigngazebowinserver
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP:BOOL=ON ..
ninja install

After that, I was able to run correctly the server:

mamba activate igngaz
ign gazebo --verbose -s shapes.sdf

To verify the server was running correctly, I run in another terminal:

(igngaz) C:\Users\STraversaro>ign model --list

Requesting state for world [shapes]...

Available models:
    - ground_plane
    - box
    - cylinder
    - sphere
    - capsule
    - ellipsoid

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

traversaro and others added 3 commits October 19, 2022 23:34
Signed-off-by: Silvio <silvio@traversaro.it>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Silvio <silvio@traversaro.it>
Signed-off-by: Silvio <silvio@traversaro.it>
@nkoenig
Copy link
Contributor

nkoenig commented Oct 19, 2022

This works for me, thanks @traversaro

@nkoenig
Copy link
Contributor

nkoenig commented Oct 19, 2022

The failing tests look unrelated. I'll wait until CI finishes just to be sure.

@nkoenig nkoenig merged commit 4e10c35 into gazebosim:ign-gazebo6 Oct 19, 2022
@traversaro
Copy link
Contributor Author

traversaro commented Oct 20, 2022

I am not completly sure the CI failures are unrelated, as for example INTEGRATION_thruster seems to fail on all the tests, while before this PR this was not the case. Furthermore, failure on the Ubuntu CI was also what blocked #1574 back in time. Anyhow, at this point we can try to fix the problem(s) directly on ign-gazebo6.

nkoenig added a commit that referenced this pull request Nov 2, 2022
* Add topic parameter to thrust plugin (#1681)

* Add topic parameter.

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>

* 🎈 6.12.0: bumped minor and updated changelog (#1682)

* bumped minor and updated changelog

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* fixed changelog as per feedback and updated migration guide

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

Signed-off-by: Dharini Dutia <dharini@openrobotics.org>

* Fix reference link in ackermann steering (#1683)

Signed-off-by: Kenji Brameld <kenjibrameld@gmail.com>

* Fix installation instructions on Ubuntu 22.04 (#1686)

Signed-off-by: Silvio Traversaro <silvio@traversaro.it>

* Add a service to trigger functionality (#1611)

* initial commit to allow plugin to call a service

Signed-off-by: Liam Han <liam@openrobotics.org>

* adding tutorial and modifying the world sdf

Signed-off-by: Liam Han <liam@openrobotics.org>

* added test for single input and single service output

Signed-off-by: Liam Han <liam@openrobotics.org>

* added test for single input and multiple service output

Signed-off-by: Liam Han <liam@openrobotics.org>

* added test for invalid matching service name => timeout

Signed-off-by: Liam Han <liam@openrobotics.org>

* modified variables the camelCase

Signed-off-by: Liam Han <liam@openrobotics.org>

* fixed typo, indentation, grammar, lines that exceeded 80 char

Signed-off-by: Liam Han <liam@openrobotics.org>

* fixing ubuntu bionic ci issue

Signed-off-by: Liam Han <liam@openrobotics.org>

* silly syntax mistake on expect_eq

Signed-off-by: Liam Han <liam@openrobotics.org>

* added three more test cases that addesses incorrect response type, incorrect request type and false result

Signed-off-by: Liam Han <liam@openrobotics.org>

* WIP: major restructuring and currently working. Requires more cleanup and test

Signed-off-by: Liam Han <liam@openrobotics.org>

* WIP: fixed preprocessor define bug

Signed-off-by: Liam Han <liam@openrobotics.org>

* WIP: working but extremely convoluted

Signed-off-by: Liam Han <liam@openrobotics.org>

* WIP major modification but a lot of errors and tests failed

Signed-off-by: Liam Han <liam@openrobotics.org>

* stable version: had to revert back to previous work. all tests passed

Signed-off-by: Liam Han <liam@openrobotics.org>

* modified to use blocking Request method as well as reduce a service worker thread to just one thread with the publisher. all tests passed

Signed-off-by: Liam Han <liam@openrobotics.org>

* stable version: had to revert back to previous work. all tests passed

Signed-off-by: Liam Han <liam@openrobotics.org>

* successfully reverted and tested

Signed-off-by: Liam Han <liam@openrobotics.org>

* fixing PR suggestions

Signed-off-by: Liam Han <liam@openrobotics.org>

* changed string with 'serv' to 'srv' and included <mutex> to the header

Signed-off-by: Liam Han <liam@openrobotics.org>

* fixed indentation and removed rep.set_data since it's unused on the client service

Signed-off-by: Liam Han <liam@openrobotics.org>

* getting rid of the id

Signed-off-by: Liam Han <liam@openrobotics.org>

* fixed race condition resulting seldom test failure

Signed-off-by: Liam Han <liam@openrobotics.org>

* changed from triggerSrv to serviceCount. This compensates for the two threads running at different rate

Signed-off-by: Liam Han <liam@openrobotics.org>

* braces indentation

Signed-off-by: Mabel Zhang <mabel@openrobotics.org>

* addressing gnu c compiler (gcc) warnings

Signed-off-by: Liam Han <liam@openrobotics.org>

Signed-off-by: Liam Han <liam@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Co-authored-by: Mabel Zhang <mabel@openrobotics.org>

* Fix loading render engine plugins in GUI  (#1694)

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Enable inherited model topic name. (#1689)

Allows for inheriting model name for robotNamespace when SDF element is not set and provides a debug message showing the topics it subscribes to.

Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>

* Add ResourceSpawner example file (#1701)

Add an example file for the ResourceSpawner plugin. I'm using this to link from https://github.com/gazebosim/docs/blob/master/garden/Model_insertion_fuel.md. To improve gazebosim/garden-tutorial-party#1991.

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Update triggered_publisher.sdf (#1737)

found a silly typo that was pushed back in PR (#1611)

* Adds sky cubemap URI to the sky.proto's header (#1739)

* Adds sky cubemap URI to the sky.proto's header

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* require sdf 12.6

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Signed-off-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Return absolute path when finding a resource (#1741)

* Adds sky cubemap URI to the sky.proto's header

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Return absolute path when finding a resource

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Signed-off-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Restore Add System GUI plugin (#1685)

* cherry pick aef3020

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* Adding thrust coefficient calculation (#1652)

* adding thrust coefficient calculation

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.cc

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* Update src/systems/thruster/Thruster.hh

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* thrust coefficient test and behavior updates

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* making float comparision more robust

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

* fix float comparision and lint

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>

Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Enable/Disable individual hydrodynamic components. (#1692)

This commit enables and disables individual components of the hydrodynamics. This is often useful for debugging odd behaviours of a hydrodynamic model.

* Fortress: Removed warnings (#1754)

* Fortress: Removed warnings

* Removed unused speedlimit file (#1761)

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Enable use of ign gazebo -s on Windows (take two) (#1764)

* Enable use of ign gazebo -s on Windows

Signed-off-by: Silvio <silvio@traversaro.it>

* Update src/CMakeLists.txt

Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Signed-off-by: Silvio <silvio@traversaro.it>

* Fix cmdmodel6.rb and cmdgazebo6.rb contining the same code

Signed-off-by: Silvio <silvio@traversaro.it>

Signed-off-by: Silvio <silvio@traversaro.it>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>

* Script and tutorial for generating procedural datasets with Blender (#1412)

Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>

* Fix scene_broadcaster_system test (#1766)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Signed-off-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Nate Koenig <nate@openrobotics.org>

* Lint

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Clean build and update test

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
Signed-off-by: Dharini Dutia <dharini@openrobotics.org>
Signed-off-by: Kenji Brameld <kenjibrameld@gmail.com>
Signed-off-by: Silvio Traversaro <silvio@traversaro.it>
Signed-off-by: Liam Han <liam@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Marco A. Gutierrez <marco@openrobotics.org>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: Silvio <silvio@traversaro.it>
Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Co-authored-by: Carlos Agüero <caguero@openrobotics.org>
Co-authored-by: Dharini Dutia <dharini@openrobotics.org>
Co-authored-by: Kenji Brameld <kenjibrameld@gmail.com>
Co-authored-by: Silvio Traversaro <silvio@traversaro.it>
Co-authored-by: Liam Han <liam@openrobotics.org>
Co-authored-by: Mabel Zhang <mabel@openrobotics.org>
Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Jose Luis Rivero <jrivero@osrfoundation.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Marco A. Gutierrez <marcogg@marcogg.com>
Co-authored-by: Arjo Chakravarty <arjo@openrobotics.org>
Co-authored-by: Andrej Orsula <orsula.andrej@gmail.com>
Co-authored-by: Michael Carroll <michael@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants