This project implements a robotic decision-making system using Behavior Trees (BT) within the ROS ecosystem. It integrates custom nodes for navigation, chassis control, and sensor input handling, enabling autonomous task execution. Key features include interaction with ROS services/actions, real-time behavior tree execution, blackboard-based data sharing, and support for joystick control. Built with BehaviorTree.CPP and leveraging ROS’s navigation stack, it provides modular, testable, and deployable robotic intelligence with logging, visualization, and fault-tolerant capabilities.
Explore the docs »
Table of Contents
This project implements a robotic decision-making system using Behavior Trees (BT) within the ROS ecosystem. It integrates custom nodes for navigation, chassis control, and sensor input handling, enabling autonomous task execution. Key features include interaction with ROS services/actions, real-time behavior tree execution, blackboard-based data sharing, and support for joystick control. Built with BehaviorTree.CPP and leveraging ROS’s navigation stack, it provides modular, testable, and deployable robotic intelligence with logging, visualization, and fault-tolerant capabilities.
- Behavior Tree Integration: Modular and extensible task execution framework using BehaviorTree.CPP.
- ROS Navigation Interface: Seamless integration with
move_base
for goal-based navigation. - Joystick-Controlled Chassis Movement: Real-time chassis control using joystick input.
- Custom Message/Service/Action Support: Full support for custom-defined
.msg
,.srv
, and.action
files. - Real-Time Execution Logging: Integrated logging system with configurable verbosity levels.
- Visualization Support: Optional integration with Groot for visual debugging of behavior trees.
- Fault Tolerance: Retry, timeout, and preemption mechanisms for robust execution.
Click to expand project structure
rc_decision/
├── .clang-format
├── .clang-tidy
├── .pre-commit-config.yaml
├── CMakeLists.txt
├── package.xml
├── action/
│ └── Fibonacci.action
├── image/
│ ├── 1.png
│ ├── 2.png
│ └── 3.png
├── include/
│ └── rc_decision/
│ ├── bt_action_node.h
│ ├── bt_service_node.h
│ ├── aurora/
│ │ ├── ChassisMove.h
│ │ ├── laser_goal.h
│ │ └── movebase_client.h
│ ├── blackboard/
│ │ ├── RosJoy.h
│ │ └── blackboard.h
│ └── loggers/
│ └── rosout_logger.h
├── launch/
│ ├── RosJoy.launch
│ └── control_loop.launch
├── msg/
│ ├── BehaviorTree.msg
│ ├── NodeParameter.msg
│ ├── NodeStatus.msg
│ ├── StatusChange.msg
│ ├── StatusChangeLog.msg
│ └── TreeNode.msg
├── src/
│ ├── ChassisMove.cpp
│ ├── control_loop.cpp
│ ├── laser_goal.cpp
│ ├── move_base_client.cpp
│ └── loggers/
│ └── rosout_logger.cpp
├── srv/
│ └── AddTwoInts.srv
└── test/
├── launch/
│ ├── test_client.launch
│ └── test_server.launch
└── treeNode/
├── test_bt.cpp
└── test_server.cpp
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple steps.
- Ubuntu 18.04 or later
- ROS Melodic or Noetic installed
- catkin workspace configured
- C++14 compiler
behaviortree_cpp_v3
library installed
-
Clone the repository into your catkin workspace:
cd ~/catkin_ws/src git clone https://github.com/gdut-robocon/rc_decision.git
-
Build the package:
cd ~/catkin_ws catkin_make
-
Source the workspace:
source devel/setup.bash
- Ensure the ROS navigation stack is running and
move_base
is active. - Configure joystick input via
RosJoy.launch
. - Modify scaling parameters in
ChassisMove.cpp
or via ROS parameter server if needed.
To start the main behavior tree execution loop:
roslaunch rc_decision control_loop.launch
To test behavior tree functionality with sample tasks:
rosrun rc_decision test_bt
To start the test server (provides Fibonacci action and AddTwoInts service):
rosrun rc_decision test_server
For joystick-controlled chassis movement:
roslaunch rc_decision RosJoy.launch
- Add support for dynamic reconfiguration of behavior trees
- Integrate with SLAM for real-time mapping and navigation
- Implement more advanced error handling and recovery strategies
- Add support for more sensor types (LiDAR, IMU, etc.)
- Enhance visualization with full Groot integration
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Copyright © 2024-2025 rc_decision.
Released under the MIT license.
Email: jialonglongliu@gmail.com
Project Link: https://github.com/gdut-robocon/rc_decision