Repository: intrinsic-dev/intrinsic_sdk_ros
Pull request #23: Re-add the intrinsic/platform/pubsub part of the SDK API
Author: login: wjwwood
Created: 2025-04-15T20:16:36Z | Merged: 2025-04-22T14:40:29Z

This builds on https://github.com/intrinsic-dev/intrinsic_sdk_ros/pull/22


Diff:
diff --git a/intrinsic_sdk_cmake/CMakeLists.txt b/intrinsic_sdk_cmake/CMakeLists.txt
index 6c0e5bc7..88aea58a 100644
--- a/intrinsic_sdk_cmake/CMakeLists.txt
+++ b/intrinsic_sdk_cmake/CMakeLists.txt
@@ -26,6 +26,11 @@ include(cmake/sdk_protos.cmake)
 # Build flatbuffers.
 include(cmake/sdk_flatbuffers.cmake)
 
+# Find and install the imw_zenoh shared-library and config file.
+# Note that the cmake variables used in compiler definitions in sdk.cmake, like
+# intrinsic_sdk_IMW_ZENOH_LIBRARY_RELPATH and others, are set in this file.
+include(cmake/sdk_imw_zenoh.cmake)
+
 # Build the sdk C++ sources into a library.
 include(cmake/sdk.cmake)
 
diff --git a/intrinsic_sdk_cmake/cmake/dependencies.cmake b/intrinsic_sdk_cmake/cmake/dependencies.cmake
index 0d17abe7..4c8fc8c8 100644
--- a/intrinsic_sdk_cmake/cmake/dependencies.cmake
+++ b/intrinsic_sdk_cmake/cmake/dependencies.cmake
@@ -9,6 +9,7 @@ find_package(grpc_vendor REQUIRED)  # Provides protobuf and abseilcpp
 find_package(intrinsic_pybind11_vendor REQUIRED)
 find_package(pybind11_abseil_vendor REQUIRED)
 find_package(ortools_vendor REQUIRED)
+find_package(opencensus_cpp_vendor REQUIRED)
 
 # Find project dependencies.
 find_package(Eigen3 REQUIRED)
@@ -20,3 +21,4 @@ find_package(pybind11 CONFIG REQUIRED)
 find_package(Python COMPONENTS Development)
 find_package(pybind11_abseil CONFIG REQUIRED)
 find_package(ortools CONFIG REQUIRED)
+find_package(OpenCensus REQUIRED)
diff --git a/intrinsic_sdk_cmake/cmake/fetch_sdk.cmake b/intrinsic_sdk_cmake/cmake/fetch_sdk.cmake
index ad7c9c23..4c20e890 100644
--- a/intrinsic_sdk_cmake/cmake/fetch_sdk.cmake
+++ b/intrinsic_sdk_cmake/cmake/fetch_sdk.cmake
@@ -7,6 +7,8 @@ FetchContent_Declare(
   URL https://github.com/intrinsic-ai/sdk/archive/refs/tags/v1.17.20250331.tar.gz
   URL_HASH SHA256=0de09dec1340474c861b6b288e4bc142300ac277031b31aa09e1cebc32ea9f5b
   DOWNLOAD_EXTRACT_TIMESTAMP FALSE
+  PATCH_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sdk_patches/apply_patch.sh
+    ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sdk_patches/001_zenoh_helpers_cc_no_runfiles.patch
 )
 FetchContent_GetProperties(intrinsic_sdk)
 if(NOT intrinsic_sdk_POPULATED)
