Skip to content

Commit 60ef34d

Browse files
diegoferigo-raiawoll-bdai
authored andcommitted
Add resources to consume exploy from ROS workspaces
### What change is being made - Expose the plain-CMake `exploy` library to ament. - Add new `exploy_vendor` ROS2 package to allow consuming the `exploy` library downstream. ### Why this change is being made Simplify importing `exploy` in downstream ROS2 workspaces. ### Tested Tested the integration with our ROS2 workspace. --------- Co-authored-by: Annika Wollschläger <awollschlaeger@theaiinstitute.com> GitOrigin-RevId: 7e708a5d758a010c941f50744a6d63c7bdcf3cac
1 parent fb7a702 commit 60ef34d

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

control/package.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>exploy</name>
5+
<version>0.1.0</version>
6+
<description>EXport and dePLOY Reinforcement Learning policies.</description>
7+
<maintainer email="dbellicoso@rai-inst.com">Dario Bellicoso</maintainer>
8+
<maintainer email="awollschlaeger@rai-inst.com">Annika Wollschläger</maintainer>
9+
<license>MIT</license>
10+
11+
<buildtool_depend>cmake</buildtool_depend>
12+
13+
<depend>eigen</depend>
14+
<depend>fmt</depend>
15+
<depend>nlohmann-json-dev</depend>
16+
17+
<!-- Not part of rosdistro yet, system-wide installation expected. -->
18+
<!-- <depend>onnxruntime</depend> -->
19+
20+
<export>
21+
<build_type>cmake</build_type>
22+
</export>
23+
</package>

ros/exploy_vendor/CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
2+
cmake_minimum_required(VERSION 3.16)
3+
project(exploy_vendor)
4+
5+
# Load macros for ament packages.
6+
find_package(ament_cmake REQUIRED)
7+
8+
# Find the wrapped package.
9+
find_package(exploy REQUIRED CONFIG)
10+
11+
# Create an interface library that wraps the imported targets.
12+
add_library(${PROJECT_NAME} INTERFACE)
13+
target_link_libraries(${PROJECT_NAME} INTERFACE exploy::exploy)
14+
15+
# Create an alias target for easier usage in downstream packages.
16+
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
17+
18+
# Install and export.
19+
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets)
20+
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
21+
22+
# Export exploy as a dependency for downstream packages.
23+
ament_export_dependencies(exploy)
24+
25+
# Generate package configuration files for downstream packages to find this package.
26+
ament_package()

ros/exploy_vendor/package.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>exploy_vendor</name>
5+
<version>0.0.0</version>
6+
<description>Wrapper package for exploy C++ library</description>
7+
<maintainer email="dbellicoso@rai-inst.com">Dario Bellicoso</maintainer>
8+
<maintainer email="awollschlaeger@rai-inst.com">Annika Wollschläger</maintainer>
9+
<license>MIT</license>
10+
11+
<buildtool_depend>ament_cmake</buildtool_depend>
12+
13+
<depend>eigen</depend>
14+
<depend>exploy</depend>
15+
<depend>fmt</depend>
16+
<depend>nlohmann-json-dev</depend>
17+
18+
<!-- Not part of rosdistro yet, system-wide installation expected. -->
19+
<!-- <depend>onnxruntime</depend> -->
20+
21+
<export>
22+
<build_type>ament_cmake</build_type>
23+
</export>
24+
</package>

0 commit comments

Comments
 (0)