Skip to content

Commit 19b5ae9

Browse files
Merge main
2 parents 4a1d47b + 320b403 commit 19b5ae9

18 files changed

+2825
-670
lines changed

.github/workflows/testpr.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -83,39 +83,39 @@ jobs:
8383
run: |
8484
cp vinca_linux_64.yaml vinca.yaml
8585
mkdir -p recipes
86-
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-64 -m -n
86+
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-64 -m
8787
ls -la recipes
8888
- name: Generate recipes for emscripten-wasm32
8989
shell: bash -l {0}
9090
if: steps.filecheck.outputs.EMSCRIPTEN32_YAML_CHANGED == 1 && matrix.platform == 'emscripten-wasm32'
9191
run: |
9292
cp vinca_emscripten32.yaml vinca.yaml
9393
mkdir -p recipes
94-
$HOME/.pixi/bin/pixi run -e emscripten -v vinca --platform emscripten-wasm32 -m -n
94+
$HOME/.pixi/bin/pixi run -e emscripten -v vinca --platform emscripten-wasm32 -m -n
9595
ls -la recipes
9696
- name: Generate recipes for linux-aarch64
9797
shell: bash -l {0}
9898
if: steps.filecheck.outputs.LINUX_AARCH_YAML_CHANGED == 1 && matrix.platform == 'linux-aarch64'
9999
run: |
100100
cp vinca_linux_aarch64.yaml vinca.yaml
101101
mkdir -p recipes
102-
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-aarch64 -m -n
102+
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform linux-aarch64 -m
103103
ls -la recipes
104104
- name: Generate recipes for osx-64
105105
shell: bash -l {0}
106106
if: steps.filecheck.outputs.OSX_YAML_CHANGED == 1 && matrix.platform == 'osx-64'
107107
run: |
108108
cp vinca_osx.yaml vinca.yaml
109109
mkdir -p recipes
110-
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-64 -m -n
110+
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-64 -m
111111
ls -la recipes
112112
- name: Generate recipes for osx-arm64
113113
shell: bash -l {0}
114114
if: steps.filecheck.outputs.OSX_ARM_YAML_CHANGED == 1 && matrix.platform == 'osx-arm64'
115115
run: |
116116
cp vinca_osx_arm64.yaml vinca.yaml
117117
mkdir -p recipes
118-
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-arm64 -m -n
118+
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform osx-arm64 -m
119119
ls -la recipes
120120
- name: Generate recipes for win-64
121121
shell: bash -l {0}
@@ -126,7 +126,7 @@ jobs:
126126
mkdir /c/bld
127127
cp vinca_win.yaml vinca.yaml
128128
mkdir -p recipes
129-
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform win-64 -m -n
129+
$HOME/.pixi/bin/pixi run -e beta -v vinca --platform win-64 -m
130130
ls -la recipes
131131
- name: Check if there are packages to be built
132132
id: newrecipecheck
@@ -172,5 +172,3 @@ jobs:
172172
run: |
173173
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-staging -c conda-forge --skip-existing
174174
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes -m ./conda_build_config.yaml --target-platform win-64 -c robostack-staging -c conda-forge --skip-existing
175-
176-
#TODO NICOLAS: CREATE EMSCRIPTEN TARGET, LOW PRIORITY

conda_build_config.yaml

+35-23
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,50 @@ protobuf:
77
- 5.28.2
88
spdlog:
99
- 1.15
10+
pugixml:
11+
- '1.14'
1012

11-
cdt_name:
12-
- ${{ "cos7" if linux }}
13+
cdt_name: # [linux]
14+
- conda # [linux]
1315

1416
python:
15-
# - 3.13.* *_cp313
1617
- 3.11.* *_cpython
1718
python_impl:
1819
- cpython
1920

20-
c_stdlib:
21-
- ${{ "sysroot" if linux }}
22-
- ${{ "macosx_deployment_target" if osx }}
23-
- ${{ "vs" if win }}
24-
c_stdlib_version:
25-
- ${{ "2.17" if linux }}
26-
- ${{ "10.14" if osx and x86_64 }}
27-
- ${{ "11.0" if osx and arm64 }}
28-
c_compiler:
29-
- ${{ "gcc" if linux }}
30-
- ${{ "clang" if osx }}
31-
- ${{ "vs2019" if win }}
32-
- ${{ "emscripten" if emscripten }}
33-
cxx_compiler:
34-
- ${{ "gxx" if linux }}
35-
- ${{ "clangxx" if osx }}
36-
- ${{ "vs2019" if win }}
37-
- ${{ "emscripten" if emscripten }}
38-
3921
emscripten_emscripten-wasm32:
4022
- 3.1.45
41-
4223
cross-python_emscripten-wasm32:
4324
- 3.11.* *_12
4425

26+
c_compiler:
27+
- gcc # [linux]
28+
- clang # [osx]
29+
- vs2019 # [win and x86_64]
30+
- vs2022 # [win and arm64]
31+
- emscripten # [emscripten]
32+
c_compiler_version: # [unix]
33+
- 13 # [linux]
34+
- 18 # [osx]
35+
c_stdlib:
36+
- sysroot # [linux]
37+
- macosx_deployment_target # [osx]
38+
- vs # [win]
39+
c_stdlib_version: # [unix]
40+
- 2.17 # [linux]
41+
- 10.13 # [osx and x86_64]
42+
- 11.0 # [osx and arm64]
43+
cxx_compiler:
44+
- gxx # [linux]
45+
- clangxx # [osx]
46+
- vs2019 # [win and x86_64]
47+
- vs2022 # [win and arm64]
48+
- emscripten # [emscripten]
49+
cxx_compiler_version: # [unix]
50+
- 13 # [linux]
51+
- 18 # [osx]
52+
53+
libzenohc:
54+
- 1.1.1
55+
libzenohcxx:
56+
- 1.1.1

