Skip to content

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented May 23, 2025

🦟 Bug fix

Fixes #2918

Summary

There is a bug in cli11 for versions >= 2.2 and < 2.5. This works around the bug for the affected versions, similar to the approached identified by @j-rivero in #2910 (comment).

To test, I will run a colcon CI job on 24.04 (which has cli11 version 2.4.1) with vending of cli11 disabled by reverting gazebosim/gz-utils#178.

Test summary

--- output: gz-utils
...
-- Looking for CLI11 - found
...
83: [  PASSED  ] 8 tests.
 83/328 Test  #83: UNIT_ModelCommandAPI_TEST ...............................   Passed   15.53 sec

Full console output

83: Running main() from /tmp/ws/src/gz-sim/test/gtest_vendor/src/gtest_main.cc
83: [==========] Running 8 tests from 1 test suite.
83: [----------] Global test environment set-up.
83: [----------] 8 tests from ModelCommandAPI
83: [ RUN      ] ModelCommandAPI.NoServerRunning
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model --list ]
83: [       OK ] ModelCommandAPI.NoServerRunning (5166 ms)
83: [ RUN      ] ModelCommandAPI.Commands
83: (2025-05-27 19:39:20.153) [error] [Physics.cc:845] Failed to find plugin [gz-physics-dartsim-plugin]. Have you checked the GZ_SIM_PHYSICS_ENGINE_PATH environment variable?
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model --list]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue --pose ]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue --link]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue --link caster]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue --joint]
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m vehicle_blue --joint caster_wheel]
83: [       OK ] ModelCommandAPI.Commands (6267 ms)
83: [ RUN      ] ModelCommandAPI.AirPressureSensor
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m air_pressure_model -l link -s air_pressure_sensor]
83: [       OK ] ModelCommandAPI.AirPressureSensor (595 ms)
83: [ RUN      ] ModelCommandAPI.AltimeterSensor
83: (2025-05-27 19:39:26.848) [error] [Physics.cc:845] Failed to find plugin [gz-physics-dartsim-plugin]. Have you checked the GZ_SIM_PHYSICS_ENGINE_PATH environment variable?
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m altimeter_model -l link -s altimeter_sensor]
83: [       OK ] ModelCommandAPI.AltimeterSensor (706 ms)
83: [ RUN      ] ModelCommandAPI.GpuLidarSensor
83: (2025-05-27 19:39:27.560) [error] [Physics.cc:845] Failed to find plugin [gz-physics-dartsim-plugin]. Have you checked the GZ_SIM_PHYSICS_ENGINE_PATH environment variable?
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m gpu_lidar -l gpu_lidar_link -s gpu_lidar]
83: [       OK ] ModelCommandAPI.GpuLidarSensor (583 ms)
83: [ RUN      ] ModelCommandAPI.MagnetometerSensor
83: (2025-05-27 19:39:28.138) [error] [Physics.cc:845] Failed to find plugin [gz-physics-dartsim-plugin]. Have you checked the GZ_SIM_PHYSICS_ENGINE_PATH environment variable?
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m magnetometer_model -l link -s magnetometer_sensor]
83: [       OK ] ModelCommandAPI.MagnetometerSensor (874 ms)
83: [ RUN      ] ModelCommandAPI.RgbdCameraSensor
83: (2025-05-27 19:39:29.016) [error] [Physics.cc:845] Failed to find plugin [gz-physics-dartsim-plugin]. Have you checked the GZ_SIM_PHYSICS_ENGINE_PATH environment variable?
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model -m rgbd_camera -l rgbd_camera_link -s rgbd_camera]
83: [       OK ] ModelCommandAPI.RgbdCameraSensor (1129 ms)
83: [ RUN      ] ModelCommandAPI.ModelHelpVsCompletionFlags
83: Running command [/tmp/ws/install_isolated/gz-tools2/bin/gz model  --help]
83: Running command [bash -c ". /tmp/ws/src/gz-sim/src/cmd/model.bash_completion.sh; _gz_model_flags"]
83: [       OK ] ModelCommandAPI.ModelHelpVsCompletionFlags (166 ms)
83: [----------] 8 tests from ModelCommandAPI (15490 ms total)
83: 
83: [----------] Global test environment tear-down
83: [==========] 8 tests from 1 test suite ran. (15490 ms total)
83: [  PASSED  ] 8 tests.
 83/328 Test  #83: UNIT_ModelCommandAPI_TEST ...............................   Passed   15.53 sec

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

There is a bug in cli11 for versions >= 2.2 and < 2.5.
This works around the bug for the affected versions.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters requested review from iche033 and j-rivero May 23, 2025 22:37
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label May 23, 2025
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters force-pushed the scpeters/workaround_cli11_bug branch from 32efeb2 to aacf1db Compare May 27, 2025 16:18
@scpeters scpeters marked this pull request as ready for review May 27, 2025 23:27
@scpeters scpeters requested a review from mjcarroll as a code owner May 27, 2025 23:27
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

I haven't seen the UNIT_SystemLoader_TEST failures in the gz_sim-pr-cnlwin build before but they look unrelated.

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development May 29, 2025
@scpeters scpeters merged commit b8de954 into main May 29, 2025
7 of 9 checks passed
@scpeters scpeters deleted the scpeters/workaround_cli11_bug branch May 29, 2025 01:07
@github-project-automation github-project-automation bot moved this from In review to Done in Core development May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants