Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9a66c8f
Moved sim cli source files into cmd
sauk2 Mar 4, 2025
e22f98b
Added sim executable
sauk2 Mar 4, 2025
7f505c4
Added validation checks for network flags
sauk2 Mar 5, 2025
cd1dab5
Merge branch 'gz-sim9' into sim-standalone-exe
sauk2 Mar 5, 2025
9962bed
Added command to run server without gui
sauk2 Mar 8, 2025
13cef03
Added command to run gui and server+gui
sauk2 Mar 9, 2025
87f72ba
Changed return type for function to get directory
sauk2 Mar 9, 2025
d1040b3
Merge branch 'gz-sim9' into sim-standalone-exe
sauk2 Mar 9, 2025
cd4715c
Added functions to check and parse SDF
sauk2 Mar 11, 2025
c0dcc98
Updated executable with SDF parsing and added render options
sauk2 Mar 11, 2025
2014f4c
Replaced library with standalone executable in ruby script and update…
sauk2 Mar 11, 2025
678491d
Fix styling
sauk2 Mar 11, 2025
03459d3
Removed includes to fix error
sauk2 Mar 11, 2025
f57e0cd
Added server and gui executables
sauk2 Mar 17, 2025
4013fb6
Calling server and gui executables as subprocesses from main
sauk2 Mar 17, 2025
b9896e1
Removed test subprocess implementestion
sauk2 Mar 26, 2025
564fec9
Removed server exe and moved all implementation to main executable
sauk2 Mar 26, 2025
f085785
Merge branch 'gz-sim9' into sim-standalone-exe
sauk2 Mar 26, 2025
d151512
Testing windows process launch
sauk2 Mar 31, 2025
ab6354b
Merge branch 'gz-sim9' into sim-standalone-exe
sauk2 Mar 31, 2025
f7b3791
Merge branch 'gz-sim9' into sim-standalone-exe
j-rivero Apr 2, 2025
c8d3d8c
Launching non-blocking server directly from main exe
sauk2 Apr 4, 2025
bd5f506
Added conditions to build executable with GUI
sauk2 Apr 5, 2025
0136419
Attempt to remove gui dependency from gz-sim
sauk2 Apr 5, 2025
bca5c37
Added new CI job to build sim without gui
sauk2 Apr 5, 2025
df22d5e
Merge branch 'gz-sim9' into sim-standalone-exe
j-rivero Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,21 @@ jobs:
# per bug https://github.com/gazebosim/gz-sim/issues/1409
cmake-args: '-DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo'
apt-dependencies: libdwarf-dev libdw-dev binutils-dev

noble-ci-disable-gui:
runs-on: ubuntu-latest
name: Ubuntu Noble CI (GUI disabled)
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@noble
with:
# per bug https://github.com/gazebosim/gz-sim/issues/1409
cmake-args: '-DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_GUI=OFF'
apt-dependencies: libdwarf-dev libdw-dev binutils-dev
24 changes: 15 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,21 @@ set(GZ_FUEL_TOOLS_VER ${gz-fuel_tools10_VERSION_MAJOR})

#--------------------------------------
# Find gz-gui
gz_find_package(gz-gui9 REQUIRED)
set(GZ_GUI_VER ${gz-gui9_VERSION_MAJOR})
gz_find_package (Qt5
COMPONENTS
Core
Quick
QuickControls2
REQUIRED
PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2")

# Option to build gz-sim with GUI support
option(ENABLE_GUI "Build gz-sim with GUI enabled" ON)

if(ENABLE_GUI)
gz_find_package(gz-gui9 REQUIRED)
set(GZ_GUI_VER ${gz-gui9_VERSION_MAJOR})
gz_find_package (Qt5
COMPONENTS
Core
Quick
QuickControls2
REQUIRED
PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2")
endif()

#--------------------------------------
# Find gz-physics
Expand Down
6 changes: 5 additions & 1 deletion include/gz/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
gz_install_all_headers()
if(ENABLE_GUI)
gz_install_all_headers()
else()
gz_install_all_headers(EXCLUDE_DIRS gui)
endif()

add_subdirectory(components)

Expand Down
48 changes: 20 additions & 28 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
add_subdirectory(rendering)
add_subdirectory(gui)

if(ENABLE_GUI)
add_subdirectory(gui)
add_compile_definitions(WITH_GUI)
endif()

add_subdirectory(systems)

file(GLOB gz_msgs_proto_files
Expand Down Expand Up @@ -50,14 +55,12 @@ set(comms_sources
comms/MsgManager.cc
)

set(gui_sources
${gui_sources}
PARENT_SCOPE
)

set(cli_sources
gz.cc
)
if(ENABLE_GUI)
set(gui_sources
${gui_sources}
PARENT_SCOPE
)
endif()

set(material_sources
rendering/MaterialParser/MaterialParser.cc
Expand Down Expand Up @@ -158,26 +161,9 @@ if (MSVC)
# members that don't get exported, so they trigger this warning. However, the
# warning is not important since those members do not need to be interfaced
# with.
set_source_files_properties(${sources} ${gtest_sources} ${cli_sources} COMPILE_FLAGS "/wd4251 /wd4146")
set_source_files_properties(${sources} ${gtest_sources} COMPILE_FLAGS "/wd4251 /wd4146")
endif()

# CLI
gz_add_component(gz
SOURCES
${cli_sources}
GET_TARGET_NAME gz_lib_target)
target_link_libraries(${gz_lib_target}
PUBLIC
${PROJECT_LIBRARY_TARGET_NAME}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-sim${PROJECT_VERSION_MAJOR}
gz-sim${PROJECT_VERSION_MAJOR}-gui
)

# Executable target that runs the GUI without ruby for debugging purposes.
add_executable(runGui cmd/runGui_main.cc)
target_link_libraries(runGui PRIVATE ${gz_lib_target})

# Create the library target
gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
gz_add_get_install_prefix_impl(GET_INSTALL_PREFIX_FUNCTION gz::sim::getInstallPrefix
Expand Down Expand Up @@ -205,7 +191,6 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
gz-common${GZ_COMMON_VER}::graphics
gz-common${GZ_COMMON_VER}::profiler
gz-fuel_tools${GZ_FUEL_TOOLS_VER}::gz-fuel_tools${GZ_FUEL_TOOLS_VER}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
gz-physics${GZ_PHYSICS_VER}::core
gz-rendering${GZ_RENDERING_VER}::core
gz-transport${GZ_TRANSPORT_VER}::gz-transport${GZ_TRANSPORT_VER}
Expand All @@ -216,6 +201,13 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
gz-plugin${GZ_PLUGIN_VER}::loader
)

if(ENABLE_GUI)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
)
endif()

if (pybind11_FOUND)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE pybind11::embed)
target_compile_definitions(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC -DHAVE_PYBIND11)
Expand Down
Loading