From e169e8f62b153ae362e69a71b7d12d968208ca36 Mon Sep 17 00:00:00 2001 From: wep21 Date: Thu, 30 Jan 2025 02:25:46 +0900 Subject: [PATCH] feat: remove ur skip Signed-off-by: wep21 --- patch/ros-humble-ur-client-library.osx.patch | 226 +++++++++++++++++++ vinca_osx.yaml | 5 - vinca_osx_arm64.yaml | 5 - 3 files changed, 226 insertions(+), 10 deletions(-) create mode 100644 patch/ros-humble-ur-client-library.osx.patch diff --git a/patch/ros-humble-ur-client-library.osx.patch b/patch/ros-humble-ur-client-library.osx.patch new file mode 100644 index 00000000..1de256b4 --- /dev/null +++ b/patch/ros-humble-ur-client-library.osx.patch @@ -0,0 +1,226 @@ +diff --git a/include/ur_client_library/comm/bin_parser.h b/include/ur_client_library/comm/bin_parser.h +index e13aba6..6931af3 100644 +--- a/include/ur_client_library/comm/bin_parser.h ++++ b/include/ur_client_library/comm/bin_parser.h +@@ -21,7 +21,31 @@ + #pragma once + + #include ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include + #include + #include +diff --git a/include/ur_client_library/comm/package_serializer.h b/include/ur_client_library/comm/package_serializer.h +index 7745da9..78859d9 100644 +--- a/include/ur_client_library/comm/package_serializer.h ++++ b/include/ur_client_library/comm/package_serializer.h +@@ -29,7 +29,31 @@ + #ifndef UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED + #define UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED + ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include + + namespace urcl +diff --git a/include/ur_client_library/control/reverse_interface.h b/include/ur_client_library/control/reverse_interface.h +index 9919dbd..077403e 100644 +--- a/include/ur_client_library/control/reverse_interface.h ++++ b/include/ur_client_library/control/reverse_interface.h +@@ -35,7 +35,31 @@ + #include "ur_client_library/log.h" + #include "ur_client_library/ur/robot_receive_timeout.h" + #include ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include + + namespace urcl +diff --git a/include/ur_client_library/primary/package_header.h b/include/ur_client_library/primary/package_header.h +index cd64bda..b4738dd 100644 +--- a/include/ur_client_library/primary/package_header.h ++++ b/include/ur_client_library/primary/package_header.h +@@ -32,7 +32,31 @@ + + #include + #include ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include "ur_client_library/types.h" + + namespace urcl +diff --git a/include/ur_client_library/rtde/package_header.h b/include/ur_client_library/rtde/package_header.h +index f910a08..4013e26 100644 +--- a/include/ur_client_library/rtde/package_header.h ++++ b/include/ur_client_library/rtde/package_header.h +@@ -31,7 +31,31 @@ + #define UR_CLIENT_LIBRARY_RTDE__HEADER_H_INCLUDED + + #include ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include "ur_client_library/types.h" + #include "ur_client_library/comm/package_serializer.h" + +diff --git a/src/comm/tcp_socket.cpp b/src/comm/tcp_socket.cpp +index 8803664..f75f381 100644 +--- a/src/comm/tcp_socket.cpp ++++ b/src/comm/tcp_socket.cpp +@@ -21,7 +21,31 @@ + */ + + #include ++#ifdef __APPLE__ ++ ++#include ++#include ++ ++#define htobe16(x) OSSwapHostToBigInt16(x) ++#define htole16(x) OSSwapHostToLittleInt16(x) ++#define be16toh(x) OSSwapBigToHostInt16(x) ++#define le16toh(x) OSSwapLittleToHostInt16(x) ++ ++#define htobe32(x) OSSwapHostToBigInt32(x) ++#define htole32(x) OSSwapHostToLittleInt32(x) ++#define be32toh(x) OSSwapBigToHostInt32(x) ++#define le32toh(x) OSSwapLittleToHostInt32(x) ++ ++#define htobe64(x) OSSwapHostToBigInt64(x) ++#define htole64(x) OSSwapHostToLittleInt64(x) ++#define be64toh(x) OSSwapBigToHostInt64(x) ++#define le64toh(x) OSSwapLittleToHostInt64(x) ++ ++#else ++ + #include ++ ++#endif /* __APPLE__ */ + #include + #include + #include +@@ -48,7 +72,9 @@ void TCPSocket::setupOptions() + { + int flag = 1; + setsockopt(socket_fd_, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); ++#ifndef __APPLE__ + setsockopt(socket_fd_, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); ++#endif + + if (recv_timeout_ != nullptr) + { diff --git a/vinca_osx.yaml b/vinca_osx.yaml index de8b353d..7b485459 100644 --- a/vinca_osx.yaml +++ b/vinca_osx.yaml @@ -38,11 +38,6 @@ packages_remove_from_deps: - rttest # Not available for macOS and Windows! - gripper_controllers - # Some packages in ur stack do not support macOS - - ur_client_library - - ur_robot_driver - - ur_calibration - - ur skip_existing: # - https://conda.anaconda.org/robostack-humble/ diff --git a/vinca_osx_arm64.yaml b/vinca_osx_arm64.yaml index 8f0c36ea..e9e5e210 100644 --- a/vinca_osx_arm64.yaml +++ b/vinca_osx_arm64.yaml @@ -38,11 +38,6 @@ packages_remove_from_deps: - rttest # Not available for macOS and Windows! - gripper_controllers - # Some packages in ur stack do not support macOS - - ur_client_library - - ur_robot_driver - - ur_calibration - - ur skip_existing: - https://conda.anaconda.org/robostack-staging/