Skip to content

Commit

Permalink
ign -> gz: namespaces, docs, gz-tools2 (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
methylDragon and chapulina authored May 28, 2022
1 parent 8426cd6 commit 5297c3e
Show file tree
Hide file tree
Showing 112 changed files with 579 additions and 482 deletions.
2 changes: 1 addition & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libignition-cmake3-dev
libignition-tools-dev
libignition-tools2-dev
libignition-utils2-cli-dev
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ign_find_package(DL

#--------------------------------------
# Find ignition-tools
find_program(IGN_TOOLS_PROGRAM ign)
find_program(GZ_TOOLS_PROGRAM ign)


#--------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
See the [Ignition Robotics contributing guide](https://ignitionrobotics.org/docs/all/contributing).
See the [Gazebo contributing guide](https://gazebosim.org/docs/all/contributing).
54 changes: 27 additions & 27 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
## Ignition Plugin 1.x
## Gazebo Plugin 1.x

### Ignition Plugin 1.2.1 (2021-09-24)
### Gazebo Plugin 1.2.1 (2021-09-24)

1. Add Doxygen documentation checks to CI
* [Pull request #59](https://github.com/ignitionrobotics/ign-plugin/pull/59)
* [Pull request #59](https://github.com/gazebosim/gz-plugin/pull/59)

1. Infrastructure
* [Pull request #58](https://github.com/ignitionrobotics/ign-plugin/pull/58)
* [Pull request #52](https://github.com/ignitionrobotics/ign-plugin/pull/52)
* [Pull request #51](https://github.com/ignitionrobotics/ign-plugin/pull/51)
* [Pull request #58](https://github.com/gazebosim/gz-plugin/pull/58)
* [Pull request #52](https://github.com/gazebosim/gz-plugin/pull/52)
* [Pull request #51](https://github.com/gazebosim/gz-plugin/pull/51)

1. Find ign program instead of ignition-tools
* [Pull request #57](https://github.com/ignitionrobotics/ign-plugin/pull/57)
* [Pull request #57](https://github.com/gazebosim/gz-plugin/pull/57)

1. Remove ign-tools from CMakeLists.txt. Not used
* [Pull request #56](https://github.com/ignitionrobotics/ign-plugin/pull/56)
* [Pull request #56](https://github.com/gazebosim/gz-plugin/pull/56)

### Ignition Plugin 1.2.0 (2021-03-30)
### Gazebo Plugin 1.2.0 (2021-03-30)

1. Infrastructure
* [Pull request #45](https://github.com/ignitionrobotics/ign-plugin/pull/45)
* [Pull request #44](https://github.com/ignitionrobotics/ign-plugin/pull/44)
* [Pull request #43](https://github.com/ignitionrobotics/ign-plugin/pull/43)
* [Pull request #36](https://github.com/ignitionrobotics/ign-plugin/pull/36)
* [Pull request #28](https://github.com/ignitionrobotics/ign-plugin/pull/28)
* [Pull request #26](https://github.com/ignitionrobotics/ign-plugin/pull/26)
* [Pull request #15](https://github.com/ignitionrobotics/ign-plugin/pull/15)
* [Pull request #10](https://github.com/ignitionrobotics/ign-plugin/pull/10)
* [Pull request #14](https://github.com/ignitionrobotics/ign-plugin/pull/14)
* [Pull request #8](https://github.com/ignitionrobotics/ign-plugin/pull/8)
* [Pull request #47](https://github.com/ignitionrobotics/ign-plugin/pull/47)
* [Pull request #45](https://github.com/gazebosim/gz-plugin/pull/45)
* [Pull request #44](https://github.com/gazebosim/gz-plugin/pull/44)
* [Pull request #43](https://github.com/gazebosim/gz-plugin/pull/43)
* [Pull request #36](https://github.com/gazebosim/gz-plugin/pull/36)
* [Pull request #28](https://github.com/gazebosim/gz-plugin/pull/28)
* [Pull request #26](https://github.com/gazebosim/gz-plugin/pull/26)
* [Pull request #15](https://github.com/gazebosim/gz-plugin/pull/15)
* [Pull request #10](https://github.com/gazebosim/gz-plugin/pull/10)
* [Pull request #14](https://github.com/gazebosim/gz-plugin/pull/14)
* [Pull request #8](https://github.com/gazebosim/gz-plugin/pull/8)
* [Pull request #47](https://github.com/gazebosim/gz-plugin/pull/47)

1. Include windows instructions in examples README.md and fix examples to compile them on Windows
* [Pull request #48](https://github.com/ignitionrobotics/ign-plugin/pull/48)
* [Pull request #48](https://github.com/gazebosim/gz-plugin/pull/48)

1. Fix downstream Windows builds
* [Pull request #38](https://github.com/ignitionrobotics/ign-plugin/pull/38)
* [Pull request #38](https://github.com/gazebosim/gz-plugin/pull/38)

1. Add `ign plugin --info` to print plugin info
* [Pull request #32](https://github.com/ignitionrobotics/ign-plugin/pull/32)
* [Pull request #32](https://github.com/gazebosim/gz-plugin/pull/32)

1. Add Windows installation
* [Pull request #34](https://github.com/ignitionrobotics/ign-plugin/pull/34)
* [Pull request #34](https://github.com/gazebosim/gz-plugin/pull/34)

1. Add plugin name accessor
* [Pull request #29](https://github.com/ignitionrobotics/ign-plugin/pull/29)
* [Pull request #29](https://github.com/gazebosim/gz-plugin/pull/29)

### Ignition Plugin 1.1.0 (2019-11-21)
### Gazebo Plugin 1.1.0 (2019-11-21)

1. Add SelectSpecializers to allow ign-physics to improve compilation time.
* [BitBucket pull request 32](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-physics/pull-requests/32)

### Ignition Plugin 1.0.0 (2019-02-05)
### Gazebo Plugin 1.0.0 (2019-02-05)

1. Initial release

14 changes: 14 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Note on deprecations
A tick-tock release cycle allows easy migration to new software versions.
Obsolete code is marked as deprecated for one major release.
Deprecated code produces compile-time warnings. These warning serve as
notification to users that their code should be upgraded. The next major
release will remove the deprecated code.

## Gazebo Plugin 1.X to 2.X

* The `ignition` namespace is deprecated and will be removed in future versions.
Use `gz` instead.

* Header files under `ignition/...` are deprecated and will be removed in future versions.
Use `gz/...` instead.
13 changes: 6 additions & 7 deletions MIGRATION.md → MigrationFromCommon.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Migration Instructions
# Migration Instructions (from common::Plugin)

This file provides migration instructions for `ignition` library developers to
replace the `ignition-common` plugin framework with the `ignition-plugin`
Expand All @@ -16,13 +16,13 @@ target_link_libraries(my_target PUBLIC ignition-plugin2::core)

However, if your code wants to be able to load plugins, it should link to the
`loader` component. In most cases, it should probably link privately, unless you
need the `ignition::plugin::Loader` class to be part of your library's API:
need the `gz::plugin::Loader` class to be part of your library's API:

```
target_link_libraries(my_target PRIVATE ignition-plugin2::loader)
```

If `ignition::plugin::PluginPtr` objects are part of your library's API, then
If `gz::plugin::PluginPtr` objects are part of your library's API, then
you may want `loader` to be private while `core` is public:

```
Expand Down Expand Up @@ -77,15 +77,15 @@ you choose exactly one.

# Loading a library

The `ignition::common::SystemPaths` class was not ported into `ign-plugin`
The `gz::common::SystemPaths` class was not ported into `ign-plugin`
because it is more related to filesystem utilities than to plugins. If you are
currently using `ignition::common::SystemPaths` to help with loading plugins,
currently using `gz::common::SystemPaths` to help with loading plugins,
then you should continue to use it. It does not have a replacement in `ign-plugin`.

Here is a list of things that you *should* replace:

* `#include <ignition/common/PluginLoader.hh>` should be replaced with `#include <ignition/plugin/Loader.hh>`
* `ignition::common::PluginLoader` should be replaced with `ignition::plugin::Loader`
* `gz::common::PluginLoader` should be replaced with `gz::plugin::Loader`
* When calling `Loader::Instantiate("....")` do **NOT** prefix the class name with `::`. E.g. `"::some_namespace::MyClass"` should now be `"some_namespace::MyClass"`.


Expand Down Expand Up @@ -164,4 +164,3 @@ In general, plugin names that get passed to a `Loader` should not be hard-coded.
They should be selected by either inspecting what interfaces they provide, or by
having a user specify the plugin name. This rule of thumb applies to both
template-based classes and to regular classes.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# Ignition Plugin
# Gazebo Plugin

**Maintainer:** grey [AT] openrobotics [DOT] org

[![GitHub open issues](https://img.shields.io/github/issues-raw/ignitionrobotics/ign-plugin.svg)](https://github.com/ignitionrobotics/ign-plugin/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/ignitionrobotics/ign-plugin.svg)](https://github.com/ignitionrobotics/ign-plugin/pulls)
[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-plugin.svg)](https://github.com/gazebosim/gz-plugin/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-plugin.svg)](https://github.com/gazebosim/gz-plugin/pulls)
[![Discourse topics](https://img.shields.io/discourse/https/community.gazebosim.org/topics.svg)](https://community.gazebosim.org)
[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-plugin/branch/master)
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-plugin/branch/master)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/job/ignition_plugin-ci-master-focal-amd64/badge/icon)](https://build.osrfoundation.org/job/ignition_plugin-ci-master-focal-amd64/)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_plugin-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_plugin-ci-main-homebrew-amd64)
Windows 7 | [![Build Status](https://build.osrfoundation.org/job/ignition_plugin-ci-master-windows7-amd64/badge/icon)](https://build.osrfoundation.org/job/ignition_plugin-ci-master-windows7-amd64/)

** Library for registering plugin libraries and dynamically loading them at runtime.**

Ignition Plugin is a component in the ignition framework, a set
Gazebo Plugin is a component in the ignition framework, a set
of libraries designed to rapidly develop robot applications.

[http://ignitionrobotics.org](http://ignitionrobotics.org)
[http://gazebosim.org](http://gazebosim.org)

## Features

Expand All @@ -31,8 +31,8 @@ of libraries designed to rapidly develop robot applications.

## Installation

See the [installation tutorial](https://ignitionrobotics.org/api/plugin/1.2/installation.html).
See the [installation tutorial](https://gazebosim.org/api/plugin/1.2/installation.html).

# Documentation

API documentation and tutorials can be accessed at [https://ignitionrobotics.org/libs/plugin](https://ignitionrobotics.org/libs/plugin)
API documentation and tutorials can be accessed at [https://gazebosim.org/libs/plugin](https://gazebosim.org/libs/plugin)
2 changes: 1 addition & 1 deletion api.md.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Ignition @IGN_DESIGNATION_CAP@

Ignition @IGN_DESIGNATION_CAP@ is a component in Ignition Robotics, a set of libraries
Ignition @IGN_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries
designed to rapidly develop robot and simulation applications.

## License
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ environment:
install:
- vcpkg install dlfcn-win32
# ign-cmake
- git clone https://github.com/ignitionrobotics/ign-cmake -b gz11
- git clone https://github.com/gazebosim/gz-cmake -b gz11
- cd ign-cmake
- md build
- cd build
Expand Down
4 changes: 2 additions & 2 deletions core/include/gz/plugin/EnablePluginFromThis.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <gz/plugin/PluginPtr.hh>

namespace ignition
namespace gz
{
namespace plugin
{
Expand All @@ -37,7 +37,7 @@ namespace ignition
/// `instance->QueryInterface<EnablePluginFromThis>()`
///
/// \remark This class is analogous to std::enable_shared_from_this
class IGNITION_PLUGIN_VISIBLE EnablePluginFromThis
class GZ_PLUGIN_VISIBLE EnablePluginFromThis
{
/// \brief Default constructor
public: EnablePluginFromThis();
Expand Down
6 changes: 3 additions & 3 deletions core/include/gz/plugin/Factory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <gz/plugin/EnablePluginFromThis.hh>

namespace ignition
namespace gz
{
namespace plugin
{
Expand Down Expand Up @@ -132,14 +132,14 @@ namespace ignition
/// destructed (or if you have a single-threaded application), then it is
/// okay to set this waiting time to 0. Note that any threads which are
/// about to destruct a product will be blocked until this wait is over.
void IGNITION_PLUGIN_VISIBLE CleanupLostProducts(
void GZ_PLUGIN_VISIBLE CleanupLostProducts(
const std::chrono::nanoseconds &_safetyWait =
std::chrono::nanoseconds(5));

/// \brief Get the number of lost products that have currently accumulated
/// since the last time CleanupLostProducts() was called (or since the
/// program began, if CleanupLostProducts() has not been called yet).
std::size_t IGNITION_PLUGIN_VISIBLE LostProductCount();
std::size_t GZ_PLUGIN_VISIBLE LostProductCount();
}
}

Expand Down
4 changes: 2 additions & 2 deletions core/include/gz/plugin/Info.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <gz/plugin/Export.hh>

namespace ignition
namespace gz
{
namespace plugin
{
Expand All @@ -48,7 +48,7 @@ namespace ignition
inline namespace v1
{
/// \brief Holds info required to construct a plugin
struct IGNITION_PLUGIN_VISIBLE Info
struct GZ_PLUGIN_VISIBLE Info
{
/// \brief Clear out all information contained in this Info object
void Clear();
Expand Down
4 changes: 2 additions & 2 deletions core/include/gz/plugin/Plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <gz/plugin/Export.hh>
#include <gz/plugin/Info.hh>

namespace ignition
namespace gz
{
namespace plugin
{
Expand All @@ -40,7 +40,7 @@ namespace ignition
class EnablePluginFromThis;
class WeakPluginPtr;

class IGNITION_PLUGIN_VISIBLE Plugin
class GZ_PLUGIN_VISIBLE Plugin
{
// -------------------- Public API ---------------------

Expand Down
4 changes: 2 additions & 2 deletions core/include/gz/plugin/PluginPtr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@

#include <gz/plugin/Plugin.hh>

namespace ignition
namespace gz
{
namespace plugin
{
// Forward declarations
namespace detail { template<class, class> class ComposePlugin; }

/// \brief This class manages the lifecycle of a plugin instance. It can
/// receive a plugin instance from the ignition::plugin::Loader class
/// receive a plugin instance from the gz::plugin::Loader class
/// or by copy-construction or assignment from another PluginPtr instance.
///
/// This class behaves similarly to a std::shared_ptr where multiple
Expand Down
2 changes: 1 addition & 1 deletion core/include/gz/plugin/SpecializedPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <memory>
#include "gz/plugin/Plugin.hh"

namespace ignition
namespace gz
{
namespace plugin
{
Expand Down
2 changes: 1 addition & 1 deletion core/include/gz/plugin/SpecializedPluginPtr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "gz/plugin/PluginPtr.hh"
#include "gz/plugin/SpecializedPlugin.hh"

namespace ignition
namespace gz
{
namespace plugin
{
Expand Down
4 changes: 2 additions & 2 deletions core/include/gz/plugin/WeakPluginPtr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <gz/plugin/PluginPtr.hh>

namespace ignition
namespace gz
{
namespace plugin
{
Expand All @@ -36,7 +36,7 @@ namespace ignition
/// If the Plugin is deleted while this WeakPluginPtr is referring to it,
/// then Lock() will return an empty PluginPtr, and IsExpired() will return
/// true.
class IGNITION_PLUGIN_VISIBLE WeakPluginPtr
class GZ_PLUGIN_VISIBLE WeakPluginPtr
{
/// \brief Default constructor
public: WeakPluginPtr();
Expand Down
35 changes: 26 additions & 9 deletions core/include/gz/plugin/config.hh.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
/* Config.hh. Generated by CMake for @PROJECT_NAME_NO_VERSION@. */
/* config.hh. Generated by CMake for @PROJECT_NAME_NO_VERSION@. */

#ifndef IGNITION_PLUGIN_CONFIG_HH_
#define IGNITION_PLUGIN_CONFIG_HH_
/*
* Copyright (C) 2017 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#ifndef GZ_PLUGIN_CONFIG_HH_
#define GZ_PLUGIN_CONFIG_HH_

/* Version number */
#define IGNITION_PLUGIN_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}
#define IGNITION_PLUGIN_MINOR_VERSION ${PROJECT_VERSION_MINOR}
#define IGNITION_PLUGIN_PATCH_VERSION ${PROJECT_VERSION_PATCH}
#define GZ_PLUGIN_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}
#define GZ_PLUGIN_MINOR_VERSION ${PROJECT_VERSION_MINOR}
#define GZ_PLUGIN_PATCH_VERSION ${PROJECT_VERSION_PATCH}

#define IGNITION_PLUGIN_VERSION "${PROJECT_VERSION}"
#define IGNITION_PLUGIN_VERSION_FULL "${PROJECT_VERSION_FULL}"
#define GZ_PLUGIN_VERSION "${PROJECT_VERSION}"
#define GZ_PLUGIN_VERSION_FULL "${PROJECT_VERSION_FULL}"

#define IGNITION_PLUGIN_VERSION_HEADER "Ignition Plugin, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"
#define GZ_PLUGIN_VERSION_HEADER "Gazebo Plugin, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"

#endif
Loading

0 comments on commit 5297c3e

Please sign in to comment.