Coder Social home page Coder Social logo

beetree's Introduction

Beetree

A lightweight implementation of Behavior Trees in Python that interfaces with the ROS framework. It is based loosly on the C++ implementation by Alejandro Marzinotto Cos at KTH. His original code can be found at here, and a publication here. A great overview of behavior trees (from the ROS perspective) can be found here.

BEETREE IS STILL UNDER DEVELOPMENT! SOME NODES ARE NOT IMPLEMENTED!

Not all of the nodes found in Marzinotto's implementation are finished. This is a work in progress. If you have any questions, please let me know at [email protected].

alt text

Dependencies

Besides ROS (catkin), Beetree depends on the package rqt_dot (https://github.com/jbohren/rqt_dot) for visualization of the behavior trees.

Usage

To run an example that generates dot code for a sample tree, run the command:

rosrun beetree beetree_test.py

This will print out a large chunk of graphviz dot code, as well as a string of text that shows the traversal of a single tick through the tree, based on the structure in the image above:

Executing Root: (root)
Executing Parallel: (para)
Executing Action: (act_detect_object)
  -  Node: act_detect_object returned status: SUCCESS
Executing Sequence: (sec_pick_move_to_bin): current child: cond_found_obj
Executing Condition: (cond_found_obj)
  -  Node: cond_found_obj returned status: SUCCESS
Executing Sequence: (sec_pick_up): current child: act_move_to_obj
Executing Action: (act_move_to_obj)
  -  Node: act_move_to_obj returned status: SUCCESS
Executing Action: (act_grab)
  -  Node: act_grab returned status: SUCCESS
Executing Action: (act_lift)
  -  Node: act_lift returned status: SUCCESS
  -  Node: sec_pick_up returned status: SUCCESS
Executing Action: (act_move)
  -  Node: act_move returned status: SUCCESS
Executing Sequence: (sec_place): current child: act_move_to_bin
Executing Action: (act_move_to_bin)
  -  Node: act_move_to_bin returned status: SUCCESS
Executing Action: (act_release)
  -  Node: act_release returned status: SUCCESS
  -  Node: sec_place returned status: SUCCESS
Executing Action: (act_reset)
  -  Node: act_reset returned status: SUCCESS
  -  Node: sec_pick_move_to_bin returned status: SUCCESS
  -  Node: para returned status: SUCCESS
ROOT: Child returned status: SUCCESS

To run an example that publishes the same tree to rqt_dot (a lightweight graphviz visualizer), run the following command:

roslaunch beetree test_beetree.launch

This will start the example tree and publish dot code to the rqt_dot visualizer. You will need to put the topic name "/beetree/dot" in the DOTCODE TOPIC field in rqt_dot and click the "Subscribe" button to see it.

Currently in the example, unimplemented nodes have been hard coded to return SUCCESS.

beetree's People

Contributors

futureneer avatar

Stargazers

 avatar

Watchers

 avatar

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.