Skip to content
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 @@
libgz-cmake4-dev
libgz-math8-dev
libgz-msgs11-dev
libgz-cmake5-dev
libgz-math9-dev
libgz-msgs12-dev
libgz-tools2-dev
libgz-utils3-cli-dev
libgz-utils4-cli-dev
libprotobuf-dev
libprotoc-dev
libsqlite3-dev
Expand All @@ -13,5 +13,5 @@ python3-dev
python3-psutil
python3-pybind11
python3-pytest
python3-gz-msgs11
python3-gz-msgs12
uuid-dev
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ project(gz-transport VERSION 15.0.0)
# Find gz-cmake
#============================================================================
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake4 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake4_VERSION_MAJOR})
find_package(gz-cmake REQUIRED)

#============================================================================
# Configure the project
Expand Down Expand Up @@ -106,13 +105,11 @@ endif()

#--------------------------------------
# Find gz-utils
gz_find_package(gz-utils3 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR})
gz_find_package(gz-utils REQUIRED COMPONENTS cli)

#--------------------------------------
# Find gz-msgs
gz_find_package(gz-msgs11 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR})
gz_find_package(gz-msgs REQUIRED)

#--------------------------------------
# Find ifaddrs
Expand Down
12 changes: 6 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ bazel_dep(name = "gz-msgs")

archive_override(
module_name = "gz-math",
strip_prefix = "gz-math-gz-math8",
urls = ["https://github.com/gazebosim/gz-math/archive/refs/heads/gz-math8.tar.gz"],
strip_prefix = "gz-math-main",
urls = ["https://github.com/gazebosim/gz-math/archive/refs/heads/main.tar.gz"],
)

archive_override(
module_name = "gz-utils",
strip_prefix = "gz-utils-gz-utils3",
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/gz-utils3.tar.gz"],
strip_prefix = "gz-utils-main",
urls = ["https://github.com/gazebosim/gz-utils/archive/refs/heads/main.tar.gz"],
)

archive_override(
module_name = "gz-msgs",
strip_prefix = "gz-msgs-gz-msgs11",
urls = ["https://github.com/gazebosim/gz-msgs/archive/refs/heads/gz-msgs11.tar.gz"],
strip_prefix = "gz-msgs-main",
urls = ["https://github.com/gazebosim/gz-msgs/archive/refs/heads/main.tar.gz"],
)
10 changes: 5 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ RUN /bin/sh -c 'echo "deb [trusted=yes] http://packages.osrfoundation.org/gazebo
&& /bin/sh -c 'wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -' \
&& apt-get update \
&& apt-get install -y \
libgz-cmake4-dev \
libgz-math8-dev \
libgz-msgs11-dev \
libgz-utils3-cli-dev \
libgz-cmake5-dev \
libgz-math9-dev \
libgz-msgs12-dev \
libgz-utils4-cli-dev \
libgflags-dev \
&& apt-get clean

USER ubuntu
WORKDIR /tmp
# Gazebo transport
RUN git clone https://github.com/gazebosim/gz-transport.git -b gz-transport14
RUN git clone https://github.com/gazebosim/gz-transport.git -b gz-transport15
RUN cd gz-transport \
&& mkdir build \
&& cd build \
Expand Down
8 changes: 4 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

<buildtool_depend>cmake</buildtool_depend>

<build_depend>gz-cmake4</build_depend>
<build_depend>gz-cmake</build_depend>

<depend>gz-math8</depend>
<depend>gz-msgs11</depend>
<depend>gz-math</depend>
<depend>gz-msgs</depend>
<depend>gz-tools2</depend>
<depend>gz-utils3</depend>
<depend>gz-utils</depend>
<depend>libsqlite3-dev</depend>
<depend>libzmq3-dev</depend>
<depend>pkg-config</depend>
Expand Down
2 changes: 1 addition & 1 deletion parameters/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gz_add_component(

target_link_libraries(${param_lib_target}
PUBLIC
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER})
gz-utils::gz-utils)

# Unit tests
gz_build_tests(
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)

