Skip to content
Merged
4 changes: 2 additions & 2 deletions .github/workflows/testpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
# Change to 'true' to enable the cache upload as artifacts
SAVE_CACHE_AS_ARTIFACT: 'false'
# Change to 'true' to ignore cache and force a full rebuild, but please restore to 'false' before merging
IGNORE_CACHE_AND_DO_FULL_REBUILD: 'true'
IGNORE_CACHE_AND_DO_FULL_REBUILD: 'false'
jobs:
build:
strategy:
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
Expand Down
6 changes: 2 additions & 4 deletions conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ cxx_compiler_version: # [unix]
- 18 # [osx]

libzenohc:
- 1.4.0
- 1.5.1
libzenohcxx:
- 1.4.0
libcap:
- 2.71
- 1.5.1

libhwloc:
- 2.11.2
Expand Down
26 changes: 0 additions & 26 deletions patch/ros-jazzy-apriltag-detector-mit.win.patch

This file was deleted.

27 changes: 0 additions & 27 deletions patch/ros-jazzy-apriltag-detector-umich.win.patch

This file was deleted.

26 changes: 0 additions & 26 deletions patch/ros-jazzy-apriltag-detector.win.patch

This file was deleted.

24 changes: 0 additions & 24 deletions patch/ros-jazzy-apriltag-draw.win.patch

This file was deleted.

15 changes: 0 additions & 15 deletions patch/ros-jazzy-apriltag-tools.win.patch

This file was deleted.

43 changes: 0 additions & 43 deletions patch/ros-jazzy-control-toolbox.patch

This file was deleted.

