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 18 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
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT GENERATOR_IS_MULTI_CONFIG)
list(APPEND test_sources
../gz_TEST.cc
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're not migrating gz, we should probably keep it there. Also, Should we move ModelCommandAPI_TEST.cc in this directory? Using source files from the parent directory seems odd to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have also moved gz_TEST.cc into cmd because it currently contains one model-related test

TEST(CmdLine, GZ_UTILS_TEST_DISABLED_ON_WIN32(ModelHelpVsCompletionFlags))

Comment on lines 54 to 59
# Running `gz sim` on macOS has problems when run with /usr/bin/ruby
# due to System Integrity Protection (SIP). Try to find ruby from
# homebrew as a workaround.
if (APPLE)
find_program(BREW_RUBY ruby HINTS /usr/local/opt/ruby/bin)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're running just UNIT_ModelCommandAPI_TEST, we shouldn't have to worry about this since we won't be loading dlls.

src/cmd/CMakeLists.txt 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
sauk2 added 2 commits February 6, 2025 22:04
Signed-off-by: Saurabh Kamat <[email protected]>
Signed-off-by: Saurabh Kamat <[email protected]>
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.

2 participants