Skip to content

Commit

Permalink
First jazzy release
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <ajtudela@gmail.com>
  • Loading branch information
ajtudela committed Feb 11, 2025
1 parent 9ef4af2 commit 7b50370
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Build

on:
push:
branches: [main, humble]
branches: [main, jazzy, humble]
pull_request:

env:
Expand All @@ -26,7 +26,7 @@ jobs:
rasa_bt
rasa_msgs
rasa_ros
target-ros2-distro: humble
target-ros2-distro: jazzy
colcon-defaults: |
{
"build": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# rasa_ros
![ROS2](https://img.shields.io/badge/ros2-humble-blue?logo=ros&logoColor=white)
![ROS2](https://img.shields.io/badge/ros2-jazzy-blue?logo=ros&logoColor=white)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build](https://github.com/grupo-avispa/rasa_ros/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/grupo-avispa/rasa_ros/actions/workflows/build.yml)

Expand Down
13 changes: 13 additions & 0 deletions rasa_bt/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package rasa_bt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.1.1 (11-02-2025)
------------------
* First jazzy release.
* Move to BehaviorTree 4.6.

0.1.0 (31-01-2025)
------------------
* Added BT nodes for Rasa.
* Contributors: Alberto Tudela
7 changes: 4 additions & 3 deletions rasa_bt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif()
# ###############################################
# # Find ament macros and libraries
find_package(ament_cmake REQUIRED)
find_package(behaviortree_cpp_v3 REQUIRED)
find_package(behaviortree_cpp REQUIRED)
find_package(nav2_behavior_tree REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
Expand All @@ -69,12 +69,13 @@ foreach(bt_plugin ${plugin_libs})
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
)
target_link_libraries(${bt_plugin} PUBLIC
behaviortree_cpp::behaviortree_cpp
rclcpp::rclcpp
rclcpp_action::rclcpp_action
rclcpp_lifecycle::rclcpp_lifecycle
${rasa_msgs_TARGETS}
)
ament_target_dependencies(${bt_plugin} PUBLIC behaviortree_cpp_v3 nav2_behavior_tree) # TODO(ajtudela): Fix this in jazzy
ament_target_dependencies(${bt_plugin} PUBLIC nav2_behavior_tree) # TODO(ajtudela): Fix this in kilted
target_compile_definitions(${bt_plugin} PRIVATE BT_PLUGIN_EXPORT)
endforeach()

Expand Down Expand Up @@ -114,7 +115,7 @@ endif()
ament_export_include_directories(include/${PROJECT_NAME})
ament_export_libraries()
ament_export_dependencies(
behaviortree_cpp_v3
behaviortree_cpp
nav2_behavior_tree
rclcpp
rclcpp_action
Expand Down
30 changes: 28 additions & 2 deletions rasa_bt/include/rasa_bt/action/bt_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,39 @@
#ifndef RASA_BT__ACTION__BT_TYPES_HPP_
#define RASA_BT__ACTION__BT_TYPES_HPP_

#include <behaviortree_cpp_v3/behavior_tree.h>

#include <string>

#include "behaviortree_cpp/behavior_tree.h"
#include "behaviortree_cpp/json_export.h"
#include "rasa_msgs/msg/entity.hpp"
#include "rasa_msgs/msg/intent.hpp"

// Allow bi-directional convertion to JSON
BT_JSON_CONVERTER(rasa_msgs::msg::Entity, entity)
{
add_field("start", &entity.start);
add_field("end", &entity.end);
add_field("value", &entity.value);
add_field("entity", &entity.entity);
add_field("confidence", &entity.confidence);
}

BT_JSON_CONVERTER(rasa_msgs::msg::Intent, intent)
{
add_field("confidence", &intent.confidence);
add_field("name", &intent.name);
}

// Template specialization to converts a string to Goal.
namespace BT
{
template<> inline rasa_msgs::msg::Entity convertFromString(BT::StringView str)
{
if (StartWith(str, "json:")) {
str.remove_prefix(5);
return convertFromJSON<rasa_msgs::msg::Entity>(str);
}

rasa_msgs::msg::Entity output;
if (!str.empty()) {
// We expect values separated by ;
Expand All @@ -47,6 +68,11 @@ template<> inline rasa_msgs::msg::Entity convertFromString(BT::StringView str)

template<> inline rasa_msgs::msg::Intent convertFromString(BT::StringView str)
{
if (StartWith(str, "json:")) {
str.remove_prefix(5);
return convertFromJSON<rasa_msgs::msg::Intent>(str);
}

// We expect real numbers separated by ;
auto parts = splitString(str, ';');
if (parts.size() != 2) {
Expand Down
4 changes: 2 additions & 2 deletions rasa_bt/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rasa_bt</name>
<version>1.0.0</version>
<version>0.1.1</version>
<description>A package containing behavior trees plugins for the rasa_ros stack.</description>
<maintainer email="ajtudela@gmail.com">Alberto Tudela</maintainer>
<license>Apache-2.0</license>
<author email="ajtudela@gmail.com">Alberto Tudela</author>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>behaviortree_cpp_v3</depend>
<depend>behaviortree_cpp</depend>
<depend>nav2_behavior_tree</depend>
<depend>rclcpp</depend>
<depend>rclcpp_action</depend>
Expand Down
2 changes: 1 addition & 1 deletion rasa_bt/src/action/parse_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ BT::NodeStatus ParseAction::on_success()

} // namespace rasa_bt

#include "behaviortree_cpp_v3/bt_factory.h"
#include "behaviortree_cpp/bt_factory.h"
BT_REGISTER_NODES(factory)
{
BT::NodeBuilder builder =
Expand Down
2 changes: 1 addition & 1 deletion rasa_bt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ target_link_libraries(test_register
rclcpp::rclcpp
)
ament_target_dependencies(test_register
behaviortree_cpp_v3
behaviortree_cpp
)
7 changes: 4 additions & 3 deletions rasa_bt/test/action/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
find_package(ament_index_cpp REQUIRED)

# Test for the parse action
ament_add_gtest(test_parse_action
test_parse_action.cpp
)
ament_add_gtest(test_parse_action test_parse_action.cpp)
target_link_libraries(test_parse_action
ament_index_cpp::ament_index_cpp
rasa_parse_action_bt_node
)
ament_target_dependencies(test_parse_action
Expand Down
4 changes: 2 additions & 2 deletions rasa_bt/test/action/test_parse_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <set>
#include <string>

#include <ament_index_cpp/get_package_share_directory.hpp>
#include "behaviortree_cpp_v3/bt_factory.h"
#include "ament_index_cpp/get_package_share_directory.hpp"
#include "behaviortree_cpp/bt_factory.h"

#include "nav2_behavior_tree/utils/test_action_server.hpp"
#include "rasa_bt/action/parse_action.hpp"
Expand Down
4 changes: 2 additions & 2 deletions rasa_bt/test/test_register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// limitations under the License.

#include <gtest/gtest.h>
#include "behaviortree_cpp_v3/bt_factory.h"
#include "behaviortree_cpp_v3/utils/shared_library.h"
#include "behaviortree_cpp/bt_factory.h"
#include "behaviortree_cpp/utils/shared_library.h"
#include "rclcpp/rclcpp.hpp"

TEST(WhisperBT, register_nodes)
Expand Down
4 changes: 4 additions & 0 deletions rasa_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package rasa_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.1.1 (11-02-2025)
------------------
* First jazzy release.

0.1.0 (16-01-2025)
------------------
* Initial release.
Expand Down
2 changes: 1 addition & 1 deletion rasa_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rasa_msgs</name>
<version>0.1.0</version>
<version>0.1.1</version>
<description>ROS 2 message definitions for Rasa Open Source</description>
<maintainer email="ajtudela@gmail.com">Alberto Tudela</maintainer>
<license>Apache-2.0</license>
Expand Down
4 changes: 4 additions & 0 deletions rasa_ros/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package rasa_ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.1.1 (11-02-2025)
------------------
* First jazzy release.

0.1.0 (17-01-2025)
------------------
* Initial release.
Expand Down
6 changes: 2 additions & 4 deletions rasa_ros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This package is a ROS2 wrapper for the natural language understanding (NLU) [Ras

#### Dependencies

- [Robot Operating System (ROS) 2](https://docs.ros.org/en/humble/) (middleware for robotics),
- [Robot Operating System (ROS) 2](https://docs.ros.org/en/jazzy/) (middleware for robotics),


#### Building
Expand All @@ -18,7 +18,7 @@ To build from source, clone the latest version from the main repository into you
cd colcon_workspace/src
git clone https://github.com/grupo-avispa/rasa_ros.git -b main
cd colcon_workspace
rosdep install -i --from-path src --rosdistro humble -y
rosdep install -i --from-path src --rosdistro jazzy -y
colcon build --symlink-install
```

Expand Down Expand Up @@ -60,6 +60,4 @@ This node has an action server that receives a string with a message and returns

Port of the Rasa server.

[Ubuntu]: https://ubuntu.com/
[ROS2]: https://docs.ros.org/en/humble/

0 comments on commit 7b50370

Please sign in to comment.