Skip to content

Commit

Permalink
Merge branch 'proba' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Jan 31, 2024
2 parents 1390957 + d9030a6 commit 5bde415
Show file tree
Hide file tree
Showing 51 changed files with 4,564 additions and 1,656 deletions.
46 changes: 17 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function(add_onto_library TARGET)
message(FATAL_ERROR "Expected source file list after target name")
endif()
add_library(${TARGET} ${ARGN})
target_include_directories(${TARGET} PUBLIC include)
target_include_directories(${TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
target_enable_sanitizers(${TARGET})
Expand Down Expand Up @@ -121,7 +122,7 @@ catkin_package(
DEPENDS TinyXML OpenCV
)
elseif($ENV{ROS_VERSION} STREQUAL "2")
ament_export_dependencies(rosidl_default_runtime)
ament_export_dependencies(rosidl_default_runtime pluginlib)
rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} rosidl_typesupport_cpp)
endif()

Expand Down Expand Up @@ -169,7 +170,9 @@ target_include_directories(ontologenius_ontoGraphs_lib
)
target_link_libraries(ontologenius_ontoGraphs_lib
PUBLIC
${TinyXML_LIBRARIES} ${TinyXML2_LIBRARIES} PkgConfig::CURL
${TinyXML_LIBRARIES} ${TinyXML2_LIBRARIES}
PRIVATE
PkgConfig::CURL
)

