Skip to content

Commit

Permalink
Merge pull request #2013 from azeey/3_to_6
Browse files Browse the repository at this point in the history
Merge ign-gazebo3 ➡️  ign-gazebo6
  • Loading branch information
azeey authored Jun 16, 2023
2 parents dfb7039 + c911f69 commit 4ce01ea
Show file tree
Hide file tree
Showing 12 changed files with 637 additions and 177 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Ubuntu CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'ign-gazebo6'

jobs:
bionic-ci:
Expand Down
64 changes: 64 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2243,6 +2243,70 @@

## Gazebo Sim 3.x

### Gazebo Sim 3.15.0 (2023-05-08)

1. Speed up Resource Spawner load time by fetching model list asynchronously
* [Pull request #1962](https://github.com/gazebosim/gz-sim/pull/1962)

1. ign -> gz Migrate Ignition Headers : gz-sim
* [Pull request #1646](https://github.com/gazebosim/gz-sim/pull/1646)
* [Pull request #1967](https://github.com/gazebosim/gz-sim/pull/1967)
* [Pull request #1978](https://github.com/gazebosim/gz-sim/pull/1978)
* [Pull request #1983](https://github.com/gazebosim/gz-sim/pull/1983)
* [Pull request #1985](https://github.com/gazebosim/gz-sim/pull/1985)

1. Infrastructure
* [Pull request #1940](https://github.com/gazebosim/gz-sim/pull/1940)
* [Pull request #1937](https://github.com/gazebosim/gz-sim/pull/1937)

1. Backport portion of #1771 to fix command-line test
* [Pull request #1771](https://github.com/gazebosim/gz-sim/pull/1771)

1. cmdsim.rb: fix ruby syntax
* [Pull request #1884](https://github.com/gazebosim/gz-sim/pull/1884)

1. Fix loading wold with record topic
* [Pull request #1855](https://github.com/gazebosim/gz-sim/pull/1855)

1. Remove duplicate Fuel server used by ResourceSpawner
* [Pull request #1830](https://github.com/gazebosim/gz-sim/pull/1830)

1. Re-add namespace for GUI render event
* [Pull request #1826](https://github.com/gazebosim/gz-sim/pull/1826)

1. Fix QML warnings regarding binding loops
* [Pull request #1829](https://github.com/gazebosim/gz-sim/pull/1829)

1. Update documentation on `UpdateInfo::realTime`
* [Pull request #1817](https://github.com/gazebosim/gz-sim/pull/1817)

1. Add jennuine as GUI codeowner
* [Pull request #1800](https://github.com/gazebosim/gz-sim/pull/1800)

1. Remove plotIcon in Physics.qml for Component Inspector
* [Pull request #1658](https://github.com/gazebosim/gz-sim/pull/1658)

1. Convert ignitionrobotics to gazebosim in tutorials
* [Pull request #1757](https://github.com/gazebosim/gz-sim/pull/1757)
* [Pull request #1758](https://github.com/gazebosim/gz-sim/pull/1758)
* [Pull request #1759](https://github.com/gazebosim/gz-sim/pull/1759)
* [Pull request #1760](https://github.com/gazebosim/gz-sim/pull/1760)

1. Added collection name to About Dialog
* [Pull request #1756](https://github.com/gazebosim/gz-sim/pull/1756)

1. Remove compiler warnings
* [Pull request #1753](https://github.com/gazebosim/gz-sim/pull/1753)

1. Update examples to use gazebosim.org
* [Pull request #1749](https://github.com/gazebosim/gz-sim/pull/1749)

1. Remove actors from screen when they are supposed to
* [Pull request #1699](https://github.com/gazebosim/gz-sim/pull/1699)

1. Readd namespaces for Q_ARGS
* [Pull request #1670](https://github.com/gazebosim/gz-sim/pull/1670)

### Gazebo Sim 3.14.0 (2022-08-17)

1. Change `CODEOWNERS` and maintainer to Michael
Expand Down
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ ign_add_component(ign
${cli_sources}
GET_TARGET_NAME ign_lib_target)
target_link_libraries(${ign_lib_target}
PRIVATE
PUBLIC
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-gazebo${PROJECT_VERSION_MAJOR}
ignition-gazebo${PROJECT_VERSION_MAJOR}-gui
)

# Executable target that runs the GUI without ruby for debugging purposes.
add_executable(runGui gz.cc)
target_link_libraries(runGui PRIVATE ${ign_lib_target})

# Create the library target
ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
Expand Down
8 changes: 8 additions & 0 deletions src/Server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ Server::Server(const ServerConfig &_config)
return;
}

if (this->dataPtr->sdfRoot.WorldCount() == 0)
{
ignerr << "SDF file doesn't contain a world. " <<
"If you wish to spawn a model, use the ResourceSpawner GUI plugin " <<
"or the 'world/<world_name>/create' service.\n";
return;
}

// Add record plugin
if (_config.UseLogRecord())
{
Expand Down
39 changes: 39 additions & 0 deletions src/Server_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,45 @@ TEST_P(ServerFixture, Stop)
EXPECT_FALSE(server.Running());
}

/////////////////////////////////////////////////
TEST_P(ServerFixture, SdfWithoutWorld)
{
// Initialize logging
std::string logBasePath = common::joinPaths(PROJECT_BINARY_PATH, "tmp");
common::setenv(IGN_HOMEDIR, logBasePath);
std::string path = common::uuid();
ignLogInit(path, "test.log");

// Start server with model SDF file
ServerConfig serverConfig;
serverConfig.SetSdfFile(common::joinPaths(PROJECT_SOURCE_PATH,
"test", "worlds", "models", "sphere", "model.sdf"));

gz::sim::Server server(serverConfig);
EXPECT_FALSE(server.Running());
EXPECT_FALSE(server.Running(0).has_value());

// Check error message in log file
std::string logFullPath = common::joinPaths(logBasePath, path, "test.log");
std::ifstream ifs(logFullPath.c_str(), std::ios::in);
bool errFound = false;
while ((!errFound) && (!ifs.eof()))
{
std::string line;
std::getline(ifs, line);
std::string errString = "SDF file doesn't contain a world. ";
errString += "If you wish to spawn a model, ";
errString += "use the ResourceSpawner GUI plugin ";
errString += "or the 'world/<world_name>/create' service.";
errFound = (line.find(errString) != std::string::npos);
}
EXPECT_TRUE(errFound);

// Stop logging
ignLogClose();
common::removeAll(logBasePath);
}

// Run multiple times. We want to make sure that static globals don't cause
// problems.
INSTANTIATE_TEST_SUITE_P(ServerRepeat, ServerFixture, ::testing::Range(1, 2));
Loading

0 comments on commit 4ce01ea

Please sign in to comment.