Skip to content

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 added 8 commits January 19, 2025 19:05
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@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
sauk2 and others added 3 commits January 22, 2025 00:19
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
sauk2 and others added 4 commits February 5, 2025 14:28
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@sauk2 sauk2 force-pushed the gz-sim-executable branch from a2ae8cd to 9ef3ce2 Compare February 6, 2025 14:02
…im-executable

Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@sauk2 sauk2 force-pushed the gz-sim-executable branch from 9ef3ce2 to e354baa Compare February 6, 2025 14:04
sauk2 added 5 commits February 6, 2025 22:04
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@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
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@sauk2 sauk2 requested a review from azeey February 11, 2025 12:00
Copy link
Contributor

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

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

An amazing work @sauk2 ! Minor comments and one important thing about the --pose parameter. Very close to get this ready.


set(cli_sources
gz.cc
cmd/ModelCommandAPI.cc
Copy link
Contributor

Choose a reason for hiding this comment

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

It surprise me that we can remove this from the sources and the resulting code is still doing the same than before unless it was a superfluous source. Was it the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is now used by the model_main.cc, so, CMakeLists.txt inside cmd now builds the executable using it.

./src/cmd/CMakeLists.txt

# Create model executable
set(model_executable gz-sim-model)
add_executable(${model_executable} model_main.cc ModelCommandAPI.cc)
target_link_libraries(${model_executable}
  gz-utils${GZ_UTILS_VER}::cli
  ${PROJECT_LIBRARY_TARGET_NAME}
)

Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
Signed-off-by: Saurabh Kamat <kamatsaurabh01@gmail.com>
@sauk2
Copy link
Contributor Author

sauk2 commented Feb 13, 2025

An amazing work @sauk2 ! Minor comments and one important thing about the --pose parameter. Very close to get this ready.

Thanks for the feedback! I have made the requested changes

@sauk2 sauk2 requested a review from j-rivero February 13, 2025 14:20
Copy link
Contributor

@j-rivero j-rivero left a comment

Choose a reason for hiding this comment

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

The failing test seems like a flaky
image

and I think that we are good to go! Nice work again Saurabh.

@j-rivero j-rivero merged commit 2e36d08 into gazebosim:gz-sim9 Feb 17, 2025
11 checks passed
@sauk2 sauk2 deleted the gz-sim-executable branch February 19, 2025 13:07
@sauk2 sauk2 mentioned this pull request Mar 11, 2025
9 tasks
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: Done

Development

Successfully merging this pull request may close these issues.

4 participants