58 changes: 14 additions & 44 deletions patch/ros-jazzy-ffmpeg-encoder-decoder.unix.patch
Original file line number Diff line number Diff line change
@@ -1,50 +1,20 @@
diff --git a/include/ffmpeg_encoder_decoder/decoder.hpp b/include/ffmpeg_encoder_decoder/decoder.hpp
index 0e2521c..94625e5 100644
--- a/include/ffmpeg_encoder_decoder/decoder.hpp
+++ b/include/ffmpeg_encoder_decoder/decoder.hpp
@@ -81,7 +81,7 @@ private:
AVFrame * colorFrame_{NULL};
SwsContext * swsContext_{NULL};
enum AVPixelFormat hwPixFormat_;
- AVPacket packet_;
+ // AVPacket packet_;
AVBufferRef * hwDeviceContext_{NULL};
};
} // namespace ffmpeg_encoder_decoder
diff --git a/src/decoder.cpp b/src/decoder.cpp
index 5458f21..a2762aa 100644
--- a/src/decoder.cpp
+++ b/src/decoder.cpp
@@ -256,7 +256,7 @@ bool Decoder::decodePacket(
image->header.stamp = it->second;
ptsToStamp_.erase(it);
#ifdef USE_AV_FLAGS
- callback_(image, decodedFrame_->flags || AV_FRAME_FLAG_KEY); // deliver callback
+ callback_(image, decodedFrame_->flags | AV_FRAME_FLAG_KEY); // deliver callback
#else
callback_(image, decodedFrame_->key_frame); // deliver callback
#endif
diff --git a/src/encoder.cpp b/src/encoder.cpp
index ed6ca85..0aa3412 100644
index 80f1de4..fc485b4 100644
--- a/src/encoder.cpp
+++ b/src/encoder.cpp
@@ -211,11 +211,19 @@ void Encoder::doOpenCodec(int width, int height)
setAVOption("tune", tune_);
setAVOption("delay", delay_);
setAVOption("crf", crf_);
@@ -259,9 +259,15 @@ void Encoder::doOpenCodec(int width, int height, const std::string & origEncodin
setAVOption(kv.first, kv.second);
ss << " " << kv.first << "=" << kv.second;
}
+#ifdef __APPLE__
+ RCLCPP_DEBUG(
+ logger_,
+ "codec: %10s, profile: %10s, preset: %10s,"
+ " bit_rate: %10lld qmax: %2d",
+ encoder_.c_str(), profile_.c_str(), preset_.c_str(), bitRate_, qmax_);
+ RCLCPP_INFO(
+ logger_, "codec: %10s, bit_rate: %10lld qmax: %2d options: %s", encoder_.c_str(), bitRate_,
+ qmax_, ss.str().c_str());
+#else
RCLCPP_DEBUG(
logger_,
"codec: %10s, profile: %10s, preset: %10s,"
" bit_rate: %10ld qmax: %2d",
encoder_.c_str(), profile_.c_str(), preset_.c_str(), bitRate_, qmax_);
RCLCPP_INFO(
logger_, "codec: %10s, bit_rate: %10ld qmax: %2d options: %s", encoder_.c_str(), bitRate_,
qmax_, ss.str().c_str());
+#endif

err = avcodec_open2(codecContext_, codec, NULL);
utils::check_for_err("cannot open codec", err);
RCLCPP_INFO_STREAM(
logger_, "cv_bridge_target_format: "
<< cvBridgeTargetFormat_
83 changes: 0 additions & 83 deletions patch/ros-jazzy-realtime-tools.osx.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3fcf87..7e5c654 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,7 @@ target_include_directories(realtime_tools PUBLIC
$<INSTALL_INTERFACE:include/realtime_tools>
)
target_link_libraries(realtime_tools PUBLIC rclcpp::rclcpp rclcpp_action::rclcpp_action rcpputils::rcpputils Threads::Threads Boost::boost)
-if(UNIX)
+if(UNIX AND NOT APPLE)
target_link_libraries(realtime_tools PUBLIC cap)
endif()

@@ -60,7 +60,7 @@ target_include_directories(thread_priority PUBLIC
$<INSTALL_INTERFACE:include/realtime_tools>
)
target_link_libraries(thread_priority PUBLIC rclcpp::rclcpp rclcpp_action::rclcpp_action rcpputils::rcpputils Threads::Threads)
-if(UNIX)
+if(UNIX AND NOT APPLE)
target_link_libraries(thread_priority PUBLIC cap)
endif()

diff --git a/include/realtime_tools/realtime_thread_safe_box.hpp b/include/realtime_tools/realtime_thread_safe_box.hpp
index a1eb9c9..1ec73e9 100644
--- a/include/realtime_tools/realtime_thread_safe_box.hpp
Expand All @@ -33,64 +11,3 @@ index a1eb9c9..1ec73e9 100644
#include "realtime_tools/mutex.hpp"
#define DEFAULT_MUTEX realtime_tools::prio_inherit_mutex
#define RECURSIVE_MUTEX realtime_tools::prio_inherit_recursive_mutex
diff --git a/src/realtime_helpers.cpp b/src/realtime_helpers.cpp
index 9dbbfdf..10c3066 100644
--- a/src/realtime_helpers.cpp
+++ b/src/realtime_helpers.cpp
@@ -32,13 +32,16 @@
#include <windows.h>
#else
#include <sched.h>
-#include <sys/capability.h>
#include <sys/mman.h>
#include <sys/utsname.h>

#include <unistd.h>
#endif

+#if defined(__unix__)
+#include <sys/capability.h>
+#endif
+
#include <cstring>
#include <fstream>
#include <iostream>
@@ -75,6 +78,19 @@ bool configure_sched_fifo(int priority)
#ifdef _WIN32
HANDLE thread = GetCurrentThread();
return SetThreadPriority(thread, priority);
+#elif defined(__APPLE__)
+ pthread_t thread = pthread_self();
+ struct sched_param schedp;
+ memset(&schedp, 0, sizeof(schedp));
+ schedp.sched_priority = priority;
+
+ int policy = SCHED_FIFO;
+ if (pthread_setschedparam(thread, policy, &schedp) == 0) {
+ return true;
+ } else {
+ // Optionally log strerror(errno) for debugging
+ return false;
+ }
#else
struct sched_param schedp;
memset(&schedp, 0, sizeof(schedp));
@@ -94,6 +110,8 @@ std::pair<bool, std::string> lock_memory()
{
#ifdef _WIN32
return {false, "Memory locking is not supported on Windows."};
+#elif defined(__APPLE__)
+ return {false, "Memory locking is not supported on MacOS."};
#else
auto is_capable = [](cap_value_t v) -> bool {
bool rc = false;
@@ -146,6 +164,9 @@ std::pair<bool, std::string> set_thread_affinity(
#ifdef _WIN32
message = "Thread affinity is not supported on Windows.";
return std::make_pair(false, message);
+#elif defined(__APPLE__)
+ message = "Memory locking is not supported on MacOS.";
+ return std::make_pair(false, message);
#else
auto set_affinity_result_message = [](int result, std::string & msg) -> bool {
if (result == 0) {
13 changes: 7 additions & 6 deletions patch/ros-jazzy-ur-client-library.osx.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd720dc..d785132 100644
index 31e09ca..8b3d443 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,9 @@ endif()
@@ -92,6 +92,9 @@ endif()
if(CMAKE_THREAD_LIBS_INIT)
target_link_libraries(urcl PUBLIC "${CMAKE_THREAD_LIBS_INIT}")
endif()
Expand Down Expand Up @@ -47,15 +47,16 @@ index 7745da9..ded500a 100644
namespace urcl
{
diff --git a/include/ur_client_library/control/reverse_interface.h b/include/ur_client_library/control/reverse_interface.h
index e68acd9..38e2a27 100644
index 8220207..665f26d 100644
--- a/include/ur_client_library/control/reverse_interface.h
+++ b/include/ur_client_library/control/reverse_interface.h
@@ -35,8 +35,8 @@
#include "ur_client_library/log.h"
@@ -36,9 +36,9 @@
#include "ur_client_library/ur/robot_receive_timeout.h"
#include "ur_client_library/ur/version_information.h"
#include <cstring>
-#include <endian.h>
#include <condition_variable>
#include <list>
+#include "ur_client_library/portable_endian.h"

namespace urcl
Expand Down Expand Up @@ -211,7 +212,7 @@ index f910a08..eb509ea 100644
#include "ur_client_library/comm/package_serializer.h"

diff --git a/src/comm/tcp_socket.cpp b/src/comm/tcp_socket.cpp
index 778e5f1..1a42c8a 100644
index de18910..7e3c196 100644
--- a/src/comm/tcp_socket.cpp
+++ b/src/comm/tcp_socket.cpp
@@ -20,7 +20,6 @@
Expand Down
Loading