# Detect if we are doing a standalone build of the bindings, using an external gz-transport
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
find_package(gz-cmake4 4.1.0 REQUIRED)
find_package(gz-cmake REQUIRED)
gz_get_package_xml_version(${CMAKE_SOURCE_DIR}/../package.xml PACKAGE_XML)
project(gz-transport-python VERSION ${PACKAGE_XML_VERSION})
find_package(gz-transport REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion python/examples/data_race_with_mutex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node

from threading import Lock
Expand Down
2 changes: 1 addition & 1 deletion python/examples/data_race_without_mutex.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node

import time
Expand Down
4 changes: 2 additions & 2 deletions python/examples/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#

#! [complete]
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node

import time
Expand Down
2 changes: 1 addition & 1 deletion python/examples/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#

#! [complete]
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node

def main():
Expand Down
4 changes: 2 additions & 2 deletions python/examples/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#

#! [complete]
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node

import time
Expand Down
2 changes: 1 addition & 1 deletion python/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# The "ProtoMsg" TypeVar represents an actual msg of a protobuf type.
# On the other hand, the "ProtoMsgType" TypeVar represents the protobuf type.
# For example, let's take the following code:
# from gz.msgs11.stringmsg_pb2 import StringMsg
# from gz.msgs.stringmsg_pb2 import StringMsg
# proto_msg = StringMsg()
# The variable `proto_msg` would be the expected input for a "ProtoMsg"
# type argument and `StringMsg` would be the expected input for a
Expand Down
2 changes: 1 addition & 1 deletion python/test/options_TEST.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node, AdvertiseMessageOptions, SubscribeOptions, NodeOptions

import unittest
Expand Down
4 changes: 2 additions & 2 deletions python/test/pubSub_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.
#

from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node, AdvertiseMessageOptions, SubscribeOptions, TopicStatistics

from threading import Lock
Expand Down
4 changes: 2 additions & 2 deletions python/test/requester_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.
#

from gz.msgs11.int32_pb2 import Int32
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.int32_pb2 import Int32
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node

import os
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
# Link the libraries that we always need.
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-msgs${GZ_MSGS_VER}::gz-msgs${GZ_MSGS_VER}
gz-utils::gz-utils
gz-msgs::gz-msgs
CPPZMQ::CPPZMQ
PRIVATE
${ZeroMQ_TARGET}
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(topic_executable gz-transport-topic)
add_executable(${topic_executable} topic_main.cc)
target_link_libraries(${topic_executable}
gz
gz-utils${GZ_UTILS_VER}::cli
gz-utils::cli
${PROJECT_LIBRARY_TARGET_NAME}
)
install(TARGETS ${topic_executable} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/gz/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
Expand All @@ -33,7 +33,7 @@ set(service_executable gz-transport-service)
add_executable(${service_executable} service_main.cc)
target_link_libraries(${service_executable}
gz
gz-utils${GZ_UTILS_VER}::cli
gz-utils::cli
${PROJECT_LIBRARY_TARGET_NAME}
)
install(TARGETS ${service_executable} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/gz/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
Expand All @@ -43,7 +43,7 @@ gz_build_tests(TYPE UNIT SOURCES ${gtest_sources}
TEST_LIST test_list
LIB_DEPS
gz
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-utils::gz-utils
${EXTRA_TEST_LIB_DEPS} test_config)

foreach(test ${test_list})
Expand Down
2 changes: 1 addition & 1 deletion tutorials/02_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ sudo apt-get remove libgz-transport.*-dev

Install prerequisites. A clean Ubuntu system will need:
```
sudo apt-get install git cmake pkg-config python ruby-ronn libprotoc-dev libprotobuf-dev protobuf-compiler uuid-dev libzmq3-dev libgz-msgs11-dev libgz-utils3-cli-dev
sudo apt-get install git cmake pkg-config python ruby-ronn libprotoc-dev libprotobuf-dev protobuf-compiler uuid-dev libzmq3-dev libgz-msgs12-dev libgz-utils4-cli-dev
```

### macOS
Expand Down
16 changes: 8 additions & 8 deletions tutorials/06_python_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ folder and open it with your favorite editor:
### Walkthrough

```{.py}
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node
```

The library `gz.transport` contains all the Gazebo Transport elements that can be
used in Python. The final API we will use is contained inside the class `Node`.

The lines `from gz.msgs11.stringmsg_pb2 import StringMsg` and `from gz.msgs11.vector3d_pb2 import Vector3d`
The lines `from gz.msgs.stringmsg_pb2 import StringMsg` and `from gz.msgs.vector3d_pb2 import Vector3d`
include the generated protobuf code that we are going to use for our messages.
We are going to publish two types of messages: `StringMsg` and `Vector3d` protobuf
messages.
Expand Down Expand Up @@ -109,8 +109,8 @@ file into the `gz_transport_tutorial` folder and open it with your favorite edit
### Walkthrough

```{.py}
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs11.vector3d_pb2 import Vector3d
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.msgs.vector3d_pb2 import Vector3d
from gz.transport import Node
```

Expand Down Expand Up @@ -276,7 +276,7 @@ of messages published per topic.
We can declare the throttling option using the following code :

```{.py}
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node, AdvertiseMessageOptions

# Create a transport node and advertise a topic with throttling enabled.
Expand Down Expand Up @@ -320,7 +320,7 @@ second from that particular topic.
We can declare the throttling option using the following code :

```{.py}
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node, SubscribeOptions

def stringmsg_cb(msg: StringMsg):
Expand Down Expand Up @@ -399,7 +399,7 @@ file into the `gz_transport_tutorial` folder and open it with your favorite edit
### Walkthrough

```{.py}
from gz.msgs11.stringmsg_pb2 import StringMsg
from gz.msgs.stringmsg_pb2 import StringMsg
from gz.transport import Node
```

Expand Down
Loading