Skip to content

Commit

Permalink
Merge branch 'humble' of github.com:BehaviorTree/BehaviorTree.ROS2 in…
Browse files Browse the repository at this point in the history
…to humble
  • Loading branch information
facontidavide committed Nov 17, 2023
2 parents ebb835c + 08ac611 commit 964ff2f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test
on:
pull_request:
push:
branches:
- humble

jobs:
build_and_test:
runs-on: ubuntu-latest
env:
ROS_DISTRO: ${{ matrix.ros_distro }}
container:
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
strategy:
fail-fast: false
matrix:
ros_distro: [humble]
steps:
- name: Build and run tests
id: action-ros-ci
uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: ${{ matrix.ros_distro }}
- uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ros_ws/log
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# BehaviorTree.ROS2
[![Test](https://github.com/BehaviorTree/BehaviorTree.ROS2/actions/workflows/test.yml/badge.svg)](https://github.com/BehaviorTree/BehaviorTree.ROS2/actions/workflows/test.yml)

This repository contains useful wrappers to use ROS2 and BehaviorTree.CPP together.

Expand All @@ -11,8 +12,8 @@ In particular, it provides a standard way to implement:

Our main goals are:

- to minimize the amount of bolierplate.
- to make asynchonous Actions non-blocking.
- to minimize the amount of boilerplate.
- to make asynchronous Actions non-blocking.

Note that this library is compatible **only** with:

Expand All @@ -27,6 +28,6 @@ wrap your Nodes into plugins that can be loaded at run-time.

A lot of code is either inspired or copied from [Nav2](https://navigation.ros.org/).

To this reason we retain the same license and copyright.
For this reason, we retain the same license and copyright.


1 change: 1 addition & 0 deletions behaviortree_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>libboost-dev</depend>
<depend>rclcpp</depend>
<depend>rclcpp_action</depend>
<depend>behaviortree_cpp</depend>
Expand Down
12 changes: 4 additions & 8 deletions btcpp_ros2_samples/src/subscriber_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ int main(int argc, char **argv)
params.default_port_value = "btcpp_string";
factory.registerNodeType<ReceiveString>("ReceiveString", params);

auto tree = factory.createTreeFromText(xml_text);

while(rclcpp::ok())
{
auto tree = factory.createTreeFromText(xml_text);
for(int i=0; i<10; i++)
{
tree.tickWhileRunning();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
tree.tickWhileRunning();
}

return 0;
}
}

0 comments on commit 964ff2f

Please sign in to comment.