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

3 ➡️ 4 #973

Merged
merged 4 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ endif()

# This option is needed to use the PROTOBUF_GENERATE_CPP
# in case protobuf is found with the CMake config files
# It needs to be set before any find_package(...) call
# It needs to be set before any find_package(...) call
# as protobuf could be find transitively by any dependency
set(protobuf_MODULE_COMPATIBLE TRUE)

Expand Down
56 changes: 55 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,61 @@
### Ignition Gazebo 3.X.X (202X-XX-XX)


### Ignition Gazebo 3.9.0 (2021-07-XX)
### Ignition Gazebo 3.9.0 (2021-08-XX)

1. Be more specific when looking for physics plugins
* [Pull request #965](https://github.com/ignitionrobotics/ign-gazebo/pull/965)

1. Drag and drop meshes into scene
* [Pull request #939](https://github.com/ignitionrobotics/ign-gazebo/pull/939)

1. Set protobuf_MODULE_COMPATIBLE before any find_package call
* [Pull request #957](https://github.com/ignitionrobotics/ign-gazebo/pull/957)

1. [DiffDrive] add enable/disable
* [Pull request #772](https://github.com/ignitionrobotics/ign-gazebo/pull/772)

1. Fix component inspector shutdown crash
* [Pull request #724](https://github.com/ignitionrobotics/ign-gazebo/pull/724)

1. Add UserCommands Plugin.
* [Pull request #719](https://github.com/ignitionrobotics/ign-gazebo/pull/719)

1. Setting the intiial velocity for a model or joint
* [Pull request #693](https://github.com/ignitionrobotics/ign-gazebo/pull/693)

1. Examples and tutorial on using rendering API from plugins
* [Pull request #596](https://github.com/ignitionrobotics/ign-gazebo/pull/596)

1. Add missing IGNITION_GAZEBO_VISIBLE macros
* [Pull request #563](https://github.com/ignitionrobotics/ign-gazebo/pull/563)

1. Fix visibility macro names when used by a different component (Windows)
* [Pull request #564](https://github.com/ignitionrobotics/ign-gazebo/pull/564)

1. No install apt recommends and clear cache
* [Pull request #423](https://github.com/ignitionrobotics/ign-gazebo/pull/423)

1. Add 25percent darker view angle icons
* [Pull request #426](https://github.com/ignitionrobotics/ign-gazebo/pull/426)

1. Expose a test fixture helper class
* [Pull request #926](https://github.com/ignitionrobotics/ign-gazebo/pull/926)

1. Fix logic to disable server default plugins loading
* [Pull request #953](https://github.com/ignitionrobotics/ign-gazebo/pull/953)

1. removed unneeded plugin update
* [Pull request #944](https://github.com/ignitionrobotics/ign-gazebo/pull/944)

1. Functions to enable velocity and acceleration checks on Link
* [Pull request #935](https://github.com/ignitionrobotics/ign-gazebo/pull/935)

1. Support adding systems that don't come from a plugin
* [Pull request #936](https://github.com/ignitionrobotics/ign-gazebo/pull/936)

1. 3D plot GUI plugin
* [Pull request #917](https://github.com/ignitionrobotics/ign-gazebo/pull/917)

1. Add a convenience function for getting possibly non-existing components.
* [Pull request #629](https://github.com/ignitionrobotics/ign-gazebo/pull/629)
Expand Down
9 changes: 3 additions & 6 deletions src/ComponentFactory_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@
#include "ignition/gazebo/components/Factory.hh"
#include "ignition/gazebo/components/Pose.hh"

#include "../test/helpers/EnvTestFixture.hh"

using namespace ignition;
using namespace gazebo;

/////////////////////////////////////////////////
class ComponentFactoryTest : public ::testing::Test
class ComponentFactoryTest : public InternalFixture<::testing::Test>
{
// Documentation inherited
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
}
};

/////////////////////////////////////////////////
Expand Down
8 changes: 3 additions & 5 deletions src/Component_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@
#include "ignition/gazebo/components/Name.hh"
#include "ignition/gazebo/EntityComponentManager.hh"

#include "../test/helpers/EnvTestFixture.hh"

using namespace ignition;
using namespace gazebo;

//////////////////////////////////////////////////
class ComponentTest : public ::testing::Test
class ComponentTest : public InternalFixture<::testing::Test>
{
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
}
};

//////////////////////////////////////////////////
Expand Down
8 changes: 3 additions & 5 deletions src/EntityComponentManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "ignition/gazebo/components/Pose.hh"
#include "ignition/gazebo/EntityComponentManager.hh"
#include "ignition/gazebo/config.hh"
#include "../test/helpers/EnvTestFixture.hh"

using namespace ignition;
using namespace gazebo;
Expand Down Expand Up @@ -97,12 +98,9 @@ class EntityCompMgrTest : public EntityComponentManager
}
};

class EntityComponentManagerFixture : public ::testing::TestWithParam<int>
class EntityComponentManagerFixture
: public InternalFixture<::testing::TestWithParam<int>>
{
public: void SetUp() override
{
common::Console::SetVerbosity(4);
}
public: EntityCompMgrTest manager;
};

Expand Down
8 changes: 3 additions & 5 deletions src/SdfEntityCreator_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
#include "ignition/gazebo/components/World.hh"
#include "ignition/gazebo/SdfEntityCreator.hh"

#include "../test/helpers/EnvTestFixture.hh"

using namespace ignition;
using namespace gazebo;

Expand All @@ -64,12 +66,8 @@ class EntityCompMgrTest : public gazebo::EntityComponentManager
};

/////////////////////////////////////////////////
class SdfEntityCreatorTest : public ::testing::Test
class SdfEntityCreatorTest : public InternalFixture<::testing::Test>
{
public: void SetUp() override
{
ignition::common::Console::SetVerbosity(4);
}
public: EntityCompMgrTest ecm;
public: EventManager evm;
};
Expand Down
5 changes: 3 additions & 2 deletions src/SdfGenerator_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "ignition/gazebo/test_config.hh"

#include "helpers/UniqueTestDirectoryEnv.hh"
#include "helpers/EnvTestFixture.hh"

#include "SdfGenerator.hh"

Expand Down Expand Up @@ -147,11 +148,11 @@ TEST(CompareElements, CompareWithDuplicateElements)
}

/////////////////////////////////////////////////
class ElementUpdateFixture : public ::testing::Test
class ElementUpdateFixture : public InternalFixture<::testing::Test>
{
public: void SetUp() override
{
ignition::common::Console::SetVerbosity(4);
InternalFixture::SetUp();

fuel_tools::ClientConfig config;
config.SetCacheLocation(test::UniqueTestDirectoryEnv::Path());
Expand Down
18 changes: 14 additions & 4 deletions src/ServerConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -875,17 +875,27 @@ ignition::gazebo::loadPluginInfo(bool _isPlayback)
configFilename = "server.config";
}

std::string defaultConfig;
ignition::common::env(IGN_HOMEDIR, defaultConfig);
defaultConfig = ignition::common::joinPaths(defaultConfig, ".ignition",
"gazebo", configFilename);
std::string defaultConfigDir;
ignition::common::env(IGN_HOMEDIR, defaultConfigDir);
defaultConfigDir = ignition::common::joinPaths(defaultConfigDir, ".ignition",
"gazebo");

auto defaultConfig = ignition::common::joinPaths(defaultConfigDir,
configFilename);

if (!ignition::common::exists(defaultConfig))
{
auto installedConfig = ignition::common::joinPaths(
IGNITION_GAZEBO_SERVER_CONFIG_PATH,
configFilename);

if (!ignition::common::createDirectories(defaultConfigDir))
{
ignerr << "Failed to create directory [" << defaultConfigDir
<< "]." << std::endl;
return ret;
}

if (!ignition::common::exists(installedConfig))
{
ignerr << "Failed to copy installed config [" << installedConfig
Expand Down
4 changes: 0 additions & 4 deletions src/ServerPrivate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,8 @@ void ServerPrivate::AddRecordPlugin(const ServerConfig &_config)

if (sdfUseLogRecord)
{
bool hasCompress {false};
bool sdfCompress;
std::tie(sdfRecordResources, hasRecordResources) =
recordPluginElem->Get<bool>("record_resources", false);
std::tie(sdfCompress, hasCompress) =
recordPluginElem->Get<bool>("compress", false);

hasRecordTopics = recordPluginElem->HasElement("record_topic");
if (hasRecordTopics)
Expand Down
5 changes: 5 additions & 0 deletions src/Server_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ using namespace ignition;
using namespace ignition::gazebo;
using namespace std::chrono_literals;

/////////////////////////////////////////////////
class ServerFixture : public InternalFixture<::testing::TestWithParam<int>>
{
};

/////////////////////////////////////////////////
TEST_P(ServerFixture, DefaultServerConfig)
{
Expand Down
13 changes: 4 additions & 9 deletions src/SimulationRunner_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include "ignition/gazebo/Events.hh"
#include "ignition/gazebo/Util.hh"
#include "ignition/gazebo/config.hh"
#include "../test/helpers/EnvTestFixture.hh"
#include "SimulationRunner.hh"

using namespace ignition;
Expand All @@ -79,16 +80,10 @@ IGN_GAZEBO_REGISTER_COMPONENT("ign_gazebo_components.DoubleComponent",
}
}

class SimulationRunnerTest : public ::testing::TestWithParam<int>
/////////////////////////////////////////////////
class SimulationRunnerTest
: public InternalFixture<::testing::TestWithParam<int>>
{
// Documentation inherited
protected: void SetUp() override
{
common::Console::SetVerbosity(4);

common::setenv("IGN_GAZEBO_SYSTEM_PLUGIN_PATH",
common::joinPaths(PROJECT_BINARY_PATH, "lib"));
}
};

std::vector<msgs::Clock> clockMsgs;
Expand Down
9 changes: 2 additions & 7 deletions src/TestFixture_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,15 @@
#include "ignition/gazebo/components/Name.hh"
#include "ignition/gazebo/ServerConfig.hh"
#include "ignition/gazebo/test_config.hh"
#include "../test/helpers/EnvTestFixture.hh"
#include "ignition/gazebo/TestFixture.hh"

using namespace ignition;
using namespace gazebo;

/////////////////////////////////////////////////
class TestFixtureTest : public ::testing::Test
class TestFixtureTest : public InternalFixture<::testing::Test>
{
// Documentation inherited
public: void SetUp() override
{
common::Console::SetVerbosity(4);
}

/// \brief Configure expectations
public: void Configure(const Entity &_entity,
const std::shared_ptr<const sdf::Element> &_sdf,
Expand Down
9 changes: 3 additions & 6 deletions src/Util_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@
#include "ignition/gazebo/EntityComponentManager.hh"
#include "ignition/gazebo/Util.hh"

#include "helpers/EnvTestFixture.hh"

using namespace ignition;
using namespace gazebo;

/// \brief Tests for Util.hh
class UtilTest : public ::testing::Test
class UtilTest : public InternalFixture<::testing::Test>
{
// Documentation inherited
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
}
};

/////////////////////////////////////////////////
Expand Down
8 changes: 7 additions & 1 deletion src/gui/Gui_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@
#include "ignition/gazebo/gui/Gui.hh"
#include "ignition/gazebo/test_config.hh"

#include "../../test/helpers/EnvTestFixture.hh"

int gg_argc = 1;
char **gg_argv = new char *[gg_argc];

using namespace ignition;
using namespace gazebo;

class GuiTest : public InternalFixture<::testing::Test>
{
};

/////////////////////////////////////////////////
// https://github.com/ignitionrobotics/ign-gazebo/issues/8
TEST(GuiTest, IGN_UTILS_TEST_DISABLED_ON_MAC(PathManager))
TEST_F(GuiTest, IGN_UTILS_TEST_DISABLED_ON_MAC(PathManager))
{
common::Console::SetVerbosity(4);
igndbg << "Start test" << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "ignition/gazebo/gui/GuiRunner.hh"
#include "ignition/gazebo/EntityComponentManager.hh"
#include "ignition/gazebo/test_config.hh"
#include "../../../../test/helpers/EnvTestFixture.hh"

#include "JointPositionController.hh"

Expand All @@ -49,13 +50,8 @@ char **g_argv;
using namespace ignition;

/// \brief Tests for the joint position controller GUI plugin
class JointPositionControllerGui : public ::testing::Test
class JointPositionControllerGui : public InternalFixture<::testing::Test>
{
// Documentation inherited
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
}
};

/////////////////////////////////////////////////
Expand Down
8 changes: 2 additions & 6 deletions src/gui/plugins/plot_3d/Plot3D_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "ignition/gazebo/components/ParentEntity.hh"
#include "ignition/gazebo/EntityComponentManager.hh"
#include "ignition/gazebo/test_config.hh"
#include "../../../../test/helpers/EnvTestFixture.hh"

// Use this when forward-porting to v6
// #include "../../GuiRunner.hh"
Expand All @@ -55,13 +56,8 @@ char* g_argv[] =
using namespace ignition;

/// \brief Tests for the joint position controller GUI plugin
class Plot3D : public ::testing::Test
class Plot3D : public InternalFixture<::testing::Test>
{
// Documentation inherited
protected: void SetUp() override
{
common::Console::SetVerbosity(4);
}
};

/////////////////////////////////////////////////
Expand Down
Loading