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

Standalone gz model executable #2724

Open
wants to merge 25 commits into
base: gz-sim9
Choose a base branch
from

Conversation

sauk2
Copy link
Contributor

@sauk2 sauk2 commented Jan 21, 2025

🎉 New feature

Part of gazebosim/gz-tools#7

Summary

This PR introduces a standalone gz model executable, following a similar approach to gz-transport. The new executable is integrated into cmdmodel.rb.in, replacing its existing functionality.

The gz sim implementation remains unchanged in this PR and will be addressed in a subsequent update. Additionally, the command-line tests (gz_TEST.cc and ModelCommandAPI_TEST.cc) are now configured to build after the gz model executable is created.

Test it

Check for UNIT_gz_TEST and UNIT_ModelCommandAPI_TEST

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.

@sauk2 sauk2 requested a review from mjcarroll as a code owner January 21, 2025 16:17
@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Jan 21, 2025
src/cmd/gz.cc Outdated Show resolved Hide resolved
src/cmd/gz.hh Outdated Show resolved Hide resolved
src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
@sauk2 sauk2 force-pushed the gz-sim-executable branch from a2ae8cd to 9ef3ce2 Compare February 6, 2025 14:02
@sauk2 sauk2 force-pushed the gz-sim-executable branch from 9ef3ce2 to e354baa Compare February 6, 2025 14:04
src/cmd/ModelCommandAPI_TEST.cc Show resolved Hide resolved
src/cmd/ModelCommandAPI_TEST.cc Show resolved Hide resolved
src/cmd/model_main.cc Show resolved Hide resolved
src/cmd/model_main.cc Show resolved Hide resolved
src/cmd/ModelCommandAPI.cc Outdated Show resolved Hide resolved
src/cmd/ModelCommandAPI.hh Outdated Show resolved Hide resolved
Signed-off-by: Saurabh Kamat <[email protected]>
@sauk2
Copy link
Contributor Author

sauk2 commented Feb 10, 2025

@azeey The failure in the macOS job has been resolved!

@sauk2 sauk2 requested review from ahcorde and azeey February 10, 2025 15:35
Comment on lines +18 to +19
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT GENERATOR_IS_MULTI_CONFIG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed for ModelCommandAPI since we're using the $<CONFIG> variable below which indicates that multi config generators are actually supported. If you move the ModelCommandAPI_TEST logic out of the if block and things fail, could you just add a TODO so we can come back to it later?

Copy link
Contributor Author

@sauk2 sauk2 Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the check for multi config generator also be removed when building the model command internal test script?

https://github.com/sauk2/gz-sim/blob/a8d00952f8ecd513c7f8a09fd16565f213011af3/src/cmd/CMakeLists.txt#L189

src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
@sauk2 sauk2 requested a review from azeey February 11, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

3 participants