diff --git a/intrinsic_sdk_cmake/cmake/sdk.cmake b/intrinsic_sdk_cmake/cmake/sdk.cmake
index 27c5b4ba..4ab58e4d 100644
--- a/intrinsic_sdk_cmake/cmake/sdk.cmake
+++ b/intrinsic_sdk_cmake/cmake/sdk.cmake
@@ -55,7 +55,7 @@ list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/utils/metrics_logger.c
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/remote_trigger")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_lockstep")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_manager")
-list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/")
+list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/python/")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/tools")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/util/proto/source_code_info_view_py.cc")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/util/path_resolver/")
@@ -82,6 +82,7 @@ target_link_libraries(${PROJECT_NAME}
     flatbuffers::flatbuffers
     gRPC::grpc++
     ortools::ortools
+    opencensus-cpp::stats
     protobuf::libprotobuf
     pybind11::pybind11
     pybind11_abseil::absl_casters
@@ -96,6 +97,13 @@ target_link_libraries(${PROJECT_NAME}
 target_link_options(${PROJECT_NAME} INTERFACE "-Wl,--copy-dt-needed-entries")
 add_dependencies(${PROJECT_NAME} intrinsic_sdk_fbs strong_int_h_target)
 set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
+# TODO(wjwwood): this is a bit fragile because it only works in the install case
+#   we could use something like ament_index to make it relocatable
+target_compile_definitions(${PROJECT_NAME}
+  PRIVATE
+    -DINTRINSIC_SDK_CMAKE_LIB_PATH="${CMAKE_INSTALL_PREFIX}/lib"
+    -DINTRINSIC_SDK_CMAKE_SHARE_PATH="${CMAKE_INSTALL_PREFIX}/share"
+)
 
 # Install the library.
 install(
diff --git a/intrinsic_sdk_cmake/cmake/sdk_imw_zenoh.cmake b/intrinsic_sdk_cmake/cmake/sdk_imw_zenoh.cmake
new file mode 100644
index 00000000..0c24266d
--- /dev/null
+++ b/intrinsic_sdk_cmake/cmake/sdk_imw_zenoh.cmake
@@ -0,0 +1,29 @@
+# Through a complex process, the "imw" library is compiled elsewhere and
+# committed to the SDK as a binary, but only amd64.
+if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
+  set(intrinsic_sdk_IMW_ZENOH_LIBRARY_DIRNAME
+    "intrinsic/insrc/middleware")
+  set(intrinsic_sdk_IMW_ZENOH_LIBRARY_RELPATH
+    "${intrinsic_sdk_IMW_ZENOH_LIBRARY_DIRNAME}/libimw_zenoh.so.1")
+  set(intrinsic_sdk_IMW_ZENOH_LIBRARY_PATH
+    "${intrinsic_sdk_SOURCE_DIR}/${intrinsic_sdk_IMW_ZENOH_LIBRARY_RELPATH}")
+else()
+  message(FATAL_ERROR "Only x86_64 machines are supported, found: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
+endif()
+
+set(intrinsic_sdk_IMW_ZENOH_CONFIG_DIRNAME
+  "intrinsic/platform/pubsub/zenoh_util")
+set(intrinsic_sdk_IMW_ZENOH_CONFIG_RELPATH
+  "${intrinsic_sdk_IMW_ZENOH_CONFIG_DIRNAME}/peer_config.json")
+set(intrinsic_sdk_IMW_ZENOH_CONFIG_PATH
+  "${intrinsic_sdk_SOURCE_DIR}/${intrinsic_sdk_IMW_ZENOH_CONFIG_RELPATH}")
+
+# Install the files for use during runtime.
+install(
+  FILES "${intrinsic_sdk_IMW_ZENOH_LIBRARY_PATH}"
+  DESTINATION "lib/${intrinsic_sdk_IMW_ZENOH_LIBRARY_DIRNAME}"
+)
+install(
+  FILES "${intrinsic_sdk_IMW_ZENOH_CONFIG_PATH}"
+  DESTINATION "share/${intrinsic_sdk_IMW_ZENOH_CONFIG_DIRNAME}"
+)
diff --git a/intrinsic_sdk_cmake/cmake/sdk_patches/001_zenoh_helpers_cc_no_runfiles.patch b/intrinsic_sdk_cmake/cmake/sdk_patches/001_zenoh_helpers_cc_no_runfiles.patch
new file mode 100644
index 00000000..2106fd30
--- /dev/null
+++ b/intrinsic_sdk_cmake/cmake/sdk_patches/001_zenoh_helpers_cc_no_runfiles.patch
@@ -0,0 +1,77 @@
+--- a/intrinsic/platform/pubsub/zenoh_util/zenoh_helpers.cc	2025-04-16 01:42:13.992272008 +0000
++++ b/intrinsic/platform/pubsub/zenoh_util/zenoh_helpers.cc	2025-04-16 02:05:54.732351721 +0000
+@@ -2,7 +2,9 @@
+ 
+ #include "intrinsic/platform/pubsub/zenoh_util/zenoh_helpers.h"
+ 
++#include <array>
+ #include <cstdlib>
++#include <filesystem>
+ #include <string>
+ #include <vector>
+ 
+@@ -10,13 +12,10 @@
+ #include "absl/strings/match.h"
+ #include "absl/strings/str_split.h"
+ #include "absl/strings/string_view.h"
+-#include "ortools/base/path.h"
+-#include "rules_cc/cc/runfiles/runfiles.h"
++// #include "ortools/base/path.h"
+ 
+ namespace intrinsic {
+ 
+-using ::rules_cc::cc::runfiles::Runfiles;
+-
+ bool RunningUnderTest() {
+   return (getenv("TEST_TMPDIR") != nullptr) ||
+          (getenv("PORTSERVER_ADDRESS") != nullptr);
+@@ -26,26 +25,32 @@
+   return getenv("KUBERNETES_SERVICE_HOST") != nullptr;
+ }
+ 
++#ifndef INTRINSIC_SDK_CMAKE_LIB_PATH
++#error "Compiler definition INTRINSIC_SDK_CMAKE_LIB_PATH is required."
++#endif
++
++#ifndef INTRINSIC_SDK_CMAKE_SHARE_PATH
++#error "Compiler definition INTRINSIC_SDK_CMAKE_SHARE_PATH is required."
++#endif
++
+ std::string GetZenohRunfilesPath(absl::string_view file_path) {
+-  std::string error;
+-  std::string path = std::string(file_path);
+-  std::unique_ptr<Runfiles> runfiles;
+-  std::string repository = BAZEL_CURRENT_REPOSITORY;
+-  if (repository == "") {
+-    // If empty, running in current repository.
+-    repository = "_main";
++  // Patched by intrinsic-dev/intrinsic_sdk_ros.git to work in a CMake context.
++  // TODO(wjwwood): consider using ament_index to make this code relocatable.
++  std::array<std::filesystem::path, 2> prefix_paths = {
++    std::filesystem::path(INTRINSIC_SDK_CMAKE_LIB_PATH),
++    std::filesystem::path(INTRINSIC_SDK_CMAKE_SHARE_PATH)
++  };
++
++  // Prefer a more complete path in the lib or share path over just the give file_path.
++  for (const auto & prefix_path : prefix_paths) {
++    std::filesystem::path possible_path = prefix_path / file_path;
++    if (std::filesystem::exists(possible_path)) {
++      return possible_path.string();
++    }
+   }
+ 
+-  if (RunningUnderTest()) {
+-    std::string error;
+-    runfiles = std::unique_ptr<Runfiles>(Runfiles::CreateForTest(&error));
+-    path = runfiles->Rlocation(file::JoinPath(repository, file_path));
+-  } else if (!RunningInKubernetes()) {
+-    runfiles = std::unique_ptr<Runfiles>(
+-        Runfiles::Create(program_invocation_name, &error));
+-    path = runfiles->Rlocation(file::JoinPath(repository, file_path));
+-  }
+-  return path;
++  // Return the original file_path if nothing better was found.
++  return std::string(file_path);
+ }
+ 
+ absl::Status ValidZenohKeyexpr(absl::string_view keyexpr) {
diff --git a/intrinsic_sdk_cmake/cmake/sdk_patches/apply_patch.sh b/intrinsic_sdk_cmake/cmake/sdk_patches/apply_patch.sh
new file mode 100755
index 00000000..8950be5b
--- /dev/null
+++ b/intrinsic_sdk_cmake/cmake/sdk_patches/apply_patch.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "Applying patch file $(basename $1)"
+patch_out="$(patch -b -p1 < $1)"
+result=$?
+
+if [ $result -ne 0 ]; then
+	echo "${patch_out}" | grep "Reversed (or previously applied) patch detected!" -q
+	if [ $? -eq 0 ]; then
+		result=0
+	else
+		echo "${patch_out}"
+	fi
+fi
+
+return $result
diff --git a/intrinsic_sdk_cmake/cmake/sdk_patches/zenoh_helpers.cc b/intrinsic_sdk_cmake/cmake/sdk_patches/zenoh_helpers.cc
new file mode 100644
index 00000000..b766ef05
--- /dev/null
+++ b/intrinsic_sdk_cmake/cmake/sdk_patches/zenoh_helpers.cc
@@ -0,0 +1,97 @@
+// Copyright 2023 Intrinsic Innovation LLC
+
+#include "intrinsic/platform/pubsub/zenoh_util/zenoh_helpers.h"
+
+#include <array>
+#include <cstdlib>
+#include <filesystem>
+#include <string>
+#include <vector>
+
+#include "absl/status/status.h"
+#include "absl/strings/match.h"
+#include "absl/strings/str_split.h"
+#include "absl/strings/string_view.h"
+// #include "ortools/base/path.h"
+
+namespace intrinsic {
+
+bool RunningUnderTest() {
+  return (getenv("TEST_TMPDIR") != nullptr) ||
+         (getenv("PORTSERVER_ADDRESS") != nullptr);
+}
+
+bool RunningInKubernetes() {
+  return getenv("KUBERNETES_SERVICE_HOST") != nullptr;
+}
+
+#ifndef INTRINSIC_SDK_CMAKE_LIB_PATH
+#error "Compiler definition INTRINSIC_SDK_CMAKE_LIB_PATH is required."
+#endif
+
+#ifndef INTRINSIC_SDK_CMAKE_SHARE_PATH
+#error "Compiler definition INTRINSIC_SDK_CMAKE_SHARE_PATH is required."
+#endif
+
+std::string GetZenohRunfilesPath(absl::string_view file_path) {
+  // Patched by intrinsic-dev/intrinsic_sdk_ros.git to work in a CMake context.
+  // TODO(wjwwood): consider using ament_index to make this code relocatable.
+  std::array<std::filesystem::path, 2> prefix_paths = {
+    std::filesystem::path(INTRINSIC_SDK_CMAKE_LIB_PATH),
+    std::filesystem::path(INTRINSIC_SDK_CMAKE_SHARE_PATH)
+  };
+
+  // Prefer a more complete path in the lib or share path over just the give file_path.
+  for (const auto & prefix_path : prefix_paths) {
+    std::filesystem::path possible_path = prefix_path / file_path;
+    if (std::filesystem::exists(possible_path)) {
+      return possible_path.string();
+    }
+  }
+
+  // Return the original file_path if nothing better was found.
+  return std::string(file_path);
+}
+
+absl::Status ValidZenohKeyexpr(absl::string_view keyexpr) {
+  if (keyexpr.empty()) {
+    return absl::InvalidArgumentError("Keyexpr must not be empty");
+  }
+  if (absl::StartsWith(keyexpr, "/")) {
+    return absl::InvalidArgumentError("Keyexpr must not start with /");
+  }
+  if (absl::EndsWith(keyexpr, "/")) {
+    return absl::InvalidArgumentError("Keyexpr must not end with /");
+  }
+  std::vector<std::string> parts = absl::StrSplit(keyexpr, '/');
+  for (absl::string_view part : parts) {
+    if (part.empty()) {
+      return absl::InvalidArgumentError("Keyexpr must not contain empty parts");
+    }
+    if (part == "*" || part == "$*" || part == "**") {
+      continue;
+    }
+  }
+  return absl::OkStatus();
+}
+
+absl::Status ValidZenohKey(absl::string_view key) {
+  if (key.empty()) {
+    return absl::InvalidArgumentError("Keyexpr must not be empty");
+  }
+  if (absl::StartsWith(key, "/")) {
+    return absl::InvalidArgumentError("Keyexpr must not start with /");
+  }
+  if (absl::EndsWith(key, "/")) {
+    return absl::InvalidArgumentError("Keyexpr must not end with /");
+  }
+  std::vector<std::string> parts = absl::StrSplit(key, '/');
+  for (absl::string_view part : parts) {
+    if (part.empty()) {
+      return absl::InvalidArgumentError("Keyexpr must not contain empty parts");
+    }
+  }
+  return absl::OkStatus();
+}
+
+}  // namespace intrinsic
diff --git a/intrinsic_sdk_cmake/package.xml b/intrinsic_sdk_cmake/package.xml
index 501127c9..a7364274 100644
--- a/intrinsic_sdk_cmake/package.xml
+++ b/intrinsic_sdk_cmake/package.xml
@@ -26,6 +26,7 @@
   <depend>grpc_vendor</depend>
   <depend>intrinsic_pybind11_vendor</depend>
   <depend>pybind11_abseil_vendor</depend>
+  <depend>opencensus_cpp_vendor</depend>
   <depend>ortools_vendor</depend>
 
   <export>
diff --git a/opencensus_cpp_vendor/CMakeLists.txt b/opencensus_cpp_vendor/CMakeLists.txt
new file mode 100644
index 00000000..d122b845
--- /dev/null
+++ b/opencensus_cpp_vendor/CMakeLists.txt
@@ -0,0 +1,25 @@
+cmake_minimum_required(VERSION 3.10)
+project(opencensus_cpp_vendor CXX)
+
+# Default to C++20
+if(NOT CMAKE_CXX_STANDARD)
+  set(CMAKE_CXX_STANDARD 20)
+  set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
+
+find_package(ament_cmake REQUIRED)
+find_package(ament_cmake_vendor_package REQUIRED)
+find_package(abseil_cpp_vendor REQUIRED)
+find_package(prometheus_cpp_vendor REQUIRED)
+
+ament_vendor(opencensus_cpp_vendor
+  VCS_URL https://github.com/census-instrumentation/opencensus-cpp
+  # Last commit on main branch before it was archived
+  VCS_VERSION 50eb5de762e5f87e206c011a4f930adb1a1775b1
+  PATCHES patches
+  CMAKE_ARGS
+    -DCMAKE_CXX_STANDARD=20
+    -DOpenCensus_BUILD_TESTING:BOOL=OFF
+)
+
+ament_package()
\ No newline at end of file
diff --git a/opencensus_cpp_vendor/package.xml b/opencensus_cpp_vendor/package.xml
new file mode 100644
index 00000000..dc300aa3
--- /dev/null
+++ b/opencensus_cpp_vendor/package.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<?xml-model
+  href="http://download.ros.org/schema/package_format2.xsd"
+  schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="2">
+  <name>opencensus_cpp_vendor</name>
+  <version>0.1.0</version>
+  <description>
+    Wrapper around opencensus-cpp.
+  </description>
+
+  <maintainer email="wjwwood@intrinsic.ai">William Woodall</maintainer>
+
+  <license>Apache-2.0</license>  <!-- The contents of this package and the upstream opencensus-cpp library are both Apache-2.0 -->
+
+  <author email="wjwwood@intrinsic.ai">William Woodall</author>
+
+  <buildtool_depend>ament_cmake</buildtool_depend>
+  <buildtool_depend>ament_cmake_vendor_package</buildtool_depend>
+
+  <depend>abseil_cpp_vendor</depend>
+  <depend>prometheus_cpp_vendor</depend>
+
+  <export>
+    <build_type>ament_cmake</build_type>
+  </export>
+</package>
+
diff --git a/opencensus_cpp_vendor/patches/001_include_gnuinstalldirs.patch b/opencensus_cpp_vendor/patches/001_include_gnuinstalldirs.patch
new file mode 100644
index 00000000..04b180ae
--- /dev/null
+++ b/opencensus_cpp_vendor/patches/001_include_gnuinstalldirs.patch
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dd46ada..1232fb5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,6 +34,8 @@ if(NOT CMAKE_CXX_STANDARD)
+   set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ endif()
+ 
++include(GNUInstallDirs)
++
+ include(CTest) # Defines option BUILD_TESTING.
+ enable_testing()
+ 
+
+
diff --git a/prometheus_cpp_vendor/CMakeLists.txt b/prometheus_cpp_vendor/CMakeLists.txt
new file mode 100644
index 00000000..f9f9a120
--- /dev/null
+++ b/prometheus_cpp_vendor/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.10)
+project(prometheus_cpp_vendor CXX)
+
+# Default to C++20
+if(NOT CMAKE_CXX_STANDARD)
+  set(CMAKE_CXX_STANDARD 20)
+  set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
+
+find_package(ament_cmake REQUIRED)
+find_package(ament_cmake_vendor_package REQUIRED)
+
+ament_vendor(prometheus_cpp_vendor
+  VCS_URL https://github.com/jupp0r/prometheus-cpp
+  # Based on:
+  #   https://github.com/census-instrumentation/opencensus-cpp/blob/\
+  #   50eb5de762e5f87e206c011a4f930adb1a1775b1/cmake/OpenCensusDeps.cmake#L28C11-L28C17
+  VCS_VERSION v1.1.0
+  CMAKE_ARGS
+    -DCMAKE_CXX_STANDARD=20
+    # Standard arguments from the readme:
+    #   https://github.com/jupp0r/prometheus-cpp/blob/v1.1.0/README.md#via-cmake
+    -DBUILD_SHARED_LIBS=ON
+    -DENABLE_PUSH=OFF
+    -DENABLE_COMPRESSION=OFF
+)
+
+ament_package()
\ No newline at end of file
diff --git a/prometheus_cpp_vendor/package.xml b/prometheus_cpp_vendor/package.xml
new file mode 100644
index 00000000..537ae9d2
--- /dev/null
+++ b/prometheus_cpp_vendor/package.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<?xml-model
+  href="http://download.ros.org/schema/package_format2.xsd"
+  schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="2">
+  <name>prometheus_cpp_vendor</name>
+  <version>0.1.0</version>
+  <description>
+    Wrapper around jupp0r/prometheum-cpp.
+  </description>
+
+  <maintainer email="wjwwood@intrinsic.ai">William Woodall</maintainer>
+
+  <license>Apache-2.0</license>  <!-- The contents of this package are Apache-2.0 -->
+  <license>MIT</license>  <!-- The contents of prometheus-cpp are MIT -->
+
+  <author email="wjwwood@intrinsic.ai">William Woodall</author>
+
+  <buildtool_depend>ament_cmake</buildtool_depend>
+  <buildtool_depend>ament_cmake_vendor_package</buildtool_depend>
+
+  <build_depend>libcurl-dev</build_depend>
+  <build_export_depend>libcurl-dev</build_export_depend>
+  <exec_depend>libcurl</exec_depend>
+
+  <depend>abseil_cpp_vendor</depend>
+  <depend>zlib</depend>
+
+  <export>
+    <build_type>ament_cmake</build_type>
+  </export>
+</package>
+
diff --git a/re2_vendor/CMakeLists.txt b/re2_vendor/CMakeLists.txt
index 22987916..67cb2f1b 100644
--- a/re2_vendor/CMakeLists.txt
+++ b/re2_vendor/CMakeLists.txt
@@ -14,6 +14,9 @@ find_package(abseil_cpp_vendor REQUIRED)
 ament_vendor(re2_vendor
   VCS_URL https://github.com/google/re2
   VCS_VERSION 2024-07-02
+  # TODO(wjwwood): try to upstream patches, specifically the one about the
+  #   include directory not being part of the library target's public api, see:
+  #     https://github.com/intrinsic-dev/intrinsic_sdk_ros/pull/22#issue-2990048932
   PATCHES patches
   CMAKE_ARGS
     -DCMAKE_CXX_STANDARD=20


Reviews:
user: login: Yadunund
body: Thanks a lot for getting this working!
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T16:41:40Z
user: login: wjwwood
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-16T19:07:44Z
user: login: b-corry
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T20:54:28Z
user: login: mjcarroll
state: APPROVED
author_association: NONE
submitted_at: 2025-04-22T14:40:22Z

Review comments:
diff_hunk: @@ -55,7 +55,8 @@ list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/utils/metrics_logger.c
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/remote_trigger")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_lockstep")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_manager")
-list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/")
+# list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/")
path: intrinsic_sdk_cmake/cmake/sdk.cmake
user: login: Yadunund
body: Remove?
created_at: 2025-04-16T16:38:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -55,7 +55,8 @@ list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/utils/metrics_logger.c
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/remote_trigger")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_lockstep")
 list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/icon/interprocess/shared_memory_manager")
-list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/")
+# list(FILTER intrinsic_SRCS EXCLUDE REGEX "/intrinsic/platform/pubsub/")
path: intrinsic_sdk_cmake/cmake/sdk.cmake
user: login: wjwwood
body: Yeah, I should do that, sorry vestigial.
created_at: 2025-04-16T19:07:43Z
author_association: COLLABORATOR

PR comments:
user: login: wjwwood
created_at: 2025-04-16T02:15:16Z
body: I think this is ready for review too, as I said it builds on #22.

I'm going to call for the day, but start the rebuild of the images before I leave to see how that goes.
author_association: COLLABORATOR
user: login: wjwwood
created_at: 2025-04-16T02:15:40Z
body: @b-corry FYI
author_association: COLLABORATOR
user: login: b-corry
created_at: 2025-04-16T18:53:49Z
body: LGTM 
author_association: CONTRIBUTOR
user: login: wjwwood
created_at: 2025-04-16T20:08:05Z
body: Unfortunately this doesn't build in the containers, but does locally on my devcontainer. I'm tracking down the difference, but this isn't quite ready to be used yet as a result.
author_association: COLLABORATOR
user: login: wjwwood
created_at: 2025-04-16T20:21:29Z
body: Ok, [e76a56c](https://github.com/intrinsic-dev/intrinsic_sdk_ros/pull/23/commits/e76a56c8de82c9fbf225515afaecfc57e3e6ac39) should fix it. Re-running the image builds now. Could use a re-review on that new commit.
author_association: COLLABORATOR
user: login: wjwwood
created_at: 2025-04-22T16:37:04Z
body: I was planning to merge #22 first and re-target this, but merging it works too.
author_association: COLLABORATOR