Skip to content

chore: update win patches #51

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

Merged
merged 12 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 0 additions & 13 deletions patch/ros-jazzy-moveit-planners-stomp.win.patch

This file was deleted.

4 changes: 2 additions & 2 deletions patch/ros-jazzy-moveit-ros-benchmarks.win.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/moveit_ros/benchmarks/CMakeLists.txt b/moveit_ros/benchmarks/CMakeLists.txt
index 58538a70b9..7b60f0a220 100644
--- a/moveit_ros/benchmarks/CMakeLists.txt
+++ b/moveit_ros/benchmarks/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,7 @@ set_target_properties(moveit_ros_benchmarks
if(WIN32)
set(EXTRA_LIB ws2_32.lib)
Expand Down
6 changes: 3 additions & 3 deletions patch/ros-jazzy-moveit-ros-warehouse.win.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/moveit_ros/warehouse/CMakeLists.txt b/moveit_ros/warehouse/CMakeLists.txt
diff --git a/warehouse/CMakeLists.txt b/CMakeLists.txt
index 825f6b11c7..e68e1d866b 100644
--- a/moveit_ros/warehouse/CMakeLists.txt
+++ b/moveit_ros/warehouse/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,7 @@ target_link_libraries(moveit_warehouse_broadcast moveit_warehouse)
add_executable(moveit_save_to_warehouse src/save_to_warehouse.cpp)
ament_target_dependencies(moveit_save_to_warehouse
Expand Down
59 changes: 0 additions & 59 deletions patch/ros-jazzy-moveit-servo.win.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patch/ros-jazzy-moveit-setup-core-plugins.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/start_screen_widget.cpp b/src/start_screen_widget.cpp
index edd73eb3c..d88a90eaa 100644
--- a/src/start_screen_widget.cpp
+++ b/src/start_screen_widget.cpp
@@ -79,7 +79,7 @@ void StartScreenWidget::onInit()
right_image_label_ = new QLabel(this);
auto image_path = getSharePath("moveit_setup_assistant") / "resources/MoveIt_Setup_Assistant2.png";

- if (right_image_->load(image_path.c_str()))
+ if (right_image_->load(QString::fromStdString(image_path.string())))
{
right_image_label_->setPixmap(QPixmap::fromImage(*right_image_));
right_image_label_->setMinimumHeight(384); // size of right_image_label_
36 changes: 0 additions & 36 deletions patch/ros-jazzy-pilz-industrial-motion-planner.win.patch

This file was deleted.

15 changes: 5 additions & 10 deletions patch/ros-jazzy-ur-calibration.win.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/ur_calibration/CMakeLists.txt b/ur_calibration/CMakeLists.txt
index 0b17e4d5f..31c63864f 100644
--- a/ur_calibration/CMakeLists.txt
+++ b/ur_calibration/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b17e4d5..9ace1736 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,10 +2,9 @@ cmake_minimum_required(VERSION 3.5)
project(ur_calibration)

Expand All @@ -15,12 +15,7 @@ index 0b17e4d5f..31c63864f 100644

if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
message("${PROJECT_NAME}: You did not request a specific build type: selecting 'RelWithDebInfo'.")

diff --git a/ur_calibration/CMakeLists.txt b/ur_calibration/CMakeLists.txt
index 0b17e4d5f..8b8bbf871 100644
--- a/ur_calibration/CMakeLists.txt
+++ b/ur_calibration/CMakeLists.txt
@@ -37,7 +37,7 @@ target_include_directories(calibration
@@ -37,7 +36,7 @@ target_include_directories(calibration
${YAML_CPP_INCLUDE_DIRS}
)
target_link_libraries(calibration
Expand Down
207 changes: 207 additions & 0 deletions patch/ros-jazzy-ur-client-library.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
diff --git a/include/ur_client_library/comm/bin_parser.h b/include/ur_client_library/comm/bin_parser.h
index e13aba6..6de673e 100644
--- a/include/ur_client_library/comm/bin_parser.h
+++ b/include/ur_client_library/comm/bin_parser.h
@@ -21,7 +21,6 @@
#pragma once

#include <assert.h>
-#include <endian.h>
#include <inttypes.h>
#include <array>
#include <bitset>
@@ -29,6 +28,7 @@
#include <cstring>
#include <string>
#include <memory>
+#include "ur_client_library/endian.h"
#include "ur_client_library/log.h"
#include "ur_client_library/types.h"
#include "ur_client_library/exceptions.h"
diff --git a/include/ur_client_library/comm/package_serializer.h b/include/ur_client_library/comm/package_serializer.h
index 7745da9..ebf128e 100644
--- a/include/ur_client_library/comm/package_serializer.h
+++ b/include/ur_client_library/comm/package_serializer.h
@@ -29,7 +29,7 @@
#ifndef UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED
#define UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED

-#include <endian.h>
+#include "ur_client_library/endian.h"
#include <cstring>

namespace urcl
diff --git a/include/ur_client_library/control/reverse_interface.h b/include/ur_client_library/control/reverse_interface.h
index e68acd9..aa9d1c1 100644
--- a/include/ur_client_library/control/reverse_interface.h
+++ b/include/ur_client_library/control/reverse_interface.h
@@ -29,13 +29,13 @@
#ifndef UR_CLIENT_LIBRARY_REVERSE_INTERFACE_H_INCLUDED
#define UR_CLIENT_LIBRARY_REVERSE_INTERFACE_H_INCLUDED

+#include "ur_client_library/endian.h"
#include "ur_client_library/comm/tcp_server.h"
#include "ur_client_library/comm/control_mode.h"
#include "ur_client_library/types.h"
#include "ur_client_library/log.h"
#include "ur_client_library/ur/robot_receive_timeout.h"
#include <cstring>
-#include <endian.h>
#include <condition_variable>

namespace urcl
diff --git a/include/ur_client_library/endian.h b/include/ur_client_library/endian.h
new file mode 100644
index 0000000..9c5500b
--- /dev/null
+++ b/include/ur_client_library/endian.h
@@ -0,0 +1,103 @@
+//
+// endian.h
+//
+// https://gist.github.com/panzi/6856583
+//
+// I, Mathias Panzenböck, place this file hereby into the public domain. Use
+// it at your own risk for whatever you like. In case there are
+// jurisdictions that don't support putting things in the public domain you
+// can also consider it to be "dual licensed" under the BSD, MIT and Apache
+// licenses, if you want to. This code is trivial anyway. Consider it an
+// example on how to get the endian conversion functions on different
+// platforms.
+
+#ifndef PORTABLE_ENDIAN_H__
+#define PORTABLE_ENDIAN_H__
+
+// Byte order
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__CYGWIN__)
+# include <endian.h>
+#elif defined(__APPLE__)
+# include <libkern/OSByteOrder.h>
+
+# 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)
+
+# define __BYTE_ORDER BYTE_ORDER
+# define __BIG_ENDIAN BIG_ENDIAN
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# define __PDP_ENDIAN PDP_ENDIAN
+#elif defined(__OpenBSD__)
+# include <sys/endian.h>
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+# include <sys/endian.h>
+
+# define be16toh(x) betoh16(x)
+# define le16toh(x) letoh16(x)
+
+# define be32toh(x) betoh32(x)
+# define le32toh(x) letoh32(x)
+
+# define be64toh(x) betoh64(x)
+# define le64toh(x) letoh64(x)
+#elif defined(_WIN32)
+# include <stdlib.h>
+# if BYTE_ORDER == LITTLE_ENDIAN
+# if defined(_MSC_VER)
+# define htobe16(x) _byteswap_ushort(x)
+# define htole16(x) (x)
+# define be16toh(x) _byteswap_ushort(x)
+# define le16toh(x) (x)
+
+# define htobe32(x) _byteswap_ulong(x)
+# define htole32(x) (x)
+# define be32toh(x) _byteswap_ulong(x)
+# define le32toh(x) (x)
+
+# define htobe64(x) _byteswap_uint64(x)
+# define htole64(x) (x)
+# define be64toh(x) _byteswap_uint64(x)
+# define le64toh(x) (x)
+# elif defined(__GNUC__) || defined(__clang__)
+# define htobe16(x) __builtin_bswap16(x)
+# define htole16(x) (x)
+# define be16toh(x) __builtin_bswap16(x)
+# define le16toh(x) (x)
+
+# define htobe32(x) __builtin_bswap32(x)
+# define htole32(x) (x)
+# define be32toh(x) __builtin_bswap32(x)
+# define le32toh(x) (x)
+
+# define htobe64(x) __builtin_bswap64(x)
+# define htole64(x) (x)
+# define be64toh(x) __builtin_bswap64(x)
+# define le64toh(x) (x)
+# else
+# error Compiler is not supported
+# endif
+# else
+# error Byte order is not supported
+# endif
+
+# define __BYTE_ORDER BYTE_ORDER
+# define __BIG_ENDIAN BIG_ENDIAN
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# define __PDP_ENDIAN PDP_ENDIAN
+#else
+# error Platform is not supported
+#endif
+
+#endif // PORTABLE_ENDIAN_H__
diff --git a/include/ur_client_library/primary/package_header.h b/include/ur_client_library/primary/package_header.h
index cd64bda..b5c2754 100644
--- a/include/ur_client_library/primary/package_header.h
+++ b/include/ur_client_library/primary/package_header.h
@@ -32,7 +32,7 @@

#include <inttypes.h>
#include <cstddef>
-#include <endian.h>
+#include "ur_client_library/endian.h"
#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..066e004 100644
--- a/include/ur_client_library/rtde/package_header.h
+++ b/include/ur_client_library/rtde/package_header.h
@@ -31,7 +31,7 @@
#define UR_CLIENT_LIBRARY_RTDE__HEADER_H_INCLUDED

#include <cstddef>
-#include <endian.h>
+#include "ur_client_library/endian.h"
#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 778e5f1..55f60c8 100644
--- a/src/comm/tcp_socket.cpp
+++ b/src/comm/tcp_socket.cpp
@@ -20,7 +20,6 @@
* limitations under the License.
*/

-#include <endian.h>
#include <chrono>
#include <cstring>
#include <sstream>
@@ -31,6 +30,7 @@
# include <netinet/tcp.h>
#endif

+#include "ur_client_library/endian.h"
#include "ur_client_library/log.h"
#include "ur_client_library/comm/tcp_socket.h"

Loading
Loading