Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[port] 3 ➡️ 4 #104

Merged
merged 38 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f20ac25
changelog
scpeters Jan 22, 2020
f92d592
Merged in transparent_texture_common3 (pull request #221)
luca-della-vedova Jan 22, 2020
e751b6d
prepare for 3.4.0 pre1 release
iche033 Feb 7, 2020
ff3c4d3
Merged in node_anim (pull request #223)
iche033 Feb 12, 2020
cdb135d
Merged in findFileCb (pull request #226)
chapulina Dec 2, 2019
adee179
Merged in custom_paths_uri (pull request #210)
chapulina Feb 19, 2020
edb6d0f
Merged in pbr_common3 (pull request #227)
iche033 Feb 20, 2020
7245613
Merged in collada_catch_errors (pull request #218)
chapulina Jan 11, 2020
c6f457c
Bump to 3.4.0
chapulina Feb 21, 2020
cfac772
Merged in port_obj_invalid_mtl (pull request #230)
iche033 Mar 3, 2020
ea290c2
Merged in pbr_common3 (pull request #231)
luca-della-vedova Feb 25, 2020
49f79b8
Merged in animation_interpolatex_common3 (pull request #232)
luca-della-vedova Apr 2, 2020
377eac1
bump ign-common 3.5.0
iche033 Apr 9, 2020
2dab74f
[ign-common3] Update BitBucket links (#57)
chapulina Apr 22, 2020
a8b8388
Update to gtest 1.10.0 with patch for gcc warnings (#67)
scpeters May 22, 2020
6ca1106
Fix ColladaLoader loading <transparent> tag when <transparency> does …
iche033 Jun 5, 2020
0236017
Remove unused included headers (#71)
traversaro Jun 7, 2020
3c896d7
Refactor Image::MaxColor to reduce computation time (#66)
scpeters May 21, 2020
0639597
More file path APIs (#70)
chapulina Jun 9, 2020
39e8f51
Bump to 3.6.0 (#72)
chapulina Jun 10, 2020
e7fee23
Fix hierarchical submesh processing in the ColladaLoader. (#78)
nkoenig Jun 16, 2020
a8661ca
Fixed the AudioDecoder class (#81)
adlarkin Jul 10, 2020
46c4a82
Fix actions CI ✨ (#83)
chapulina Aug 1, 2020
d4b1fe4
Add more detail to profiler tutorial (#86)
claireyywang Aug 13, 2020
1c29154
fix profiler tutorial image link (#87)
claireyywang Aug 14, 2020
e4d88b0
small tutorials fixes (#92)
Sep 4, 2020
ea545b7
Fix trajectory info memory leak (#93)
Sep 11, 2020
d8b32b7
Add fix
Sep 16, 2020
2fd8145
⬆️ 3.6.1 (#95)
chapulina Sep 16, 2020
b43336a
Fix env behavior to return true on empty vars (#97)
mjcarroll Sep 28, 2020
ac2c4b6
Fix more Animation memory leak (#98)
iche033 Sep 28, 2020
ba80f90
Fix loading dae file with hierarchical node that does not have a name…
iche033 Oct 12, 2020
f5ee75a
[ign-common3] Support fuel URLs for textures (#102)
Oct 16, 2020
6253679
Add Console example (#106)
chapulina Oct 19, 2020
77eab3e
Improve fork experience (#103)
chapulina Oct 20, 2020
dfc3f10
[ign-common3] Miscellaneous Cleanups (#107)
mjcarroll Oct 21, 2020
466164e
⬆️ 3.7.0 (#108)
mjcarroll Oct 22, 2020
68d9445
Fix API differences between URI in 3 and 4
mjcarroll Oct 19, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -x

BUILD_DIR=`pwd`

# Install
make install

Expand All @@ -12,5 +14,4 @@ cd build
cmake ..
make

# return to the compilation place
cd ../../build
cd $BUILD_DIR
13 changes: 13 additions & 0 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
libavcodec-dev
libavdevice-dev
libavformat-dev
libavutil-dev
libfreeimage-dev
libgts-dev
libignition-cmake2-dev
libignition-math6-dev
libswscale-dev
libtinyxml2-dev
pkg-config
ruby-ronn
uuid-dev
18 changes: 0 additions & 18 deletions .github/workflows/ci-bionic.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ubuntu CI

on: [push, pull_request]

jobs:
bionic-ci:
runs-on: ubuntu-latest
name: Ubuntu Bionic CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@master
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
2 changes: 1 addition & 1 deletion .github/workflows/pr-collection-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR Collection Labeler

on: pull_request
on: pull_request_target

jobs:
pr_collection_labeler:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
issues:
types: [opened]
pull_request:
pull_request_target:
types: [opened]
name: Ticket opened
jobs:
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# CMake folders
build
build_*

# OS generated files
.DS_Store
*.swp
100 changes: 100 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,110 @@

## Ignition Common 3.X.X

## Ignition Common 3.7.0 (2020-10-21)

1. Miscellaneous Cleanups
* Feature: Join function for combining strings with a delimiter
* [Pull Request 107](https://github.com/ignitionrobotics/ign-common/pull/107)

1. Improve fork experience
* [Pull Request 103](https://github.com/ignitionrobotics/ign-common/pull/103)

1. Add Console example
* [Pull Request 106](https://github.com/ignitionrobotics/ign-common/pull/106)

1. Support fuel URLs for textures
* [Pull Request 102](https://github.com/ignitionrobotics/ign-common/pull/102)

1. Fix loading dae file with hierarchical node that does not have a name
* [Pull Request 101](https://github.com/ignitionrobotics/ign-common/pull/101)

1. Fix more Animation memory leaks
* [Pull Request 98](https://github.com/ignitionrobotics/ign-common/pull/98)

1. 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
* [Pull Request 97](https://github.com/ignitionrobotics/ign-common/pull/97)

## Ignition Common 3.6.1 (2020-09-16)

1. Fix hierarchical submesh processing in the ColladaLoader.
* [Pull Request 78](https://github.com/ignitionrobotics/ign-common/pull/78)

1. Tutorial updates
* [Pull Request 86](https://github.com/ignitionrobotics/ign-common/pull/86)
* [Pull Request 87](https://github.com/ignitionrobotics/ign-common/pull/87)
* [Pull Request 92](https://github.com/ignitionrobotics/ign-common/pull/92)

1. Fix the AudioDecoder class
* [Pull Request 81](https://github.com/ignitionrobotics/ign-common/pull/81)

1. Fix actions CI
* [Pull Request 83](https://github.com/ignitionrobotics/ign-common/pull/83)

1. Fix trajectory info memory leak
* [Pull Request 93](https://github.com/ignitionrobotics/ign-common/pull/93)

1. Remove URI warning on constructor
* [Pull Request 94](https://github.com/ignitionrobotics/ign-common/pull/94)

## Ignition Common 3.6.0 (2020-06-09)

1. Refactor Image::MaxColor to reduce computation time
* [Pull request 66](https://github.com/ignitionrobotics/ign-common/pull/66)

1. Update to gtest 1.10.0 with patch for gcc warnings
* [Pull request 67](https://github.com/ignitionrobotics/ign-common/pull/67)

1. Fix ColladaLoader loading <transparent> tag when <transparency> does not exist
* [Pull request 68](https://github.com/ignitionrobotics/ign-common/pull/68)

1. Remove unused included headers
* [Pull request 71](https://github.com/ignitionrobotics/ign-common/pull/71)

1. More file path APIs
* [Pull request 70](https://github.com/ignitionrobotics/ign-common/pull/70)

## Ignition Common 3.5.0 (2020-04-09)

1. Add interpolate\_x property to actor animations
* [BitBucket pull request 232](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/232)

1. Update PBR metalness default value to 0.0
* [BitBucket pull request 231](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/231)

1. Fix crash when loading OBJ meshes with invalid materials
* [BitBucket pull request 230](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/230)

## Ignition Common 3.4.0 (2020-02-20)

1. Add PBR material class
* [BitBucket pull request 227](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/227)

1. Custom paths for file URIs (env var + URI)
* [BitBucket pull request 210](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/210)

1. Add function to get NodeAnimation
* [BitBucket pull request 223](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/223)

1. Handle unexpected COLLADA more gracefully
* [BitBucket pull request 218](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/218)

1. Add support for alpha based texture transparency.
* [BitBucket pull request 221](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/221)

1. `tiny_obj_loader`: set better diffuse value when `map_kD` is present and `Kd` is not specified.
* [BitBucket pull request 216](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/216)
* [BitBucket pull request 217](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/217)

1. ColladaLoader: load files with actors with multiple skeletons
* [BitBucket pull request 215](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/215)

1. Compute volume of mesh shapes with `Mesh::Volume` and `SubMesh::Volume`.
* [BitBucket pull request 214](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/214)

1. Port Skeleton fixes from gazebo.
* [BitBucket pull request 209](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/209)

Expand All @@ -33,6 +130,9 @@
1. Fix `Image::ConvertPixelFormat` for `BAYER_BGGR8`
* [BitBucket pull request 211](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/211)

1. Support custom callbacks to find files on global interface
* [BitBucket pull request 226](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-common/pull-requests/226)

## Ignition Common 3.3.0 (2019-08-27)

1. skip GTSMeshUtils test on Windows due to issue #50
Expand Down
1 change: 1 addition & 0 deletions av/include/ignition/common/AudioDecoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace ignition

/// \brief Get the sample rate from the latest decoded file.
/// \return Integer sample rate, such as 44100.
/// If no file is decoded, -1 is returned.
public: int SampleRate();

/// \brief Free audio object, close files, streams.
Expand Down
5 changes: 4 additions & 1 deletion av/src/AudioDecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ bool AudioDecoder::Decode(uint8_t **_outBuffer, unsigned int *_outBufferSize)
/////////////////////////////////////////////////
int AudioDecoder::SampleRate()
{
return this->data->codecCtx->sample_rate;
if (this->data->codecCtx)
return this->data->codecCtx->sample_rate;

return -1;
}

/////////////////////////////////////////////////
Expand Down
25 changes: 17 additions & 8 deletions av/src/AudioDecoder_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ TEST(AudioDecoder, FileNotSet)
unsigned int dataBufferSize;
uint8_t *dataBuffer = NULL;
EXPECT_FALSE(audio.Decode(&dataBuffer, &dataBufferSize));

EXPECT_EQ(audio.File(), "");
EXPECT_EQ(audio.SampleRate(), -1);
}

/////////////////////////////////////////////////
Expand Down Expand Up @@ -59,7 +62,7 @@ TEST(AudioDecoder, DataBuffer)
{
common::AudioDecoder audio;

std::string path = PROJECT_SOURCE_PATH;
std::string path = TEST_PATH;
path += "/data/cheer.wav";
EXPECT_TRUE(audio.SetFile(path));

Expand Down Expand Up @@ -110,8 +113,8 @@ TEST(AudioDecoder, CheerFile)
path = TEST_PATH;
path += "/data/cheer.wav";
EXPECT_TRUE(audio.SetFile(path));
EXPECT_EQ(audio.GetFile(), path);
EXPECT_EQ(audio.GetSampleRate(), 48000);
EXPECT_EQ(audio.File(), path);
EXPECT_EQ(audio.SampleRate(), 48000);

audio.Decode(&dataBuffer, &dataBufferSize);
EXPECT_EQ(dataBufferSize, 5428692u);
Expand All @@ -122,8 +125,8 @@ TEST(AudioDecoder, CheerFile)
path = TEST_PATH;
path += "/data/cheer.ogg";
EXPECT_TRUE(audio.SetFile(path));
EXPECT_EQ(audio.GetFile(), path);
EXPECT_EQ(audio.GetSampleRate(), 44100);
EXPECT_EQ(audio.File(), path);
EXPECT_EQ(audio.SampleRate(), 44100);

audio.Decode(&dataBuffer, &dataBufferSize);
// In Ubuntu trusty the buffer size double for ogg decoding.
Expand All @@ -137,11 +140,17 @@ TEST(AudioDecoder, CheerFile)
path = TEST_PATH;
path += "/data/cheer.mp3";
EXPECT_TRUE(audio.SetFile(path));
EXPECT_EQ(audio.GetFile(), path);
EXPECT_EQ(audio.GetSampleRate(), 44100);
EXPECT_EQ(audio.File(), path);
EXPECT_EQ(audio.SampleRate(), 44100);

audio.Decode(&dataBuffer, &dataBufferSize);
EXPECT_EQ(dataBufferSize, 4995072u);

// later versions of ffmpeg produces a different buffer size probably due to
// underlying changes in the decoder. The size of the first decoded frame
// is much smaller than all other frames.
EXPECT_TRUE(dataBufferSize == 4995072u ||
dataBufferSize == 4987612u ||
dataBufferSize == 4987612u * 2);
}
}

Expand Down
4 changes: 0 additions & 4 deletions av/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
ign_get_libsources_and_unittests(sources gtest_sources)

# FIXME: This class does not currently work
list(REMOVE_ITEM sources AudioDecoder.cc)
list(REMOVE_ITEM gtest_sources AudioDecoder_TEST.cc)

ign_add_component(av SOURCES ${sources} GET_TARGET_NAME av_target)

target_link_libraries(${av_target}
Expand Down
4 changes: 0 additions & 4 deletions av/src/VideoEncoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>

#include <mutex>

Expand Down
12 changes: 8 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

# Find the ignition-common library
find_package(ignition-common4 QUIET REQUIRED COMPONENTS events profiler)
set(IGN_COMMON_VER 4)
find_package(ignition-common${IGN_COMMON_VER} QUIET REQUIRED COMPONENTS events profiler)

add_executable(assert_example assert_example.cc)
target_link_libraries(assert_example ignition-common4::core)
target_link_libraries(assert_example ignition-common${IGN_COMMON_VER}::core)

add_executable(console_example console.cc)
target_link_libraries(console_example ignition-common${IGN_COMMON_VER}::core)

add_executable(events_example events.cc)
target_link_libraries(events_example ignition-common4::events)
target_link_libraries(events_example ignition-common${IGN_COMMON_VER}::events)

add_executable(profiler_example profiler.cc)
target_link_libraries(profiler_example ignition-common4::profiler)
target_link_libraries(profiler_example ignition-common${IGN_COMMON_VER}::profiler)
target_compile_definitions(profiler_example PUBLIC "IGN_PROFILER_ENABLE=1")
25 changes: 25 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Examples

These examples demonstrate various Ignition Common features.

## Build

After installing Ignition Common, from source or from binaries, build with:

```
git clone https://github.com/ignitionrobotics/ign-common/
cd ign-common/examples
mkdir build
cd build
cmake ..
make
```

## Run

One execuable is created inside the `build` folder for each example.

You can run each executable from the build folder with `./executablename`. For example:

`./events_example`

Loading