transport#
Gazebo Transport
Maintainer: caguero AT openrobotics DOT org
Gazebo Transport, a component of Gazebo, provides fast and efficient asynchronous message passing, services, and data logging.
Table of Contents
Features
Gazebo Transport is an open source communication library that allows exchanging data between clients. In our context, a client is called a node. Nodes might be running within the same process in the same machine or in machines located in different continents. Gazebo Transport is multi-platform (Linux, Mac OS X, and Windows), so all the low level details, such as data alignment or endianness are hidden for you.
Gazebo Transport uses Google Protocol buffers as the data serialization format for communicating between nodes. Users can define their own messages using the Protobuf utils, and then, exchange them between the nodes. Gazebo Transport discovers, serializes and delivers messages to the destinations using a combination of custom code and ZeroMQ.
Install
See the installation tutorial.
Usage
See tutorials and the example directory in the source code.
Known issue of command line tools
In the event that the installation is a mix of Debian and from source, command
line tools from gz-tools
may not work correctly.
A workaround is to define the environment variable
GZ_CONFIG_PATH
to point to the location of the Gazebo library installation,
where the YAML file for the package is found, such as
export GZ_CONFIG_PATH=/usr/local/share/gz
This issue is tracked here.
Documentation
Visit the documentation page.
Folder Structure
gz-transport
├── conf Configuration file for the integration with the `gz` CLI tool.
├── 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.
├── src Source code of the core library.
├── test A directory of integration, performance and regression tests.
└── tutorials A set of tutorials about Gazebo Transport features.
Contributing
Please see CONTRIBUTING.md.
Code of Conduct
Please see CODE_OF_CONDUCT.md.
Versioning
This library uses Semantic Versioning. Additionally, this library is part of the Gazebo project which periodically releases a versioned set of compatible and complimentary libraries. See the Gazebo website for version and release information.
License
This library is licensed under Apache 2.0. See also the LICENSE file.
Gazebo Transport 14.X
Gazebo Transport 14.0.0 (2024-09-25)
Baseline: this includes all changes from 13.4.0 and earlier.
Miscellaneous documentation fixes
Simplify the relay tutorial docker setup
Replace deprecated File.exists with File.exist and tweak tutorial
Update gz-transport14 badge URLs
Ionic Changelog
Replace IGN_IP with GZ_IP
Add an explicit dependency on cppzmq-dev
Enable 24.04 CI, require cmake 3.22.1
Allow programmatic configuration of unicast relays.
Delete copy ctor and copy-assignment for log::Batch
Remove python3-distutils since it’s not needed on Jammy (#496)
Find Python3 directly, not with GzPython
gz_TEST: more output when tests fail
Remove HIDE_SYMBOLS_BY_DEFAULT: replace by a default configuration in gz-cmake.
Use HIDE_SYMBOLS_BY_DEFAULT
Bumps in Ionic: gz-transport14
Gazebo Transport 13.X
Gazebo Transport 13.4.0 (2024-06-18)
Add frequency to topic CLI.
Gazebo Transport 13.3.0 (2024-06-05)
Adding option to ignore local messages
Include Python tutorial in list of tutorials
Remove python3-distutils since it’s not needed on Jammy
Add package.xml
Gazebo Transport 13.2.0 (2024-04-09)
Use relative install path for gz tool data
No input service request from the command line
Use
std::shared_ptr
forgz::transport::NodeShared
Use a default timeout when requesting a service from CLI.
Fix test failures when run under
colcon test
Gazebo Transport 13.1.0 (2024-03-14)
Oneway service request from the command line
Re-enable tests of bash completion functions for gz
Find Python3 directly, not with GzPython
Fix issue #468
Test refactoring part 2
Update CI badges in README
Support for bazel on garden
Use subprocess rather than custom code
Infrastructure
Remove duplicated functionality from test_config
Make empty constructor as peer to explicit
Adds the subcommands for the log command for bash completion
Adds the python bindings tutorial
Gazebo Transport 13.0.0 (2023-09-29)
Fix Docker in Harmonic
Documentation fixes
Protect remoteSubscribers with mutex.
Remove deprecations in Harmonic
ign -> gz
Infrastructure
Python Bindings for Publisher, Subscriber and Service Request features.
Fix topic/service list inconsistency
Show subscribers info when running topic info
List subscribed topics when running topic list
⬆️ Bump main to 13.0.0~pre1
Gazebo Transport 12.X
Gazebo Transport 12.2.1 (2023-09-26)
Infrastructure
Fix topic/service list inconsistency
Backport Windows fix to ign-transport8
Fix unused-result warning
Fix compatibility with protobuf 22
Fix compiler warning and signedness issue
Fix filesystem headers for tests
Fix typos
Gazebo Transport 12.2.0 (2023-04-19)
CI workflow: use checkout v3
Rename COPYING to LICENSE
Support clang and std::filesystem
Added Node::RequestRaw
Pass std::function by value to Node::Subscribe
Prevent invoking callbacks after a node unsubscribes to a topic
Suppress some Windows warnings
Fix include/ignition/…/parameters header files
Fix CLI configuration install path to ignition
Gazebo Transport 12.1.0 (2023-01-11)
Ignition to Gazebo renaming.
Use new ignition-specific formatter.
Remove warnings in Garden on Ubuntu 22.04.
Gazebo Transport 12.0.0 (2022-09-22)
Improved windows instructions
Improved instructions
Fix table in “Nodes and topics tutorial”
Update link
Tweak section title.
Fix Docker build and relay tutorial instructions
Fix bench example compilation.
Download examples matching the version number
Tweak topic statistics tutorial
Don’t use ignition/msgs.hh
Remove left-over from Discovery_TEST
Suppress protobuf related Windows warnings
Remove problematic discovery test
ign -> gz Provisional Finale: Source Migration : gz-transport
ign -> gz migrations
Use auto for loop iterators
Update GoogleTest to latest version
ign -> gz Partial Docs Migration and Project Name Followups : gz-transport
Migrate ignition-transport
Rename CMake project to gz
ign -> gz Macro Migration : gz-transport
[ign -> gz] CMake functions
ign -> gz Environment Variable Migration
ign -> gz Namespace Migration : gz-transport
ign -> gz migration
Use ign-utils instead of ign-cmake utilities
Remove Bionic from future releases (Garden+)
Bumps in garden: ign-transport12 use ign-math7
Bumps in garden : ci_matching_branch/bump_garden_ign-transport12
Gazebo Transport 11.X
Gazebo Transport 11.4.1 (2023-09-01)
Fix topic/service list inconsistency
Backport Windows fix to ign-transport8
Fix unused-result warning
Fix compatibility with protobuf 22
Fix compiler warning and signedness issue
Rename COPYING to LICENSE
Infrastructure
Support clang and std::filesystem
Gazebo Transport 11.4.0 (2023-03-08)
Added Node::RequestRaw
Suppress some Windows warnings.
All changes up to version 8.2.0.
Gazebo Transport 11.3.2 (2022-12-08)
Fix include/ignition/…/parameters header files
Gazebo Transport 11.3.1 (2022-12-01)
Fix CLI configuration install path to ignition
Gazebo Transport 11.3.0 (2022-10-31)
Add parameters component
Fix build for Debian Bullseye
Gazebo Transport 11.2.0 (2022-08-16)
Remove problematic discovery test
Change
IGN_DESIGNATION
toGZ_DESIGNATION
Ignition -> Gazebo
Bash completion for flags
Gazebo Transport 11.1.0 (2022-06-01)
Add option to output messages in JSON format
Use libexec to install lib binaries
Use
exec
instead ofpopen
to runign-launch
binaryFocal CI: static checkers, doxygen linters, compiler warnings
Add Ubuntu Jammy CI
Corrected a typo in
topic_main.cc
Remove no username error messages
Try
USER
variable to retrieve the username.Documented the default value of
IGN_PARTITION
Remove static on
registrationCb
andunregistrationCb
.Make zmq check for post 4.3.1 not to include 4.3.1
NetUtils: simplify logic in
determineInterfaces
Fix Homebrew warning (backport from Fortress) (#268)
Gazebo Transport 11.0.0 (2021-09-28)
Windows fix
Remove unnecessary copy and assignment operators
Depend on gz-msgs8
Infrastructure
Gazebo Transport 10.X
Gazebo Transport 10.2.0 (2022-03-25)
Use exec instead of popen to run gz-launch binary
Focal CI: static checkers, doxygen linters, compiler warnings
Add option to output messages in JSON format
Remove no username error messages
Documented the default value of
GZ_PARTITION
Remove static on
registrationCb
andunregistrationCb
.Make zmq check for post 4.3.1 not to include 4.3.1
NetUtils: simplify logic in
determineInterfaces
Fix Homebrew warning (backport from Fortress)
Gazebo Transport 10.1.0 (2021-10-17)
Fix Homebrew warning (backport from Fortress).
Use standalone executables with gz tool.
Make zmq check for post 4.3.1 not to include 4.3.1
Remove unnecessary copy and assignment operators (#241).
Gazebo Transport 10.0.0 (2021-03-30)
Depend on cli component of ignition-utils
Add instructions to build and run examples
Bump in edifice: gz-msgs7
Configurable IP address and port for discovery
Changes from Dome tutorial party
Infrastructure and documentation
Gazebo Transport 9.X
Gazebo Transport 9.X.X
Gazebo Transport 9.1.1 (2021-01-05)
Add errno output for discovery.
Consider all network interfaces when checking HOST option.
Remove tools/code_check and update codecov.
Remove deprecated test.
Master branch updates.
Add windows installation.
Gazebo Transport 9.1.0 (2021-01-05)
All changes up to version 8.2.0.
Gazebo Transport 9.0.0 (2020-09-29)
Fix link in “development” tutorial.
Remove contribute tutorial.
Update link to the tutorials.
Use private access modifier for pImpl variable in MsgIter class.
Remove deprecations before 9.x.x release.
Make CPPZMQ a PUBLIC dependency.
Update codeowners.
Removed markdown-header.
Removed repeated installation instructions.
Need ignition-msgs version 6
Update link to repo.
Fix download link.
Workflow updates.
Add .gitignore.
Update BitBucket links.
Gazebo Transport 8.X
Gazebo Transport 8.X.X
Gazebo Transport 8.2.0 (2020-01-05)
All changes up to version 7.5.1.
Addition of topic statistics that can report number of dropped messages and publication, age, and reception statistics.
Gazebo Transport 8.5.0 (2024-01-05)
Update github action workflows
Adds the subcommands for the log command
Fix topic/service list inconsistency
Backport Windows fix to ign-transport8
Fix compatibility with protobuf 22
Fix compiler warning and signedness issue
Support clang and std::filesystem
Pass std::function by value to Node::Subscribe
Gazebo Transport 8.4.0 (2022-11-17)
ign -> gz : Remove redundant namespace references.
Backport Windows fix from main branch.
ign -> gz Migrate Ignition Headers : gz-transport.
Gazebo Transport 8.3.0 (2022-07-27)
Ignition -> Gazebo
Bash completion for flags
Focal CI: static checkers, doxygen linters, compiler warnings
Remove no username error messages
Documented the default value of
GZ_PARTITION
Remove static on
registrationCb
andunregistrationCb
.
Gazebo Transport 8.2.1 (2021-10-27)
Make zmq check for post 4.3.1 not to include 4.3.1
Fix Homebrew warning (backport from Fortress)
Infrastructure
Remove deprecated test
Add Windows Installation using conda-forge, and cleanup install docs
Gazebo Transport 8.2.0 (2020-01-05)
All changes up to version 7.5.1.
Addition of topic statistics that can report number of dropped messages and publication, age, and reception statistics.
Gazebo Transport 8.1.0 (2020-08-28)
Fix mem leak.
One NodeShared per process.
Remove Windows warnings.
Remove warnings on Homebrew.
Fix ByteSize deprecation warnings for Protobuf 3.1+.
Improve compiler support for c++ filesystem.
Support playback of corrupt log files.
Add signal handler to log playback.
Added additional publishers and subscribers to the
bench
example program in order to simulate high network traffic conditions.Added topic subscription to the C interface.
Added fast log playback, where messages are published without waiting.
Gazebo Transport 8.0.0 (2019-12-10)
Upgrade to ignition-msgs5.
Utilize protobuf messages for discovery.
Ignore incompatible discovery messages and reduce console spam.
Improve compiler support for c++ filesystem.
This release includes all changes up to 7.5.0.
Gazebo Transport 7
Gazebo Transport 7.5.1 (2020-12-23)
CI fixes
Fix codecheck
Prevent empty messages from spamming the console
Gazebo Transport 7.5.0 (2020-07-29)
Disable flaky Mac OS X tests
Prevent empty messages from spamming the console
Modernize actions CI
Helper function to get a valid topic name
GitHub migration
Fix ZMQ and Protobuf warnings
Handle
getpwduid_r
error cases. This addresses issue #118. Solution was created in pull request #441 by Poh Zhi-Ee.
Gazebo Transport 7.4.0 (2020-03-09)
Removed a
sleep
from NodeShared. The sleep was meant to guarantee message delivery duringconnect
. This approach would fail if the delay between nodes was too large.Set default message buffer sizes to 1000, for both send and receive buffers.
Added support for configuring message buffers via environment variables.
Gazebo Transport 7.3.0
Write to disk from a background thread in log recorder
Restore original Playback::Start and add overload with new parameter to fix ABI.
Improve compiler support for c++ filesystem.
Gazebo Transport 7.2.1
Updates to C interface subscription options.
Gazebo Transport 7.2.0
Support playback of corrupt log files.
Add signal handler to log playback.
Ignore incompatible discovery messages and reduce console spam.
Added additional publishers and subscribers to the
bench
example program in order to simulate high network traffic conditions.Added topic subscription to the C interface.
Added fast log playback, where messages are published without waiting.
Gazebo Transport 7.1.0
Added method for determining if a throttled publisher is ready to publish.
Add intraprocess field to MessageInfo. The intraprocess field indicates whether the message is coming from a node within this process.
Gazebo Transport 7.0.0
Fix fast constructor-destructor deadlock race condition.
Added ability to specify partition information on a node through the CIface.
Added ability to advertise a topic through the CIface.
Added a
-n
argument to the echo command line tool, where-n
can be used to specify the number of messages to echo and then exit. Made thegz.hh
header file private (not installed).Added start of C interface, currently it supports only pub/sub.
Introduce
GZ_RELAY
.Upgrade to ignition-msgs4.
Gazebo Transport 6
Gazebo Transport 6.X.X
Ignore EPERM and ENOBUFS errors during discovery, generalize cmake for gz tool files
Skip
cmd*.rb
generation on windows to fix build
Gazebo Transport 6.0.0
Upgrade to proto3, c++17, ignition-cmake2 and ignition-msgs3.
Gazebo Transport 5
Gazebo Transport 5.X.X
Added support for alternative clock sources during log recording.
Exposed Log and log Playback time information.
Added the ability to Seek within the log playback, which makes possible to jump to any valid time point of the reproduction.
Added the ability to Step the advance of the playback from within the log replayer.
Added the ability to Pause/Resume playback from the log replayer.
Added support for topic remapping when running “gz log playback”. Note that the string “:=” is not allowed now as part of a partition, namespace or topic anymore.
Added the ability to remap topic names.
Prevent the log recorder from subscribing to topics that have already been added.
Added log::Recorder::Topics that returns the set of added topics.
Added log::Recorder::Filename that returns the name of the log file.
Added a logging tutorial
Added a migration guide for helping with the transition between major versions
Converted gz-transport-log into a component
Added inline versioned namespace to the log library
Added inline versioned namespace to the main library
Added –force option to ‘gz log record’
Gazebo Transport 4
Gazebo Transport 4.X.X
Ignore subinterfaces when using determineInterfaces().
Refactored Playback to return a PlaybackHandle from Start()
Added command line tool for the logging features
Added examples using logging features
Added integration tests for recording
Added ability to play back gz transport topics
Added ability to record gz transport topics
Added ability to query log messages by topic name and time received
Added ability to get all messages from a log file
Added ability to insert messages into a sqlite3 based log file
Added TopicUtils::DecomposeFullyQualifiedTopic()
Gazebo Transport 4.0.0 (2018-01-XX)
Basic authentication for topics.
Upgrade to gz-cmake.
Added a benchmark program to test latency and throughput.
Support publication and receipt of raw serialized data.
Use zero copy when publishing messages.
Added publishing and receiving messages as raw bytes
Updated service responder callbacks to return a boolean value. The existing functions have been deprecated.
Hide ZMQ from public interfaces
Gazebo Transport 3
Gazebo Transport 3.X.X
Gazebo Transport 3.1.0 (2017-11-29)
Documentation improvements
Workaround for the ghost Msbuild warning in Jenkins plugin
Added tests for gz.cc
Remove manual setting of flags for dynamic linking of the Windows CRT library
Add BUILD_TESTING CMake option and tests target
Remove unused statement from Header::Unpack
Port cmake fixes from sdformat
Clean up DefaultFlags.cmake
Add the new const methods to overloaded bool operator
SubscriptionHandler.hh fix std::move compiler warning
Fix gz topic|service fails on MacOS X if system integrity protection is enabled
Gazebo Transport 3.0.0
Added optional message throttling when publishing messages.
Support for an optional MessageInfo parameter in the user callbacks for receiving messages. This parameter provides some information about the message received (e.g.: topic name).
Added
Node::Publisher::HasConnections
function that can be used to check if a Publisher has subscribers.Add gz topic –echo command line tool.
Support a generic callback signature for receiving messages of any type.
Node::Unadvertise(), Node::Publish() and Node::TopicsAdvertised() removed. Node::Advertise() returns a Node::Publisher object that can be used for publishing messages. When this object runs out of scope the topic is unadvertised.
Create AdvertiseMessageOptions and AdvertiseServiceOptions classes.
Subscription options added. The first option is to provide the ability to set the received message rate on the subscriber side.
Added gz service –req <args …> for requesting services using the command line.
Do not allow to advertise a topic that is currently advertised on the same node. See issue #54
ZeroMQ updated from 3.2.4 to 4.0.4 on Windows.
Gazebo Transport 2.x
Fix issue #55.
Protobuf3 support added.
ZeroMQ updated from 3.2.4 to 4.0.4 on Windows.
Copyright added to
tools/code_check.sh
andtools/cpplint_to_cppcheckxml.py
Fix case where
std::bad_function_call
could be thrown.
Gazebo Transport 2.0.0
Move ZMQ initialization from constructor to separate function in NodeShared.
Node::Advertise
returns a publisher id that can be used to publish messages, as an alternative to remembering topic strings.
Gazebo Transport 1.x
Gazebo Transport 1.2.0
Removed duplicate code in NetUtils, and improved speed of DNS lookup