add_onto_library(ontologenius_core_lib
Expand Down Expand Up @@ -256,7 +259,8 @@ function(add_ros_library TARGET)
target_link_libraries(${TARGET} PUBLIC ${catkin_LIBRARIES}) # PRIVATE has been removed fot ontoloGUI
elseif($ENV{ROS_VERSION} STREQUAL "2")
ament_target_dependencies(${TARGET} PUBLIC rclcpp pluginlib builtin_interfaces std_msgs)
target_include_directories(${TARGET} PUBLIC include)
target_include_directories(${TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${TARGET} PUBLIC ${cpp_typesupport_target})
ament_export_libraries(${TARGET})
endif()
Expand Down Expand Up @@ -302,7 +306,8 @@ add_ros_library(ontologenius_lib
src/API/ontologenius/OntologyManipulatorIndex.cpp
src/API/ontologenius/OntologiesManipulator.cpp
)
target_include_directories(ontologenius_lib PUBLIC include/ontologenius/API)
target_include_directories(ontologenius_lib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/ontologenius/API>
$<INSTALL_INTERFACE:include/ontologenius/API>)
target_link_libraries(ontologenius_lib
PUBLIC
ontologenius_compat
Expand Down Expand Up @@ -476,29 +481,16 @@ install(DIRECTORY files/
)

elseif($ENV{ROS_VERSION} STREQUAL "2")
install(TARGETS
ontologenius_reasoner_plugin
DESTINATION lib/${PROJECT_NAME})

install(TARGETS
ontologenius_lib
EXPORT ontologenius_lib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
DESTINATION lib/${PROJECT_NAME})

install(TARGETS
ontologenius_interface
EXPORT ontologenius_interface
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
DESTINATION lib/${PROJECT_NAME})

install(TARGETS
ontologenius_compat
EXPORT ontologenius_compat
ontologenius_operators
ontologenius_core_lib
ontologenius_ontoGraphs_lib
ontologenius_reasoner_plugin
EXPORT ontologenius
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
Expand All @@ -507,22 +499,18 @@ install(TARGETS
install(TARGETS
ontologenius_single
ontologenius_multi
ontologenius_draw
ontoloGUI
DESTINATION lib/${PROJECT_NAME})

install(TARGETS ontologenius_operators
ontologenius_core_lib
ontologenius_ontoGraphs_lib
DESTINATION lib)

install(DIRECTORY launch/ros2/launch DESTINATION share/${PROJECT_NAME}/)
install(DIRECTORY include/ DESTINATION include)

install(DIRECTORY files DESTINATION share/${PROJECT_NAME}/)
install(DIRECTORY docs DESTINATION share/${PROJECT_NAME}/)
install(DIRECTORY configuration DESTINATION share/${PROJECT_NAME}/)

ament_export_libraries(ontologenius_lib ontologenius_interface ontologenius_compat)
ament_export_targets(ontologenius)

endif()

Expand Down
2 changes: 1 addition & 1 deletion docs/Download.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h1 class="title">Download</h1>
<p>You have below the archives of the major versions of Ontologenius:</p>

<h2> V0.4.0 </h2>
<p>X / XX / 2024</p>
<p>31 / 01 / 2024</p>

<ul>
<li>
Expand Down
2 changes: 1 addition & 1 deletion docs/SetUp.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h2>Create your executable</h2>
<div class="code_block">
<div class="terminal_line">add_executable(my_exe src/main.cpp)</div>
<div class="terminal_line">ament_target_dependencies(my_exe rclcpp)</div>
<div class="terminal_line">target_link_libraries(my_exe ${ontologenius_LIBRARIES})</div>
<div class="terminal_line">target_link_libraries(my_exe ontologenius::ontologenius_lib)</div>
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions docs/cpp_API/FeederPublisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ <h2 id="public-functions">Public Functions</h2>
<tr><td class="memItemLeft rightAlign topAlign"> std::string </td><td class="memItemRight bottomAlign"><b><a href="FeederPublisher.html#commit">commit</a></b>(int32_t <i>timeout</i> = -1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="FeederPublisher.html#commit2">commit</a></b>(const std::string&amp; <i>commit_name</i>, int32_t <i>timeout</i> = -1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="FeederPublisher.html#checkout">checkout</a></b>(const std::string&amp; <i>commit_name</i>, int32_t <i>timeout</i> = -1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="FeederPublisher.html#registerFeederNotificationCallback">registerFeederNotificationCallback</a></b>(const std::function&lt;void(const std::string&amp;)&gt;&amp; <i>callback</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="FeederPublisher.html#registerReasonersNotificationCallback">registerReasonersNotificationCallback</a></b>(const std::function&lt;void(const std::string&amp;)&gt;&amp; <i>callback</i>)</td></tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -276,6 +278,14 @@ <h3 class="fn" id="checkout"><a name="checkout"></a><span class="type">bool</spa
<p>Returns false if the function returns on a timeout.</p>
<p>This function can only be used on a copied ontology.</p>

<h3 class="fn" id="registerFeederNotificationCallback"><a name="registerFeederNotificationCallback"></a><span class="type">void</span> FeederPublisher::<span class="name">registerFeederNotificationCallback</span>(const <span class="type">std::function</span>&lt;<span class="type">void</span>(const <span class="type">std::string</span>&amp;)&gt;&amp; <i>callback</i>)</h3>
<p>Register a callback function to get notifications from the feeder.</p>
<p>The parameter <i>callback</i> is the callback function taking a string.</p>

<h3 class="fn" id="registerReasonersNotificationCallback"><a name="registerReasonersNotificationCallback"></a><span class="type">void</span> FeederPublisher::<span class="name">registerReasonersNotificationCallback</span>(const <span class="type">std::function</span>&lt;<span class="type">void</span>(const <span class="type">std::string</span>&amp;)&gt;&amp; <i>callback</i>)</h3>
<p>Register a callback function to get notifications from the reasoners.</p>
<p>The parameter <i>callback</i> is the callback function taking a string.</p>

</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp_Tutorials/Tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1 class="title">Ontologenius C++ Tutorials</h1>

<div>
<p>Ontologenius comes with a series of tutorials to help new users become familiar with the use of
Ontologenius. These different tutorials cover the different features offered by Ontologenius and
Ontologenius both in ROS1 and ROS2. These different tutorials cover the different features offered by Ontologenius and
give some ideas for use through tutorials built around mini-projects. Of course, these tutorials
show simple use cases to allow beginners to better understand Ontologenius particularities. It is
up to you to go further to discover all the possibilities offered by this software.</p>
Expand Down
Loading

0 comments on commit 5bde415

Please sign in to comment.