Skip to content

Commit

Permalink
Merge branch 'gz-common5' into gltf_split_metal_rough
Browse files Browse the repository at this point in the history
  • Loading branch information
iche033 authored Aug 29, 2023
2 parents 66d44cb + 6e2444f commit ade65d4
Show file tree
Hide file tree
Showing 40 changed files with 192 additions and 47 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ jobs:
uses: Homebrew/actions/setup-homebrew@master
- run: brew config

# Workaround for https://github.com/actions/setup-python/issues/577
- name: Clean up python binaries
run: |
rm -f /usr/local/bin/2to3*;
rm -f /usr/local/bin/idle3*;
rm -f /usr/local/bin/pydoc3*;
rm -f /usr/local/bin/python3*;
rm -f /usr/local/bin/python3*-config;
- name: Install base dependencies
run: |
brew tap osrf/simulation;
Expand All @@ -39,12 +48,14 @@ jobs:
run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD
- run: make
working-directory: build
- run: make test
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
# Run make install before make test so that the package will be available to
# build examples as part of the test
- name: make install
working-directory: build
run: |
make install;
brew link ${PACKAGE};
- run: make test
working-directory: build
env:
CTEST_OUTPUT_ON_FAILURE: 1
8 changes: 3 additions & 5 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add ticket to inbox
uses: technote-space/create-project-card-action@v1
uses: actions/[email protected]
with:
PROJECT: Core development
COLUMN: Inbox
GITHUB_TOKEN: ${{ secrets.TRIAGE_TOKEN }}
CHECK_ORG_PROJECT: true
project-url: https://github.com/orgs/gazebosim/projects/7
github-token: ${{ secrets.TRIAGE_TOKEN }}

13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz-common5 VERSION 5.4.0)
project(gz-common5 VERSION 5.4.1)
set(GZ_COMMON_VER ${PROJECT_VERSION_MAJOR})

