common#
Gazebo Common : AV, Graphics, Events, and much more.
Maintainer: nate AT openrobotics DOT org
Gazebo Common, a component of Gazebo, provides a set of libraries that cover many different use cases. An audio-visual library supports processing audio and video files, a graphics library can load a variety 3D mesh file formats into a generic in-memory representation, and the core library of Gazebo Common contains functionality that spans Base64 encoding/decoding to thread pools.
Table of Contents
Features
Some of the many capabilities contained in Gazebo Common are:
AV: FFMpeg based audio decoder, and video encoder and decoder.
Core: Base64 encoding and decoding, battery model, console logging, cross-platform filesystem interface, URI processing, and a thread pool.
Events: Mouse and keyboard events, and a high-performance signal and callback system.
Graphics: Collada, SVG, STL, OBJ, and DEM loaders. In-memory mesh, image, and material representations. Animation processing and BVH loader.
Profiler: A common profiler abstraction that can be used to measure and visualize run time of various pieces of Gazebo software.
Install
See the installation tutorial.
Usage
Please refer to the examples directory.
Folder Structure
Refer to the following table for information about important directories and files in this repository.
+-- av Header and source files for the AV component.
+-- events Header and source files for the Event component.
+-- examples Example programs.
+-- geospatial Geospatial component for heightmap & DEMs
+-- graphics Header and source files for the Graphics component.
+-- include/gz/common Header files for the core component.
+-- io IO component. Read object from stream.
+-- profiler Header and source files for the Profiler component.
+-- src Core source files and unit tests.
+-- test
| +-- integration Integration tests.
| +-- performance Performance tests.
| +-- static_assertions Static assertion tests.
| +-- regression Regression tests.
+-- tutorials Tutorials, written in markdown.
+-- Changelog.md Changelog.
+-- CMakeLists.txt CMake build script.
+-- Migration.md Migration guide.
Contributing
Please see the contributing guide.
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 Common 6.x
Gazebo Common 6.0.0 (2024-09-25)
Baseline: this includes all changes from 5.6.0 and earlier.
Add a note about the conda-distributed ffmpeg on windows
Fix table of content
Fix severity level of gzlog
Fix loading lightmaps from gltf / glb meshes
Fix AssimpLoader collada texture coordinates
Implement console logging using
spdlog
Update Changelog, README and prepare for gz-common6.0.0~pre1 release
Use self-pipe trick to implement signal handlers
Replace GTS with CDT
Remove debug logging introduced accidentally in PR review
Fix crash when calling absPath with empty input
DEM: Add support for GDAL vsicurl, vsizip support and avoid segfaults with huge VRT datasets
Enable 24.04 CI, require cmake 3.22.1
SubMesh::RecalculateNormals improvement
fix data race tsan issue
Generate a more unique texture name for glb embedded textures
Add package.xml
Fix deprecation warnings
Fix macOS workflow and update on-push branches
port: 5 to main
Clean up Clang compiler warnings
Add new function in MeshManager to merge all submeshes of a mesh into one
Adds new function in MeshManager for performing convex decomposition
Fix compatibility with FFmpeg5.0
Remove HIDE_SYMBOLS_BY_DEFAULT: replace by a default configuration in gz-cmake.
Fix search for UUID on Windows logic
Fix windows compilation by setting right visibility attributes
Drop the internal vendored version of TinyXML2
Revert “Add missing visibility declarations (#548)”
Add missing visibility declarations
Remove ignition
Bumps in ionic: use gz-cmake4, gz-utils3, gz-math8
Remove deprecated std::iterator inheritance
Collada and Assimp test for default animation names
Avoid Io.hh header name clash
Default name assignment to animations without names
Skip CSV header when reading DataFrame
Main deprecations
Add CSV data parsing
Introduces Flips UV flag, removes empty space
⬆️ Bump main to 6.0.0~pre1
Gazebo Common 5.x
Gazebo Common 5.6.0 (2024-04-23)
Clarify units for the DEM classes
Remove pessimizing move
Fix bazel build
Add new function in MeshManager to merge all submeshes of a mesh into one
Adds new function in MeshManager for performing convex decomposition
Gazebo Common 5.5.1 (2024-03-14)
Various Bazel adjustments for linting
Extend AssimpLoader to parse material transmission factor
Fix noise issue that appears in certain image textures
Gazebo Common 5.5.0 (2024-02-26)
Be louder when graphics is missing for geospatial
Multiple memory cleanup fixes
Clarify GDAL version requirement
🎈 3.17.0
Update CI badges in README
Backwards compatible assimp texture name fix
Fix error output when creating directories
Update github action workflows
Fix segfault in case of no write access to log dir
ign -> gz
Support loading glb with compressed jpeg textures
Fix glTF / glb root node transform
EnumIface: suppress deprecation warning
Prevent loading lightmaps if mesh is a glb file that has an occlusion-metallic-roughness texture
🎈 3.16.0
Fix cstdint with GCC 13
Gazebo Common 5.4.2 (2023-09-26)
Documentation fixes
Fix glTF metalness and roughness map orientation
Build examples from CMake rather than executable
Gazebo Common 5.4.1 (2023-08-21)
Use
pull_request_target
for triage workflowFix Github project automation for new project board
Fix Github Actions on macOS
Only build integration tests if libraries exist
Fix compiling under linux
Add missing
header includes Header was dropped in the forward port and breaks downstream
Port: 4 to 5
Lint
🎈 4.7.0
Fix build error when using gz:: with ign-common4
Gazebo Common 5.4.0 (2023-04-28)
Add support for bayer images to be saved in a directory
Fix for ffmpeg v6
Include cstring for memcpy
Fixed MeshManager Singleton
Fix for ffmpeg v6
Rename COPYING to LICENSE
Add marcoag as codeowner
CI workflow: use checkout v3
Update common5 for bazel builds
Fix profile tutorial
Update version in Changelog
Fixed metalness/roughness in ASSIMP loader
Fix Capsule mesh generation
Improved coverage remotery
Added BVH and STL loader tests
Increased Image coverage
Gazebo Common 5.3.1 (2022-11-17)
Fix out of bounds access to rotation array in assimp loader
Fix issues detected by ASAN
Gazebo Common 5.3.0 (2022-11-14)
Expose Vertex & Index raw ptrs for efficient reading
Gazebo Common 5.2.2 (2022-10-26)
[Backport] Avoid Io.hh header name clash (#471)
Gazebo Common 5.2.1 (2022-10-19)
Fix arm builds and tests
Gazebo Common 5.2.0 (2022-10-18)
Add CSV data parsing
Skip CSV header when reading DataFrame.
Adds an API to retrieve keys.
Gazebo Common 5.1.0 (2022-10-13)
4 ➡️ 5
🎈 4.6.1
🎈 4.6.0
🎈 4.5.2
3 ➡️ 4
🎈 3.15.1
🎈 3.15.0
🎈 3.14.2
Don’t install auto-generated profiler.hh
Fixed MeshManager Singleton
Don’t install CMakeLists.txt
ign -> gz Migrate Ignition Headers : gz-common
Suppress a bunch of unnecessary test output
Fix metallic roughness file path for gltf assets
Include cstring for memcpy
Backport from 5 to 3 - Fix deprecation warning from new ffmpeg
Remove redundant namespace references
Gazebo Common 5.0.0 (2022-09-22)
Improved visualization hw encoding tutorial gz-common5
Updated install instructions gz-common5
Fix reading pixel values from single channel 16 bit image
Add gdal to prerequisites
Cleanup long-deprecated ifdefs
Add a test for loading gltf with external textures
Fix ABI checker with testing module
Implement XDisplacement function for checking x displacement for all nodes
Fix deprecation warning from new ffmpeg
Use assimp for loading meshes
Add API for getting Image bytes as std::vector
Support lunar coordinate transformations
Remove configure.bat, export CXX_STANDARD
Update GoogleTest to latest version
Support compressed images and RGBA data in Image class
Expose API to set non earth DEMs flag
Fix console bug when IGN_HOMEDIR is unset
Test updates for common::testing module.
Ignition -> Gz Renaming
Move header files with git mv
Create redirection aliases
Migrate sources in src, test, examples, and include
Remove ignition redirection headers for Plugin Pull request #350
Move Plugin headers back from gz to ignition Pull request #350
ign -> gz: namespaces and logging functions Pull request #356
Deprecation warnings for Plugin Pull request #350
Use ignition headers for plugin Pull request #350
Fix profiler option Pull request #371
ign -> gz Macro Migration : gz-common Pull request #366
[ign -> gz] CMake functions Pull request #370
ign -> gz Environment Variable Migration Pull request #365
Migrate IGNITION- CMake variables Pull request #381
Rename CMake project to gz Pull request #352
ign -> gz Partial Docs Migration and Project Name Followups : gz-common Pull request #383
Partial cmake and source migrations Pull request #392
Migrate ign_remotery_vis Pull request #392
Finale: Source hard-tocks Pull request #395
Remove deprecated include Pull request #400
[DOCUMENTATION] Adds full path for the profiler
prevent switch case statement fall through.
Make Timer_TEST more robust
Bumps in garden : ign-common5
Use ign-utils instead of ign-cmake utilities
Bumps in garden : ign-common5
examples/CMakeLists.txt: fix find version variable
Add common::testing module
Fix typo bug in MaterialIndex
Fix edge case handling for SubMesh::MaterialIndex
DEM improvements to nodata, buffer and other corner cases
🧹 Drop all test main functions from gtest files
Class with final destructor should be final
Geospatial component for heightmaps and DEM support
Fix filesystem::separator, parentPath and basename behavior
Miscellaneous cleanup of Events API
Adds an
isRelativePath
to determine if path is relativeImage: make several methods const
Utilize ImplPtr in AV component
Update tests to use more STL functionality
Fixed parentPath() return when input has no parent
Utilize ImplPtr for Timer
Update to use std::filesystem rather than Boost
Use SuppressWarning from ign-utils
README: update badge
Revert geospatial component for now
Move geospatial headers to subfolder
Geospatial component for heightmap & DEMs
Upload coverage for Focal builds
Try to checkout matching branch in macos workflow
Bumps in garden: use ignition-math7
Add macOS 11 workflow
Use ImplPtr where relevant
Remove all deprecated functionality from main
ign-common5: drop Bionic
Update tension for common5
Bump main to 5.0.0~pre1
Gazebo Common 4.x
Gazebo Common 4.7.0 (2023-05-17)
Forward Ports: 3 -> 4 (#506)
Fix build error when using gz:: with ign-common4
Fix for ffmpeg v6
Include cstring for memcpy
Fixed MeshManager Singleton
Rename COPYING to LICENSE
Add marcoag as codeowner
CI workflow: use checkout v3
Improved coverage remotery
Added BVH and STL loader tests
Increased Image coverage
Gazebo Common 4.6.2 (2022-11-17)
Fix Capsule mesh generation.
Gazebo Common 4.6.1 (2022-10-11)
All common3 changes up to 3.15.1 release
Gazebo Common 4.6.0 (2022-10-11)
All common3 changes up to 3.15.0 release
Include cstring for memcpy
Gazebo Common 4.5.2 (2022-08-16)
Fix deprecation warning from new
ffmpeg
Remove redundant namespace references
Add code coverage ignore file
Change
IGN_DESIGNATION
toGZ_DESIGNATION
Ignition -> Gazebo
Support absolute Win paths with forward slashes in
common::FindFile
Fix
FindSharedLibrary
for relative plugin pathsFix race condition in
FileLogger
Synchronize console writes
Profiler tutorial: viewing from Docker container
Gazebo Common 4.5.1 (2022-06-21)
Fix spelling in URI error message
gzLogInit
fails if run after console outputFix compatibility with FFmpeg 5.0
packages.apt: don’t install ruby-ronn
Add some tests for
parentPath
/basename
Add CI support for Jammy
Minor typo in filesystem documentation
Fix out-of-bounds access in sanitizeSlashes
Fix out-of-bound access in URI
Move performance test to examples
Fix memory corruption & leaks in Image
Gazebo Common 4.5.0 (2022-01-12)
Fixed crash when a Collada file has an empty normal vector
Support 16 bit heightmaps
Fix bug in URIPath assignment operator
Use
libexec
to install binaryremotery_vis
Normalize normal vectors from OBJ.
Synchronize console writes
Added method to remove meshes from the
MeshManager
Fixed macOS symbol in
common::Profiler
Fix skip logic for integration tests
Use direct evaluation for SKIP_av.
Gazebo Common 4.4.0 (2021-10-15)
Add support for animation tension
Gazebo Common 4.3.0 (2021-09-27)
Remove gz-utils from TempDirectory
Add functions and objects for Temporary Directories
Fix memory corruption & leaks in Image
Fix a typo in VideoEncoder_TEST.
Fix segfault caused by destruction order of Event and Connection
Infrastructure
Documentation
Gazebo Common 4.2.0 (2021-08-02)
Export lights to dae
Add cstring for std::memcpy
Gazebo Common 4.1.0 (2021-06-22)
Make KeyEvent rule-of-five compliant
Fix
av_*
API usage for deprecationsSet project-wide standard to C++17
Remove
CMAKE_CXX_FLAGS
from test targetsSupport loading PBR textures in OBJLoader
Remove
tools/code_check
and update codecovPort codecov to new configuration
Fix loading collada files with multiple texcoord sets using the same offset
Add function to convert single channel image data to RGB image
Remove ColladaExporter path constraint
Avoid duplication of / in joinPaths (Windows)
Fixed colladaLoader on Windows
Improved Windows support
Function to serialize compressed image to buffer
Fixed tutorial link
Use matching malloc/free for AudioDecoder.
Add bazel buildsystem support
Gazebo Common 4.0.0 (2021-03-30)
Include windows instructions in examples README.md
Fix crash when using BVH animations
Rotate capsule to Z-up
Add implementation pointer to gz-common classes
Cleanup and add implementation pointer to Animation classes
Install the profiler in a version-safe manner
Restore support for model:// URIs
Deprecated common::Time
Update codeowners
Workflow updates
Update BitBucket Links
Corrected
BAYER_RGGR8
toBAYER_BGGR8
inPixelFormatName
andPixelFormatType
located ingraphics/include/gz/common/Image.hh
.Added URI Authority parsing to the URI class. Authority information can be found here. This update also caused some formally valid syntax to become invalid, and some formally invalid syntax to become valid. See the migration guide.
Gazebo Common 3.x
Gazebo Common 3.17.0 (2024-01-05)
Fix error output when creating directories
Update github action workflows
Fix segfault in case of no write access to log dir
Gazebo Common 3.16.0 (2023-06-05)
Include cstdint to build with GCC 13
Fix missing cstdint header in latest gcc build
Fix for ffmpeg v6
Include cstring for memcpy
Fixed MeshManager Singleton
Rename COPYING to LICENSE
Add marcoag as codeowner
CI workflow: use checkout v3
Improved coverage remotery
Added BVH and STL loader tests
Increased Image coverage
Gazebo Common 3.15.1 (2022-10-11)
Fix build on case-insensitive filesystems
Don’t install CMakeLists.txt
Gazebo Common 3.15.0 (2022-10-06)
ign -> gz Migrate Ignition Headers
Gazebo Common 3.14.2 (2022-08-16)
Fix deprecation warning from new
ffmpeg
Gazebo Common 3.14.1 (2022-06-01)
Profiler tutorial: viewing from Docker container
ignLogInit can be called after an ignerr, etc
Fix compatibility with FFmpeg 5.0
Fix out-of-bounds access in sanitizeSlashes
Fix memory corruption & leaks in Image
Normalize normal vectors from OBJ.
Fixed macos symbol in
common::profiler
Fix skip logic for integration tests
Gazebo Common 3.14.0 (2021-10-12)
Support loading PBR textures in OBJLoader
Remove CMAKE_CXX_FLAGS from test targetrs
Set project-wide standard to C++17
Fix av_* API usage for deprecations
Make KeyEvent rule-of-five compliant
Fix segfault caused by destructionb order of Event and Connection
Fix a typo in VideoEncoder_TEST
Use direct evaluation for SKIP_av
Gazebo Common 3.13.2 (2021-05-11)
Backport collada fixes (Backport #204)
Fix join paths again
Gazebo Common 3.13.1 (2021-05-03)
Fix join paths to remove duplicate separators
Fix loading collada files with multiple texcoord sets using the same offset.
Gazebo Common 3.13.0 (2021-04-27)
Add function to convert single channel image data to RGB image
Avoid duplication of / in joinPaths (Windows)
Fix colladaLoader on Windows
Backport #188: Fix crash when using BVH animations.
Improved Windows support
Gazebo Common 3.12.0 (2021-04-06)
Remove use of _SOURCE and _BINARY dirs in tests.
Add bazel buildsystem support.
Use matching malloc/free for AudioDecoder.
Fixed tutorial link in the README.md.
Function to serialize compressed image to buffer
Gazebo Common 3.11.1 (2021-03-08)
Relax expectation so encoder test passes on ARM
Revert “Associate library materials effect with meshes (#151)”
Gazebo Common 3.11.0 (2021-03-05)
Fix image red and blue swapping
Remove issue & PR templates
Prevent console spamming when exporting a mesh that has multiple texture coordinates
Associate library materials effect with meshes
Reverted in 3.11.1
Added issue & PR templates
Added support for HW-accelerated video encoding.
Added FlagSet utility class
Disable failing VideoEncoder and Audioecoder tests on Windows
Added ellipsoid mesh
Added capsule mesh
Gazebo Common 3.10.1 (2021-01-20)
Fix transparency tag in the Collada exporter.
Gazebo Common 3.10.0 (2021-01-05)
Added render order to material class
Fix memory leak in Pbr.cc
Gazebo Common 3.9.0 (2020-12-21)
Support multiple texture coordinate sets
Add Lightmap to material
Gazebo Common 3.8.0 (2020-12-08)
Call gz::common::load() from Video constructor
Cleanup
Drop unused forward declaration: Pull Request 113
Remove two known flaky tests from Windows CI: Pull Request 119
Make ignstrtok private to Util.cc: Pull Request 134
Fix memory leaks Pull Request 136
Windows
Do not hardcode USE_EXTERNAL_TINYXML2 to OFF: Pull Request 116
Fix GZ_HOMEDIR on Windows: Pull Request 127
Improve Windows support: Pull Request 128
Fix Windows AV CI warnings and test failures: Pull Request 135
Fix video encoder timing
Feature: Add transformation matrix to ColladaExport
Gazebo Common 3.7.0 (2020-10-21)
Miscellaneous Cleanups
Feature: Join function for combining strings with a delimiter
Improve fork experience
Add Console example
Support fuel URLs for textures
Fix loading dae file with hierarchical node that does not have a name
Fix more Animation memory leaks
Fix env behavior to return true on empty vars
Feature: Add setenv for setting environment variables
Feature: Add unsetenv for clearing environment variables
Feature: Add alternative env implementation that respects empty variables
Gazebo Common 3.6.1 (2020-09-16)
Fix hierarchical submesh processing in the ColladaLoader.
Tutorial updates
Fix the AudioDecoder class
Fix actions CI
Fix trajectory info memory leak
Remove URI warning on constructor
Gazebo Common 3.6.0 (2020-06-09)
Refactor Image::MaxColor to reduce computation time
Update to gtest 1.10.0 with patch for gcc warnings
Fix ColladaLoader loading
tag when does not exist Remove unused included headers
More file path APIs
Gazebo Common 3.5.0 (2020-04-09)
Add interpolate_x property to actor animations
Update PBR metalness default value to 0.0
Fix crash when loading OBJ meshes with invalid materials
Gazebo Common 3.4.0 (2020-02-20)
Add PBR material class
Custom paths for file URIs (env var + URI)
Add function to get NodeAnimation
Handle unexpected COLLADA more gracefully
Add support for alpha based texture transparency.
tiny_obj_loader
: set better diffuse value whenmap_kD
is present andKd
is not specified.ColladaLoader: load files with actors with multiple skeletons
Compute volume of mesh shapes with
Mesh::Volume
andSubMesh::Volume
.Port Skeleton fixes from gazebo.
Port gazebo9 fix for ColladaLoader with multiple geometries
SystemPaths::FindSharedLibrary
: return input if its is an absolute path to a fileFix
Image::ConvertPixelFormat
forBAYER_BGGR8
Support custom callbacks to find files on global interface
Gazebo Common 3.3.0 (2019-08-27)
skip GTSMeshUtils test on Windows due to issue #50
Add bvh animation support for skeleton and TrajectoryInfo
ColladaLoader: fix wrong node weights caused by buffer overflow bug
Filesystem copy directory and parentpath
Gazebo Common 3.2.0 (2019-08-07)
Allow gzLogInit to use an absolute path. Added a timeToIso that converts a given time to an ISO string. Some console timestamps were using
GZ_SYSTEM_TIME_NS()
and othersgz::common::systemTimeISO()
. Switched all to usegz::common::systemTimeISO()
.Port ColladaLoader fix: use default value of 1 for stride parameter when unset.
Gazebo Common 3.1.0 (2019-05-17)
Image::PixelFormatType: append
BAYER_BGGR8
instead of replacingBAYER_RGGR8
Use
std::tolower
with locale in lowercase helper functionProfiler: give hint on osx to find frameworks so it doesn’t find them inside Xcode
Fix windows tests: SystemPathsFixture.FileSystemPaths and TimeTest.Sleep
Filesystem functions to create unique paths
Battery additions for LinearBatteryPlugin port to gz-sim
Consolidate Console::log streams to reduce colored log size
Fix ColladaLoader to support mixamo models and fix skeleton animation loading
Gazebo Common 3.0.0 (2019-02-28)
Use gz-cmake2 and support Ubuntu Bionic (18.04).
WorkerPool: allow user to set minimum number of worker threads.
ColladaLoader fixes: setting multiple texcoord’s, check for line breaks when using
split
Event: replace
operator()
andSignal()
explicit templates with variadic templates and perfect forwarding.Event: use second template argument to disambiguate events with matching signatures.
Add profiler using Remotery.
Added hash64 function for converting
std::string
touint64_t
asconstexpr
.SystemPaths: search paths in
GZ_FILE_PATH
environment variable when finding filesTime::Sleep
: return amount of time actually sleptNodeTransform: use unique_ptr for private data, add copy constructor/assignment
Gazebo Common 2.x
Gazebo Common 2.x.x (2018-XX-XX)
Gazebo Common 2.0.0 (2018-02-11)
Use ignition-cmake1 and components for av, events, and graphics
Expand plugin functionality with PluginPtr and specializations
Added signal handler class
Update tinyobjloader to version that supports triangulating meshes with concave polygons.
Gazebo Common 1.x.x (2018-XX-XX)
Gazebo Common 1.X.X (20XX-XX-XX)
Time::Sleep: use CLOCK_MONOTONIC on Linux
Gazebo Common 1.1.1 (2018-05-23)
Documentation upload improvements
Fix build on homebrew with ffmpeg4
Remove symbolic link directory
Gazebo Common 1.1.0 (2018-04-16)
Accept spaces on URI path
Fix gcc7 compiler warnings on artful
Fix artful cppcheck
Fix nanosecond to second conversion