Skip to content

Commit

Permalink
Using binary releases for bridges
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jan 6, 2025
1 parent ba1af80 commit 4c817a2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion nexus_integration_tests/launch/zenoh_bridge.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def launch_setup(context, *args, **kwargs):

cmd = [
ExecutableInPackage(
executable="zenoh_bridge_ros2dds",
executable="zenoh-bridge-ros2dds",
package="nexus_zenoh_bridge_dds_vendor",
),
"--config",
Expand Down
23 changes: 15 additions & 8 deletions nexus_zenoh_bridge_dds_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,26 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)

ament_vendor(zeno_bridge_dds_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds.git
VCS_VERSION 1.0.3
set(ZENOH_VERSION "1.0.3")
set(BINARY_URL "https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/releases/download/${ZENOH_VERSION}/zenoh-plugin-ros2dds-${ZENOH_VERSION}-x86_64-unknown-linux-gnu-standalone.zip")
set(BINARY_DIR "${CMAKE_BINARY_DIR}/download")
file(DOWNLOAD ${BINARY_URL} ${BINARY_DIR}/zenoh-plugin-ros2dds.zip)

find_program(UNZIP_EXECUTABLE unzip)
if(NOT UNZIP_EXECUTABLE)
message(FATAL_ERROR "unzip command not found. Please install it.")
endif()

execute_process(
COMMAND ${UNZIP_EXECUTABLE} ${BINARY_DIR}/zenoh-plugin-ros2dds.zip
WORKING_DIRECTORY ${BINARY_DIR}
)

# TODO(sloretz) make a nice way to get this path from ament_vendor
set(INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/zeno_bridge_dds_vendor-prefix/install")
install(
DIRECTORY "${INSTALL_DIR}/lib/zenoh_bridge_ros2dds/"
FILES ${BINARY_DIR}/zenoh-bridge-ros2dds
DESTINATION "lib/${PROJECT_NAME}"
USE_SOURCE_PERMISSIONS
PERMISSIONS OWNER_EXECUTE
)

ament_package()
1 change: 0 additions & 1 deletion nexus_zenoh_bridge_dds_vendor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_vendor_package</buildtool_depend>

<build_depend>cargo</build_depend>
<build_depend>clang</build_depend>
Expand Down

0 comments on commit 4c817a2

Please sign in to comment.