#============================================================================
Expand Down Expand Up @@ -144,7 +144,6 @@ gz_configure_build(QUIT_IF_BUILD_ERRORS
#============================================================================
gz_create_packages()


#============================================================================
# Create documentation
#============================================================================
Expand All @@ -157,3 +156,13 @@ gz_create_docs(
TAGFILES
"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}"
)

#============================================================================
# Build examples
#============================================================================
if (BUILD_TESTING)
gz_build_examples(
SOURCE_DIR ${PROJECT_SOURCE_DIR}/examples
BINARY_DIR ${PROJECT_BINARY_DIR}/examples
)
endif()
73 changes: 73 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
## Gazebo Common 5.x

## Gazebo Common 5.4.1 (2023-08-21)

1. Use `pull_request_target` for triage workflow
* [Pull request #527](https://github.com/gazebosim/gz-common/pull/527)

1. Fix Github project automation for new project board
* [Pull request #526](https://github.com/gazebosim/gz-common/pull/526)

1. Fix Github Actions on macOS
* [Pull request #524](https://github.com/gazebosim/gz-common/pull/524)

1. Only build integration tests if libraries exist
* [Pull request #523](https://github.com/gazebosim/gz-common/pull/523)

1. Fix compiling under linux
* [Pull request #521](https://github.com/gazebosim/gz-common/pull/521)

1. Add missing <fstream> header includes
* [Pull request #518](https://github.com/gazebosim/gz-common/pull/518)

1. Header was dropped in the forward port and breaks downstream
* [Pull request #515](https://github.com/gazebosim/gz-common/pull/515)

1. Port: 4 to 5
* [Pull request #511](https://github.com/gazebosim/gz-common/pull/511)

1. Lint
* [Pull request #Lint](https://github.com/gazebosim/gz-common/pull/Lint)

1. 🎈 4.7.0
* [Pull request #510](https://github.com/gazebosim/gz-common/pull/510)

1. Fix build error when using gz:: with ign-common4
* [Pull request #489](https://github.com/gazebosim/gz-common/pull/489)

## Gazebo Common 5.4.0 (2023-04-28)

1. Add support for bayer images to be saved in a directory
Expand Down Expand Up @@ -329,6 +364,44 @@

## Gazebo Common 4.x

## Gazebo Common 4.7.0 (2023-05-17)

1. Forward Ports: 3 -> 4 (#506)
* [Pull request #506](https://github.com/gazebosim/gz-common/pull/506)
* [Pull request #500](https://github.com/gazebosim/gz-common/pull/500)
* [Pull request #495](https://github.com/gazebosim/gz-common/pull/495)
* [Pull request #491](https://github.com/gazebosim/gz-common/pull/491)

1. Fix build error when using gz:: with ign-common4
* [Pull request #489](https://github.com/gazebosim/gz-common/pull/489)

1. Fix for ffmpeg v6
* [Pull request #497](https://github.com/gazebosim/gz-common/pull/497)

1. Include cstring for memcpy
* [Pull request #501](https://github.com/gazebosim/gz-common/pull/501)

1. Fixed MeshManager Singleton
* [Pull request #451](https://github.com/gazebosim/gz-common/pull/451)

1. Rename COPYING to LICENSE
* [Pull request #494](https://github.com/gazebosim/gz-common/pull/494)

1. Add marcoag as codeowner
* [Pull request #493](https://github.com/gazebosim/gz-common/pull/493)

1. CI workflow: use checkout v3
* [Pull request #490](https://github.com/gazebosim/gz-common/pull/490)

1. Improved coverage remotery
* [Pull request #467](https://github.com/gazebosim/gz-common/pull/467)

1. Added BVH and STL loader tests
* [Pull request #466](https://github.com/gazebosim/gz-common/pull/466)

1. Increased Image coverage
* [Pull request #465](https://github.com/gazebosim/gz-common/pull/465)

## Gazebo Common 4.6.2 (2022-11-17)

1. Fix Capsule mesh generation.
Expand Down
13 changes: 6 additions & 7 deletions av/src/VideoEncoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,19 @@ bool VideoEncoder::Start(
if (this->dataPtr->format.compare(outputFormat->name) == 0)
{
// Allocate the context using the correct outputFormat
auto result = avformat_alloc_output_context2(&this->dataPtr->formatCtx,
auto result = avformat_alloc_output_context2(
&this->dataPtr->formatCtx,
outputFormat, nullptr, this->dataPtr->filename.c_str());
if (result < 0)
{
gzerr << "Failed to allocate AV context [" << av_err2str_cpp(result)
<< "]" << std::endl;
gzerr << "Failed to allocate AV context ["
<< av_err2str_cpp(result)
<< "]" << std::endl;
}
break;
}
}
}
while (outputFormat);


} while (outputFormat);
#endif
}
else
Expand Down
1 change: 1 addition & 0 deletions events/src/Event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "gz/common/Console.hh"
#include "gz/common/Event.hh"
#include "gz/common/Util.hh"

using namespace gz;
using namespace common;
Expand Down
6 changes: 5 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(gz-common-examples)

# Find the gz-common library
find_package(gz-common5 QUIET REQUIRED COMPONENTS events profiler)
Expand All @@ -20,3 +22,5 @@ target_compile_definitions(profiler_example PUBLIC "GZ_PROFILER_ENABLE=1")
add_executable(logging_performance logging_performance.cc)
target_link_libraries(logging_performance gz-common${GZ_COMMON_VER}::core)

add_executable(util_example util.cc)
target_link_libraries(util_example gz-common${GZ_COMMON_VER}::core)
4 changes: 3 additions & 1 deletion examples/logging_performance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

/* This code is originally from:
* https://gist.github.com/KjellKod/0fde0d2564e2eb1b3560
* For testing worst-case console logging latency with a variable number of
* For testing worst-case console logging latency with a variable number of
* threads.
*/

#include <algorithm>
#include <atomic>
#include <map>
#include <thread>
#include <vector>

#include <gz/common/Console.hh>

Expand Down
23 changes: 23 additions & 0 deletions examples/util.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2023 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <gz/common/Util.hh>

int main(int argc, char **argv)
{
gz::common::setenv("TEST", "0");
return 0;
}
3 changes: 2 additions & 1 deletion geospatial/src/Dem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "gz/common/Console.hh"
#include "gz/common/geospatial/Dem.hh"
#include "gz/common/Util.hh"

using namespace gz;
using namespace common;
Expand Down Expand Up @@ -89,7 +90,7 @@ Dem::~Dem()
void Dem::SetSphericalCoordinates(
const math::SphericalCoordinates &_worldSphericalCoordinates)
{
this->dataPtr->sphericalCoordinates =_worldSphericalCoordinates;
this->dataPtr->sphericalCoordinates = _worldSphericalCoordinates;
}

//////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions geospatial/src/ImageHeightmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
#include "gz/common/Console.hh"
#include "gz/common/geospatial/ImageHeightmap.hh"
#include "gz/common/Util.hh"

using namespace gz;
using namespace common;
Expand Down
1 change: 1 addition & 0 deletions graphics/include/gz/common/ColladaLoader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define GZ_COMMON_COLLADALOADER_HH_

#include <string>

#include <gz/common/graphics/Export.hh>
#include <gz/common/MeshLoader.hh>

Expand Down
1 change: 1 addition & 0 deletions graphics/include/gz/common/GTSMeshUtils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <vector>

#include <gz/math/Vector2.hh>

#include <gz/common/graphics/Export.hh>


Expand Down
1 change: 1 addition & 0 deletions graphics/include/gz/common/Image.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <string>
#include <vector>
#include <gz/math/Color.hh>

#include <gz/common/graphics/Export.hh>

#include <gz/utils/ImplPtr.hh>
Expand Down
1 change: 1 addition & 0 deletions graphics/include/gz/common/Material.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <string>

#include <gz/math/Color.hh>

#include <gz/common/graphics/Export.hh>
#include <gz/common/EnumIface.hh>
#include <gz/common/Image.hh>
Expand Down
1 change: 1 addition & 0 deletions graphics/include/gz/common/MeshExporter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define GZ_COMMON_MESHEXPORTER_HH_

#include <string>

#include <gz/common/graphics/Export.hh>

namespace gz
Expand Down
1 change: 0 additions & 1 deletion graphics/include/gz/common/STLLoader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,3 @@ namespace gz
}
}
#endif

3 changes: 1 addition & 2 deletions graphics/src/Image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void Image::SetFromData(const unsigned char *_data,
{
bpp = 8;
scanlineBytes = _width;
}
}
else
{
gzerr << "Unable to handle format[" << _format << "]\n";
Expand Down Expand Up @@ -613,7 +613,6 @@ math::Color Image::MaxColor() const

if (this->dataPtr->PixelIndex(
this->dataPtr->bitmap, x, y, clr) == FALSE)

{
gzerr << "Image: Coordinates out of range ["
<< x << " " << y << "] \n";
Expand Down
1 change: 1 addition & 0 deletions graphics/src/Image_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*
*/
#include <fstream>

#include <gtest/gtest.h>

Expand Down
1 change: 1 addition & 0 deletions graphics/src/MeshManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "gz/common/ColladaExporter.hh"
#include "gz/common/OBJLoader.hh"
#include "gz/common/STLLoader.hh"
#include "gz/common/Util.hh"
#include "gz/common/config.hh"

#include "gz/common/MeshManager.hh"
Expand Down
1 change: 1 addition & 0 deletions include/gz/common/Base64.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define GZ_COMMON_BASE64_HH_

#include <string>

#include <gz/common/Export.hh>

namespace gz
Expand Down
3 changes: 2 additions & 1 deletion include/gz/common/Console.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
#include <iostream>
#include <fstream>
#include <memory>
#include <mutex>
#include <sstream>
#include <string>

#include <gz/common/Util.hh>
#include <gz/common/Export.hh>
#include <gz/utils/SuppressWarning.hh>
#include <gz/common/Util.hh>

namespace gz
{
Expand Down
3 changes: 2 additions & 1 deletion include/gz/common/EnumIface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
#include <string>
#include <vector>
#include <algorithm>
#include <gz/common/Util.hh>

#include <gz/common/Export.hh>
#include <gz/common/Util.hh>

namespace gz
{
Expand Down
Loading

0 comments on commit ade65d4

Please sign in to comment.