Skip to content
Snippets Groups Projects

Description

This project is intended to be used as a base class for ROS behavior tree clients.

It provides:

  • Two internal variables to enable a behavior that allows the user to start, and stop the BT execution.
  • A start_tree and stop_tree function to allow the control of that varibles from C++.
  • A set of basic BT nodes. These BT nodes are:
    • NOP: Async Action node that does nothing.
    • is_start_tree: Condition to know if internal start variable is set to true.
    • async_is_start_tree: Async function equal to is_start_tree but returning RUNNING instead of FAILURE.
    • is_not_stop_tree: Condition to know if internal stop variable is set to false.
    • async_is_not_stop_tree: Async function equal to is_not_stop_tree but returning RUNNING instead of FAILURE.
    • set_start_tree: Sync Action to set internal start variable.
    • set_stop_tree: Sync Action to set internal stop variable.
    • reset_start_tree: Sync Action to unset internal start variable.
    • reset_stop_tree: Sync Action to unset internal stop variable.
  • A init function to register these BT nodes.
  • A set of Dynamic reconfigure checkbox to enable/disable all loggers.
  • A set of ros parameters to set the BT file to be executed.

TODO: Add BT example with start/stop/restart structure.

ROS Interface

Service servers

  • ~/set_parameters (dynamic_reconfigure/Reconfigure.srv): Service to dynamically change the parameters of the node. Only the parameters defined in the .cfg file can be modified this way.

topic publishers

Parameters

  • bt_client_rate (double; Default: 10.0; Max: 1000.0; Min: 0.1): The Tick rate.
  • path (String): The BT trees' folder path.
  • tree_xml_file (String): The BT tree xml file's name without extension.
  • bt_client_enable_cout_logger (Bool; Default: false): Enables cout_ ogger.
  • bt_client_enable_minitrace_logger (Bool; Default: false): Enables minitrace logger.
  • bt_client_enable_file_logger (Bool; Default: false): Enables file logger.
  • bt_client_enable_zmq_publisher (Bool; Default: false): Enables ZMQ publisher.
  • START (Bool; Default: false): Intendet to be used to start the tree execution.
  • STOP (Bool; Default: false): Intendet to be used to stop the tree execution.

Dependencies

How to use it

Disclaimer

Copyright (C) Institut de Robòtica i Informàtica Industrial, CSIC-UPC. Mantainer IRI labrobotics (labrobotica@iri.upc.edu)

This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair or correction.

In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/