Skip to content

Commit

Permalink
Merge branch 'BehaviorTree:humble' into humble
Browse files Browse the repository at this point in the history
  • Loading branch information
EGAlberts authored Sep 18, 2024
2 parents f293f35 + adec04b commit 449b997
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion behaviortree_ros2/src/tree_execution_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4244)
#include <thread>
#pragma warning(pop)
#else
#include <thread>
#endif

#include "behaviortree_ros2/tree_execution_server.hpp"
#include "behaviortree_ros2/bt_utils.hpp"
Expand Down Expand Up @@ -235,7 +242,8 @@ void TreeExecutionServer::execute(
const auto now = std::chrono::steady_clock::now();
if(now < loop_deadline)
{
p_->tree.sleep(loop_deadline - now);
p_->tree.sleep(std::chrono::duration_cast<std::chrono::system_clock::duration>(
loop_deadline - now));
}
loop_deadline += period;
}
Expand Down
2 changes: 1 addition & 1 deletion behaviortree_ros2/tree_execution_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Furthermore, the user can customize it to:

- Register custom BT Nodes directly (static linking).
- Attach additional loggers. The **Groot2** publisher will be attached by default.
- Use the "global blackboard", a new idiom/pattern explained in [this tutorial](https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t19_global_blackboard.cpp).
- Use the "global blackboard", a new idiom/pattern explained in [this tutorial](https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t16_global_blackboard.cpp).
- Customize the feedback of the `rclcpp_action::Server`.

## Customization points
Expand Down
2 changes: 1 addition & 1 deletion btcpp_ros2_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(btcpp_ros2_interfaces
"msgs/NodeStatus.msg"
"msg/NodeStatus.msg"
"action/ExecuteTree.action"
"action/Sleep.action")

Expand Down
File renamed without changes.

0 comments on commit 449b997

Please sign in to comment.