Skip to main content

gazebo-yarp-synchronizer

Version Python versions Status Format License Python CI/CD

Synchronization with Gazebo Classic via YARP. With Python batteries.

This project is the client side of the Clock Plugin included in robotology/gazebo-yarp-plugins, with some sugar on top. It provides GazeboYarpSynchronizer, a new class that extends the automatically generated resources from the thrift service and provides initialization and termination helpers.

The main scope of this repository is providing a PyPI package for Python usage, but nothing prevents importing and using it from plain C++.

Dependencies

gazebo-yarp-synchronizer expects to find installed and configured the following dependencies:

Installation

pip3 install gazebo-yarp-synchronizer

Usage

In different terminals, execute:

# 1. Start the YARP server
yarpserver

# 2. Open Gazebo paused
gazebo -u -slibgazebo_yarp_clock.so

# 3. Make sure that YARP is running
yarp detect

# 4. Open the Python interpreter
ipython

Then, in the Python interpreter:

# Import the module
>>> from gazebo_yarp_synchronizer import GazeboYarpSynchronizer

# Create the Gazebo synchronizer
>>> gys = GazeboYarpSynchronizer(gazebo_rpc_port_name="/clock/rpc")

# Initialize the Gazebo synchronizer
>>> gys.init()
# [INFO] |yarp.os.Port| Port /tmp/port/1 active at tcp://192.168.8.102:10056/
# [INFO] |yarp.os.impl.PortCoreOutputUnit| Sending output from /tmp/port/1 to /clock/rpc using tcp

# Inspect simulation status
>>> gys.get_step_size(), gys.get_simulation_time()
# (0.001, 0.0)

# Advance the simulation synchronously
>>> gys.step_simulation_and_wait(number_of_steps=250)

# Print time
>>> gys.get_simulation_time()
# 0.25

# Advance the simulation synchronously
>>> gys.run_simulation_and_wait(duration=0.75)

# Print time
>>> gys.get_simulation_time()
# 1.0

# Terminate the synchronizer
>>> gys.fini()
# [INFO] |yarp.os.impl.PortCoreOutputUnit| Removing output from /tmp/port/1 to /clock/rpc

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Metadata

Release files for gazebo-yarp-synchronizer 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gazebo-yarp-synchronizer 0.9.1
File Size Uploaded
gazebo_yarp_synchronizer-0.9.1.tar.gz 21.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for gazebo-yarp-synchronizer 0.9.1
File Interpreter ABI Platform
gazebo_yarp_synchronizer-0.9.1-cp39-cp39-manylinux_2_24_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64 Details
gazebo_yarp_synchronizer-0.9.1-cp38-cp38-manylinux_2_24_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.24+ x86-64 Details
gazebo_yarp_synchronizer-0.9.1-cp37-cp37m-manylinux_2_24_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64 Details

Total release size: 3.9 MB

Release files / gazebo_yarp_synchronizer-0.9.1.tar.gz

Download URL gazebo_yarp_synchronizer-0.9.1.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
931ff417c2ca98e507f2b2d823747d74082b5b353a5eae2b47164f41c7ec3eb1
BLAKE2b-256 checksum
How to use checksums
fa63fb618e3d8ea55f66126f28d7d04167dc2ad7eafa3e2190a825861c32b915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / gazebo_yarp_synchronizer-0.9.1-cp39-cp39-manylinux_2_24_x86_64.whl

Download URL gazebo_yarp_synchronizer-0.9.1-cp39-cp39-manylinux_2_24_x86_64.whl
Size 1.3 MB
Tags CPython 3.9 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
f847488bca347e345ff1a2d994a2257209491f77b7c8c04686d793260a33b6fc
BLAKE2b-256 checksum
How to use checksums
23cfa7c0ece4153af072bea1e2cf7efd3239a5e9d2e43635943525b98a36751b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / gazebo_yarp_synchronizer-0.9.1-cp38-cp38-manylinux_2_24_x86_64.whl

Download URL gazebo_yarp_synchronizer-0.9.1-cp38-cp38-manylinux_2_24_x86_64.whl
Size 1.3 MB
Tags CPython 3.8 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
11ba07a537c1a463276aa8172b6ce7827a1a4e36ebc0d8648077af19e66b5967
BLAKE2b-256 checksum
How to use checksums
f67f7d29376bb55aa0d72e96ffbe9bb7d929972d369c571309a328b6e8d17b7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / gazebo_yarp_synchronizer-0.9.1-cp37-cp37m-manylinux_2_24_x86_64.whl

Download URL gazebo_yarp_synchronizer-0.9.1-cp37-cp37m-manylinux_2_24_x86_64.whl
Size 1.3 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
4995140b46a927bbba7ac6b9474be2f046c4ca278e87be92b82131a3f5420f7d
BLAKE2b-256 checksum
How to use checksums
85cfb44128aa70a1d791f6be328b3006b368f2aa55f955d7241f531dea7c2bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page