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

ign -> gz CMake, Python, Partial Source, and File Migrations : gz-transport #328

Merged
merged 2 commits into from
Jul 13, 2022
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
10 changes: 5 additions & 5 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
libignition-cmake3-dev
libignition-math7-dev
libignition-msgs9-dev
libignition-tools2-dev
libignition-utils2-cli-dev
libgz-cmake3-dev
libgz-math7-dev
libgz-msgs9-dev
libgz-tools2-dev
libgz-utils2-cli-dev
libprotobuf-dev
libprotoc-dev
libsqlite3-dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
uses: gazebo-tooling/action-gz-ci@focal
with:
codecov-enabled: true
cppcheck-enabled: true
Expand All @@ -25,4 +25,4 @@ jobs:
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@jammy
uses: gazebo-tooling/action-gz-ci@jammy
2 changes: 1 addition & 1 deletion .github/workflows/pr-collection-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
steps:
- name: Add collection labels
if: github.event.action == 'opened'
uses: ignition-tooling/pr-collection-labeler@v1
uses: gazebo-tooling/pr-collection-labeler@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/transport
VERSION_SUFFIX pre1)
gz_configure_project(VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand All @@ -42,7 +40,7 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
#--------------------------------------
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
gz_find_package(IgnProtobuf
gz_find_package(GzProtobuf
VERSION ${REQ_PROTOBUF_VER}
REQUIRED
PRETTY Protobuf)
Expand Down
8 changes: 4 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
1. Remove no username error messages
* [Pull request #286](https://github.com/gazebosim/gz-transport/pull/286)

1. Documented the default value of `IGN_PARTITION`
1. Documented the default value of `GZ_PARTITION`
* [Pull request #281](https://github.com/gazebosim/gz-transport/pull/281)

1. Remove static on `registrationCb` and `unregistrationCb`.
Expand Down Expand Up @@ -380,7 +380,7 @@
* [BitBucket pull request 370](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/370)
* [BitBucket pull request 373](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/373)

1. Introduce `IGN_RELAY`.
1. Introduce `GZ_RELAY`.
* [BitBucket pull request 364](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/364)

1. Upgrade to ignition-msgs4.
Expand Down Expand Up @@ -480,10 +480,10 @@
1. Added integration tests for recording
* [BitBucket pull request 275](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/275)

1. Added ability to play back ignition transport topics
1. Added ability to play back gz transport topics
* [BitBucket pull request 274](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/274)

1. Added ability to record ignition transport topics
1. Added ability to record gz transport topics
* [BitBucket pull request 273](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-transport/pull-requests/273)

1. Added ability to query log messages by topic name and time received
Expand Down
8 changes: 4 additions & 4 deletions INSTALL_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ directory that has the source files. Here is an example:
..\configure
nmake install

1. Clone ign-transport:
1. Clone gz-transport:

git clone https://github.com/gazebosim/gz-transport
cd gz-transport
Expand All @@ -85,18 +85,18 @@ directory that has the source files. Here is an example:
nmake install


You should now have an installation of ign-transport in gz-ws/ign-transport/build/install.
You should now have an installation of gz-transport in gz-ws/gz-transport/build/install.

1. Before running any executables, you need to modify your `PATH` to include the
directories including your DLL dependencies to let Windows find dynamic libs
(similar to `LD_LIBRARY_PATH` on Linux). Don't put quotes around the path, even
if it contains spaces. E.g., if you're working in `C:\My Stuff\gz-ws`:

set PATH=%PATH%;C:\My Stuff\gz-ws\ZeroMQ 4.0.4\bin;C:\My Stuff\gz-ws\ign-msgs\build\install\Release\lib
set PATH=%PATH%;C:\My Stuff\gz-ws\ZeroMQ 4.0.4\bin;C:\My Stuff\gz-ws\gz-msgs\build\install\Release\lib

1. Now build the examples:

cd gz-ws\ign-transport\example
cd gz-ws\gz-transport\example
mkdir build
cd build
..\configure
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Visit the [documentation page](https://gazebosim.org/api/transport/11.0/index.ht
# Folder Structure

```
ign-transport
gz-transport
├── conf Configuration file for the integration with the `gz` CLI tool.
├── docker Dockerfile with ign-transport installed and scripts to build and run the code.
├── docker Dockerfile with gz-transport installed and scripts to build and run the code.
├── example Example programs that use most of the Gazebo Transport API.
├── include Header files that get installed.
├── log All the code related with Gazebo Transport logging.
Expand Down
4 changes: 2 additions & 2 deletions api.md.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Gazebo @IGN_DESIGNATION_CAP@
## Gazebo @GZ_DESIGNATION_CAP@

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

## License
Expand Down
20 changes: 10 additions & 10 deletions conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Used only for internal testing.
set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}")

# Generate a configuration file for internal testing.
# Note that the major version of the library is included in the name.
# Ex: transport0.yaml
configure_file(
"${IGN_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY)
"${GZ_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY)

file(GENERATE
OUTPUT "${CMAKE_BINARY_DIR}/test/conf/$<CONFIG>/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured")
OUTPUT "${CMAKE_BINARY_DIR}/test/conf/$<CONFIG>/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured")

# Used for the installed version.
set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}")

# Generate the configuration file that is installed.
# Note that the major version of the library is included in the name.
# Ex: transport0.yaml
configure_file(
"${IGN_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY)
"${GZ_DESIGNATION}.yaml.in"
"${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY)

# Install the yaml configuration files in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ RUN sudo /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/g
&& sudo /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -' \
&& sudo apt-get update \
&& sudo apt-get install -y \
libignition-cmake3-dev \
libignition-math7-dev \
libignition-msgs9-dev \
libignition-utils2-cli-dev \
libgz-cmake3-dev \
libgz-math7-dev \
libgz-msgs9-dev \
libgz-utils2-cli-dev \
&& sudo apt-get clean

# Ignition transport
# Gazebo transport
RUN git clone https://github.com/gazebosim/gz-transport.git \
&& cd gz-transport \
&& mkdir build \
Expand All @@ -79,7 +79,7 @@ RUN git clone https://github.com/gazebosim/gz-transport.git \
&& sudo make -j4 install \
&& cd ../..

# Ignition transport examples
# Gazebo transport examples
RUN cd gz-transport/example \
&& mkdir build \
&& cd build \
Expand Down
26 changes: 0 additions & 26 deletions example/configure.bat

This file was deleted.

2 changes: 1 addition & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
2 changes: 1 addition & 1 deletion include/gz/transport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# that the detail headers are not installed. The next install line solves this
# problem.
gz_install_all_headers(EXCLUDE_DIRS detail)
install(DIRECTORY detail DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}/gz/${IGN_DESIGNATION})
install(DIRECTORY detail DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}/gz/${GZ_DESIGNATION})
2 changes: 1 addition & 1 deletion include/gz/transport/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ namespace gz
}
}

// IGN_TRANSPORT_HELPERS_HH_
// GZ_TRANSPORT_HELPERS_HH_
#endif
2 changes: 1 addition & 1 deletion include/gz/transport/gz_auto_headers.hh.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Automatically generated
#include <gz/${IGN_DESIGNATION}/config.hh>
#include <gz/${GZ_DESIGNATION}/config.hh>
${ign_headers}
2 changes: 1 addition & 1 deletion log/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
2 changes: 1 addition & 1 deletion log/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if(MSVC)
endif()

# Set install instructions for the sql schema, and configure the build to use it
set(SCHEMA_INSTALL_BASE ${IGN_DATA_INSTALL_DIR})
set(SCHEMA_INSTALL_BASE ${GZ_DATA_INSTALL_DIR})
install(DIRECTORY ../sql DESTINATION ${SCHEMA_INSTALL_BASE})
set(SCHEMA_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${SCHEMA_INSTALL_BASE}/sql)
configure_file(build_config.hh.in build_config.hh @ONLY)
Expand Down
56 changes: 28 additions & 28 deletions log/src/Descriptor_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,66 +63,66 @@ TEST(Descriptor, TopicIdOneTopic)
{
Descriptor desc = Log::Construct();
TopicKeyMap topics;
TopicKey key = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key = {"/foo/bar", "gz.msgs.DNE"};
topics[key] = 5;
Log::Reset(desc, topics);
EXPECT_EQ(5, desc.TopicId("/foo/bar", "ign.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "ign.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "ign.msgs.DNEE"));
EXPECT_EQ(5, desc.TopicId("/foo/bar", "gz.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "gz.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "gz.msgs.DNEE"));
}

//////////////////////////////////////////////////
TEST(Descriptor, TopicIdMultipleTopicsSameName)
{
Descriptor desc = Log::Construct();
TopicKeyMap topics;
TopicKey key1 = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key2 = {"/foo/bar", "ign.msgs.DNE2"};
TopicKey key3 = {"/foo/bar", "ign.msgs.DNE3"};
TopicKey key1 = {"/foo/bar", "gz.msgs.DNE"};
TopicKey key2 = {"/foo/bar", "gz.msgs.DNE2"};
TopicKey key3 = {"/foo/bar", "gz.msgs.DNE3"};
topics[key1] = 5;
topics[key2] = 6;
topics[key3] = 7;
Log::Reset(desc, topics);
EXPECT_EQ(5, desc.TopicId("/foo/bar", "ign.msgs.DNE"));
EXPECT_EQ(6, desc.TopicId("/foo/bar", "ign.msgs.DNE2"));
EXPECT_EQ(7, desc.TopicId("/foo/bar", "ign.msgs.DNE3"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "ign.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "ign.msgs.DNEE"));
EXPECT_EQ(5, desc.TopicId("/foo/bar", "gz.msgs.DNE"));
EXPECT_EQ(6, desc.TopicId("/foo/bar", "gz.msgs.DNE2"));
EXPECT_EQ(7, desc.TopicId("/foo/bar", "gz.msgs.DNE3"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "gz.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "gz.msgs.DNEE"));
}

//////////////////////////////////////////////////
TEST(Descriptor, TopicIdMultipleTopicsSameType)
{
Descriptor desc = Log::Construct();
TopicKeyMap topics;
TopicKey key1 = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key2 = {"/fiz/buz", "ign.msgs.DNE"};
TopicKey key3 = {"/fiz/bar", "ign.msgs.DNE"};
TopicKey key1 = {"/foo/bar", "gz.msgs.DNE"};
TopicKey key2 = {"/fiz/buz", "gz.msgs.DNE"};
TopicKey key3 = {"/fiz/bar", "gz.msgs.DNE"};
topics[key1] = 5;
topics[key2] = 6;
topics[key3] = 7;
Log::Reset(desc, topics);
EXPECT_EQ(5, desc.TopicId("/foo/bar", "ign.msgs.DNE"));
EXPECT_EQ(6, desc.TopicId("/fiz/buz", "ign.msgs.DNE"));
EXPECT_EQ(7, desc.TopicId("/fiz/bar", "ign.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "ign.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "ign.msgs.DNEE"));
EXPECT_EQ(5, desc.TopicId("/foo/bar", "gz.msgs.DNE"));
EXPECT_EQ(6, desc.TopicId("/fiz/buz", "gz.msgs.DNE"));
EXPECT_EQ(7, desc.TopicId("/fiz/bar", "gz.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/fooo/bar", "gz.msgs.DNE"));
EXPECT_GT(0, desc.TopicId("/foo/bar", "gz.msgs.DNEE"));
}

//////////////////////////////////////////////////
TEST(Descriptor, TopicsMapOneTopic)
{
Descriptor desc = Log::Construct();
TopicKeyMap topics;
TopicKey key = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key = {"/foo/bar", "gz.msgs.DNE"};
topics[key] = 5;
Log::Reset(desc, topics);
auto topicsMap = desc.TopicsToMsgTypesToId();
ASSERT_EQ(1u, topicsMap.size());
EXPECT_EQ("/foo/bar", topicsMap.begin()->first);
auto msgsMap = topicsMap.begin()->second;
ASSERT_EQ(1u, msgsMap.size());
EXPECT_EQ("ign.msgs.DNE", msgsMap.begin()->first);
EXPECT_EQ("gz.msgs.DNE", msgsMap.begin()->first);
EXPECT_EQ(5, msgsMap.begin()->second);
}

Expand All @@ -131,12 +131,12 @@ TEST(Descriptor, MsgTypesMapOneTopic)
{
Descriptor desc = Log::Construct();
TopicKeyMap topics;
TopicKey key = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key = {"/foo/bar", "gz.msgs.DNE"};
topics[key] = 5;
Log::Reset(desc, topics);
auto msgsMap = desc.MsgTypesToTopicsToId();
ASSERT_EQ(1u, msgsMap.size());
EXPECT_EQ("ign.msgs.DNE", msgsMap.begin()->first);
EXPECT_EQ("gz.msgs.DNE", msgsMap.begin()->first);
auto topicsMap = msgsMap.begin()->second;
ASSERT_EQ(1u, topicsMap.size());
EXPECT_EQ("/foo/bar", topicsMap.begin()->first);
Expand All @@ -146,10 +146,10 @@ TEST(Descriptor, MsgTypesMapOneTopic)
//////////////////////////////////////////////////
TEST(Descriptor, TopicKeyEquality)
{
TopicKey key1 = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key2 = {"/foo/bar", "ign.msgs.DNE2"};
TopicKey key3 = {"/foo/bar3", "ign.msgs.DNE"};
TopicKey key4 = {"/foo/bar", "ign.msgs.DNE"};
TopicKey key1 = {"/foo/bar", "gz.msgs.DNE"};
TopicKey key2 = {"/foo/bar", "gz.msgs.DNE2"};
TopicKey key3 = {"/foo/bar3", "gz.msgs.DNE"};
TopicKey key4 = {"/foo/bar", "gz.msgs.DNE"};
EXPECT_FALSE(key1 == key2);
EXPECT_FALSE(key1 == key3);
EXPECT_EQ(key1, key4);
Expand Down
2 changes: 1 addition & 1 deletion log/src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ configure_file(
"transportlog.yaml.in"
${transportlog_configured})

install(FILES ${transportlog_configured} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)
install(FILES ${transportlog_configured} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)
Loading