This package implements a behavior tree-based control system for coordinating a Universal Robots (UR) arm, a Robotiq gripper, and a Mobile Industrial Robot (MiR) platform. It uses the py_trees
library to create a flexible and modular control structure for complex robotic tasks.
This package provides a ROS-integrated behavior tree implementation for coordinating complex tasks involving a UR robot arm, a Robotiq gripper, and a MiR mobile platform. The behavior tree structure allows for flexible and modular task definition, making it easy to modify and extend the robot's behavior.
Key features:
- Coordinated control of UR robot, Robotiq gripper, and MiR platform
- Modular behavior tree structure for easy task modification
- ROS integration for seamless communication with robot hardware
- Delayed status checking for robust operation
- ROS (tested on ROS Noetic)
- Python 3
py_trees
library- Universal Robots ROS driver
- MiR platform ROS driver
- Robotiq gripper ROS driver
-
Clone this repository into your catkin workspace's
src/your_package_name
directory:cd ~/catkin_ws/src git clone https://github.com/SMAminNabipour/ROS-Behavior-Tree-for-UR-Robot-and-MiR-Platform-Integration.git
-
Add the launch file and scripts files to your package, launch and script folders.
your_package_name/
├── launch/
│ └── robot_bt.launch
├── scripts/
│ ├── behavior_tree_node.py
│ ├── ur_robot_node.py
│ ├── robotiq_gripper_node.py
│ ├── mir_platform_node.py
│ └── BT_main.py
├── CMakeLists.txt
└── package.xml
- behavior_tree_node.py: Implements the main behavior tree structure and logic.
- ur_robot_node.py: Interfaces with the UR robot arm.
- robotiq_gripper_node.py: Controls the Robotiq gripper.
- mir_platform_node.py: Manages the MiR mobile platform movement.
- BT_main.py: Initializes and starts the behavior tree execution.
The behavior tree is structured as follows:
- Initial Parallel Movement
- UR Robot Sequence (Move to positions 1-4)
- MiR Platform Sequence (Move to positions 1-4)
- Intermediate Sequence
- UR Robot: Move to position 5
- Open Gripper
- UR Robot: Move to position 6
- MiR Platform: Move away
- MiR Return Sequence (Move back to positions 1-4)
- Final UR Sequence
- Move to position 5
- Close Gripper
- Move to position 6
- Final MiR Movement (Move away)
To run the behavior tree:
roslaunch your_package_name robot_coordination.launch
- UR Robot IP: Set in the launch file (
robot_coordination.launch
) - Robotiq Gripper IP and Port: Set in the launch file
- MiR Platform: Ensure the correct ROS topics are set in
mir_platform_node.py
- Robot positions: Defined in
behavior_tree_node.py
- Ensure all ROS topics and services are correctly set up and match your robot configuration.
- Check ROS logs for any error messages or warnings.
Contributions to improve the behavior tree or add new functionalities are welcome. Please fork the repository and submit a pull request with your changes.