Coder Social home page Coder Social logo

behaviortree.ros's Introduction

BehaviorTree.ROS

BehaviorTree.CPP is a middleware independent framework to develop Behavior Trees in C++.

The library is not particularly opinionated about the way Actions and Conditions should be created; this gives more freedom to the developer, but can also be confusing for those people which are getting started with it.

Consequently, many people in the ROS community asked for examples and guidelines; this repository try to provide some basic examples.

Currently, two wrappers are provided:

behaviortree.ros's People

Contributors

dortmans avatar facontidavide avatar vor-art avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

behaviortree.ros's Issues

Move server_name/service_name in RegisterRosAction/RegisterRosService

I think that the server_name and service_name bloats the behavior-tree and additionally add "ros logic" into the behavior-tree.
It would be more elegant in my opinion to add the server_name/service_name when registering the node.
I tried to make the change myself, but the nodes are always failing.
Can somebody help me with?

Thanks

Missing documentation on logger

Currently there is no documentation in the logger and I struggle to use it. If I try to do:

auto tree = factory.createTreeFromText(xml_text);
BT::RosoutLogger rosout_logger(tree);

I get the error

error: no matching function for call to ‘BT::RosoutLogger::RosoutLogger(BT::Tree&)’

AsyncActionNodes

Hi,

First of all, thank you for the ROS examples!

I would like to create a reactiveSequence with the action node being a ROS action. I have created a behavior that just includes the ReactiveSequence with its children being a condition node that always returns true and prints a warning statement (to check whether it is being ticked) and an action node that works fine with my robot. The action node returns RUNNING as long as the action is active or pending which is exactly what I want, but the reactiveSequence does not tick the condition node anymore.

So, the following happens:

first_tick:
- condition.tick() -> returns SUCCESS
- action.tick() -> returns RUNNING

following_ticks:
- action.tick() -> returns RUNNING until action server returns result, then return SUCCESS

However, with the reactiveSequence I would expect the following:

first_tick:
- condition.tick() -> returns SUCCESS
- action.tick() -> returns RUNNING

following_ticks:
-  **condition.tick() -> returns SUCCESS**
-  action.tick() -> returns RUNNING until action server returns result, then return SUCCESS

One thing I can think of is that the action node is not an async action, could this be the case? I want the ros action goal to be cancelled as soon as the condition node returns FAILURE.

Recommended approach for ROS topics?

What's the best way to interface with a ROS topic data source? For example, I have an input port where the topic name is specified but I don't believe it's recommended to try and read the port at node object instantiation, where the subscriber would be configured. It also looks like the tick() action would limit the callback ability. Or is the guidance to only interface with ROS nodes via services and actions?

Visualization for ROS implementation of Behavior Tree CPP V3..?

Is there any easy and user friendly visualization of Behavior Tress available that I can implement into my code..??
I am using behaviortree_cpp_v3 and ROS Noetic. I tried using Groot, however I get a lot of ZMQ related issues.
Request any possible help at the earliest.

Interested in ROS2 wrapper code?

Davide, I am currently working on splitting out ROS2 BT-related code from the Navigation2 project into a separate repository. I noticed your BehaviorTree.ROS project and wondered if perhaps we should collaborate on this. I have wrappers for ROS2 services and actions as well as a few additional general purpose nodes. Several sample programs are included as well. If you're interested, please take a look and let me know what you think: https://github.com/mjeronimo/ros2_behavior_tree. I'm looking for a place to host this code as well as it won't be under navigation. Also, I plan to use the repo to facilitate BT-based integration of navigation, grasping, and other capabilities.

Expose action server result when handling failures

I'm using the bt_action_node to call a server that implements a FollowJointTrajectory action. I'd like to be able to handle different error codes that are set by the server when the trajectory is aborted or canceled. In the current implementation, the WrappedResult is not exposed to the onFailure handler. Is there a recommended way to be able to handle error codes, or more generally consume the action result on a failure?

Move server_name/service_name in RegisterRosAction/RegisterRosService

I think that the server_name and service_name bloats the behavior-tree and additionally add "ros logic" into the behavior-tree.
It would be more elegant in my opinion to add the server_name/service_name when registering the node.
I tried to make the change myself, but the nodes are always failing. Can somebody help me with?

Thanks

BT Action / Service Nodes

Hi,

Mhm, some of this looks very familiar :-)

Would you recommend any changes you made in these nodes to use back up in Nav2? Also, would you recommend that we just use this implementation of the Action / Service nodes rather than keeping a separate copy in our repos?

Steve

ROS2 rosout logger

Instead of outputting to the terminal like the StdCoutLogger, it would be nice to output to rosout for ROS2.

But since this package isn't even ROS2, what would be the best way to go about this?
Create a ros2 branch? Or create a new BehaviorTree.ROS2 repo?

(Note, this is a different request than #5).

Issue using move_base_msgs with BehaviorTree.ROS

Hi Davide,
I am working on robust execution framework with the help of BT and implementing it in Tiago robot by Pal. I encountered an issue using the MoveBase Action with this library. As I believe the library uses goal and result msgs of the action, but MoveBase.Action does not have the result msgs. It only has goal and feedback msgs. Due to this, MoveBase Action is not compatible with this library and hence cant be used. Can you please modify the library to handle both the feedback and handle the result, maybe with a new function onFeedback? Further, there could be an option of using one of those two functions in the inherited class made by the BT designer.
Please let me know your comments and suggestions.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.