diff --git a/modules/universal-robots-client-library/2.4.0/MODULE.bazel b/modules/universal-robots-client-library/2.4.0/MODULE.bazel new file mode 100644 index 00000000000..d61b91d263e --- /dev/null +++ b/modules/universal-robots-client-library/2.4.0/MODULE.bazel @@ -0,0 +1,10 @@ +module( + name = "universal-robots-client-library", + version = "2.4.0", + bazel_compatibility = [">=7.2.1"], + compatibility_level = 1, +) + +# Most recent version from https://registry.bazel.build/modules/googletest +bazel_dep(name = "googletest", version = "1.15.2") +bazel_dep(name = "rules_license", version = "0.0.8") diff --git a/modules/universal-robots-client-library/2.4.0/overlay/BUILD b/modules/universal-robots-client-library/2.4.0/overlay/BUILD new file mode 100644 index 00000000000..629ecda0e33 --- /dev/null +++ b/modules/universal-robots-client-library/2.4.0/overlay/BUILD @@ -0,0 +1,409 @@ +load("@rules_license//rules:license.bzl", "license") + +package( + default_applicable_licenses = [":license", ":license_bsd", ":license_zlib"], + default_visibility = ["//visibility:public"], +) + +exports_files([ + "LICENSE_apache_2_0", + "include/ur_client_library/queue/LICENSE.md", + "include/ur_client_library/queue/atomicops.h", + "examples/resources/rtde_input_recipe.txt", + "examples/resources/rtde_output_recipe.txt", + "resources/external_control.urscript", +]) + +license( + name = "license", + package_name = "universal-robots-client-library", + license_kinds = [ + "@rules_license//licenses/spdx:Apache-2.0", + ], + license_text = "LICENSE_apache_2_0", +) + +license( + name = "license_bsd", + package_name = "universal-robots-client-library", + license_kinds = [ + "@rules_license//licenses/spdx:BSD-2-Clause", + ], + license_text = "include/ur_client_library/queue/LICENSE.md", +) + +license( + name = "license_zlib", + package_name = "universal-robots-client-library", + license_kinds = [ + "@rules_license//licenses/spdx:Zlib", + ], + license_text = "include/ur_client_library/queue/atomicops.h", +) + +filegroup( + name = "rtde_files", + srcs = [ + "examples/resources/rtde_input_recipe.txt", + "examples/resources/rtde_output_recipe.txt", + "resources/external_control.urscript", + ], +) + +DEFAULT_OPTIONS = ["-fexceptions"] + +PEDANTIC_OPTIONS = [ + "-fexceptions", + "-Wall", + "-pedantic", +] + +cc_library( + name = "ur_client_library", + srcs = glob( + [ + "src/**/*.cpp", + ], + ), + hdrs = glob( + [ + "include/**/*.h", + ], + exclude = [], + ), + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + includes = ["include"], +) + +alias( + name = "universal-robots-client-library", + actual = ":ur_client_library", +) + +cc_binary( + name = "full_driver", + srcs = [ + "examples/full_driver.cpp", + ], + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + ], +) + +cc_binary( + name = "primary_pipeline", + srcs = [ + "examples/primary_pipeline.cpp", + ], + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + ], +) + +cc_binary( + name = "primary_pipeline_calibration", + srcs = [ + "examples/primary_pipeline_calibration.cpp", + ], + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + ], +) + +cc_binary( + name = "rtde_client", + srcs = [ + "examples/rtde_client.cpp", + ], + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + ], +) + +cc_binary( + name = "dashboard_example", + srcs = [ + "examples/dashboard_example.cpp", + ], + copts = PEDANTIC_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + ], +) + +cc_test( + name = "test_bin_parser", + srcs = ["tests/test_bin_parser.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_package_serializer", + srcs = ["tests/test_package_serializer.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_primary_parser", + srcs = ["tests/test_primary_parser.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_control_package_pause", + srcs = ["tests/test_rtde_control_package_pause.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_control_package_setup_inputs", + srcs = ["tests/test_rtde_control_package_setup_inputs.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_control_package_setup_outputs", + srcs = ["tests/test_rtde_control_package_setup_outputs.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_control_package_start", + srcs = ["tests/test_rtde_control_package_start.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_data_package", + srcs = ["tests/test_rtde_data_package.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_get_urcontrol_version", + srcs = ["tests/test_rtde_get_urcontrol_version.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_parser", + srcs = ["tests/test_rtde_parser.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_request_protocol_version", + srcs = ["tests/test_rtde_request_protocol_version.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_rtde_writer", + srcs = ["tests/test_rtde_writer.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "notsan", + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_script_sender", + srcs = ["tests/test_script_sender.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_stream", + srcs = ["tests/test_stream.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "notsan", + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_tcp_server", + srcs = ["tests/test_tcp_server.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "notsan", + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_tcp_socket", + srcs = ["tests/test_tcp_socket.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "notsan", + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_trajectory_point_interface", + srcs = ["tests/test_trajectory_point_interface.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + tags = [ + "notsan", + "requires-net:ipv4", + "requires-net:loopback", + ], + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) + +cc_test( + name = "test_version_information", + srcs = ["tests/test_version_information.cpp"], + copts = + DEFAULT_OPTIONS, + features = ["-use_header_modules"], # Incompatible with -fexceptions. + deps = [ + ":ur_client_library", + "@googletest//:gtest", + "@googletest//:gtest_main", + ], +) diff --git a/modules/universal-robots-client-library/2.4.0/overlay/MODULE.bazel b/modules/universal-robots-client-library/2.4.0/overlay/MODULE.bazel new file mode 120000 index 00000000000..9b599e3ad9c --- /dev/null +++ b/modules/universal-robots-client-library/2.4.0/overlay/MODULE.bazel @@ -0,0 +1 @@ +../MODULE.bazel \ No newline at end of file diff --git a/modules/universal-robots-client-library/2.4.0/presubmit.yml b/modules/universal-robots-client-library/2.4.0/presubmit.yml new file mode 100644 index 00000000000..70c8c2c1975 --- /dev/null +++ b/modules/universal-robots-client-library/2.4.0/presubmit.yml @@ -0,0 +1,25 @@ +matrix: + platform: + - debian11 + - ubuntu2404 + bazel: [7.x, 8.x] +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--cxxopt=-std=c++17' + - '--host_cxxopt=-std=c++17' + - "--copt=-pthread" + - "--linkopt=-pthread" + test_flags: + - '--cxxopt=-std=c++17' + - '--host_cxxopt=-std=c++17' + - "--copt=-pthread" + - "--linkopt=-pthread" + build_targets: + - '@universal-robots-client-library//:*' + test_targets: # only 2 test targets are being used since others use sockets + - '@universal-robots-client-library//:test_bin_parser' + - '@universal-robots-client-library//:test_primary_parser' diff --git a/modules/universal-robots-client-library/2.4.0/source.json b/modules/universal-robots-client-library/2.4.0/source.json new file mode 100644 index 00000000000..61293dda4ae --- /dev/null +++ b/modules/universal-robots-client-library/2.4.0/source.json @@ -0,0 +1,9 @@ +{ + "url": "https://github.com/UniversalRobots/Universal_Robots_Client_Library/archive/refs/tags/2.4.0.tar.gz", + "integrity": "sha256-wN9RLN1OnMUkATXfqFd+FghdL/bwxSKYgSrky+Ic6DY=", + "strip_prefix": "Universal_Robots_Client_Library-2.4.0", + "overlay": { + "BUILD": "sha256-t0HYMf+ktKaWkEArXdMQB1LZ1eaUMlBpjfDa9N/dfxM=", + "MODULE.bazel": "sha256-GApeW0ib0f+UqNnIB+VKDejzylGI86ejSwHIaVHP5Bs=" + } +} diff --git a/modules/universal-robots-client-library/metadata.json b/modules/universal-robots-client-library/metadata.json index 4aed6bcf793..65ad6b26c90 100644 --- a/modules/universal-robots-client-library/metadata.json +++ b/modules/universal-robots-client-library/metadata.json @@ -4,8 +4,14 @@ { "email": "bremerb@google.com", "github": "b-bremer", - "name": "Benjamin Bremer", - "github_user_id": 871576 + "github_user_id": 871576, + "name": "Benjamin Bremer" + }, + { + "email": "sotiropoulos@google.com", + "github": "FilipposSot", + "github_user_id": 29069962, + "name": "Filippos Sotiropoulos" } ], "repository": [ @@ -16,7 +22,8 @@ "1.4.0.bcr.1", "1.5.0", "1.5.0.bcr.1", - "2.2.0" + "2.2.0", + "2.4.0" ], "yanked_versions": {} }