patch/dependencies.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ament_package:
2-
add_host: ['importlib_resources']
2+
add_host: ["importlib_resources"]
33
foxglove_bridge:
44
add_host: ["ros-humble-ament-cmake"]
55
ros_ign_interfaces:
@@ -216,3 +216,7 @@ octomap_ros:
216216
add_host: ["octomap"]
217217
octomap_rviz_plugins:
218218
add_host: ["octomap"]
219+
zenoh_cpp_vendor:
220+
add_host: ["libzenohc", "libzenohcxx"]
221+
rmw_zenoh_cpp:
222+
add_host: ["libzenohc", "libzenohcxx"]
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 21eb4ad..170a838 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -1,6 +1,10 @@
6+
cmake_minimum_required(VERSION 3.14)
7+
project(autoware_utils)
8+
9+
+if(WIN32 AND MSVC)
10+
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
11+
+endif()
12+
+
13+
find_package(autoware_cmake REQUIRED)
14+
autoware_package()
15+
16+
diff --git a/include/autoware_utils/ros/uuid_helper.hpp b/include/autoware_utils/ros/uuid_helper.hpp
17+
index 8e27b4c..bbb817f 100644
18+
--- a/include/autoware_utils/ros/uuid_helper.hpp
19+
+++ b/include/autoware_utils/ros/uuid_helper.hpp
20+
@@ -23,6 +23,10 @@
21+
#include <random>
22+
#include <string>
23+
24+
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
25+
+typedef unsigned __int8 uint8_t;
26+
+#endif
27+
+
28+
namespace autoware_utils
29+
{
30+
inline unique_identifier_msgs::msg::UUID generate_uuid()
31+
@@ -30,7 +34,11 @@ inline unique_identifier_msgs::msg::UUID generate_uuid()
32+
// Generate random number
33+
unique_identifier_msgs::msg::UUID uuid;
34+
std::mt19937 gen(std::random_device{}());
35+
+#if defined(_MSC_VER)
36+
+ std::independent_bits_engine<std::mt19937, 8, unsigned short> bit_eng(gen);
37+
+#else
38+
std::independent_bits_engine<std::mt19937, 8, uint8_t> bit_eng(gen);
39+
+#endif
40+
std::generate(uuid.uuid.begin(), uuid.uuid.end(), bit_eng);
41+
42+
return uuid;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
diff --git a/src/decoder.cpp b/src/decoder.cpp
2+
index 0a12d25..10834e3 100644
3+
--- a/src/decoder.cpp
4+
+++ b/src/decoder.cpp
5+
@@ -38,7 +38,11 @@ Decoder::~Decoder() { reset(); }
6+
void Decoder::reset()
7+
{
8+
if (codecContext_) {
9+
+#if LIBAVFORMAT_VERSION_MAJOR < 59
10+
avcodec_close(codecContext_);
11+
+#else
12+
+ avcodec_free_context(&codecContext_);
13+
+#endif
14+
av_free(codecContext_);
15+
codecContext_ = NULL;
16+
}
17+
diff --git a/src/encoder.cpp b/src/encoder.cpp
18+
index a4b6de6..2e1d4a2 100644
19+
--- a/src/encoder.cpp
20+
+++ b/src/encoder.cpp
21+
@@ -54,7 +54,11 @@ static void free_frame(AVFrame ** frame)
22+
void Encoder::closeCodec()
23+
{
24+
if (codecContext_) {
25+
+#if LIBAVFORMAT_VERSION_MAJOR < 59
26+
avcodec_close(codecContext_);
27+
+#else
28+
+ avcodec_free_context(&codecContext_);
29+
+#endif
30+
codecContext_ = nullptr;
31+
}
32+
free_frame(&frame_);
33+
diff --git a/src/utils.cpp b/src/utils.cpp
34+
index da089e4..01e8eea 100644
35+
--- a/src/utils.cpp
36+
+++ b/src/utils.cpp
37+
@@ -104,8 +104,15 @@ enum AVPixelFormat get_preferred_pixel_format(
38+
std::vector<enum AVPixelFormat> get_encoder_formats(const AVCodec * c)
39+
{
40+
std::vector<enum AVPixelFormat> formats;
41+
- if (c && c->pix_fmts) {
42+
- for (const auto * p = c->pix_fmts; *p != AV_PIX_FMT_NONE; ++p) {
43+
+#if LIBAVUTIL_VERSION_MAJOR > 59 || (LIBAVUTIL_VERSION_MAJOR == 59 && LIBAVUTIL_VERSION_MINOR >= 39)
44+
+ const enum AVPixelFormat *pix_fmts = NULL;
45+
+ avcodec_get_supported_config(NULL, c, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void **) &pix_fmts, NULL);
46+
+ if (c && pix_fmts) {
47+
+#else
48+
+ const enum AVPixelFormat *pix_fmts = c->pix_fmts;
49+
+ if (c && pix_fmts) {
50+
+#endif
51+
+ for (const auto * p = pix_fmts; *p != AV_PIX_FMT_NONE; ++p) {
52+
formats.push_back(*p);
53+
}
54+
}

0 commit comments

Comments
 (0)