ROS2 Task Execution Framework with BehaviorTree Integration #308
andrewjong
started this conversation in
Ideas
Replies: 1 comment
-
|
Perhaps we don't want to stick with RViz. Foxglove may be better. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Software Design Document: Task Execution Framework for Mobile Robotics
Version: 1.1
Date: January 2026
Author: Andrew
Project: ROS2 Task Execution Framework with BehaviorTree Integration
Table of Contents
1. Executive Summary
1.1 Purpose
This document describes the software architecture for a modular, extensible task execution framework for mobile robots and embodied AI systems. The framework enables operators to dispatch high-level tasks (exploration, navigation, object search, etc.) through an intuitive GUI, with intelligent routing to specialized executor implementations, safety monitoring via behavior trees, and comprehensive health checking.
1.2 Goals
1.3 Key Features
1.4 Design Philosophy
Standalone Executor Development: Each executor is a complete ROS2 node with its own action server. This allows developers to:
2. System Overview
2.1 System Context
2.2 Design Principles
Separation of Concerns
Interface Standardization
Simple Dependency Injection
Lazy Activation
Graceful Degradation
Standalone Executor Development
3. Architecture
3.1 Component Diagram
3.2 Layer Responsibilities
3.2.1 User Interface Layer
3.2.2 Behavior Layer
3.2.3 Orchestration Layer
3.2.4 Execution Layer
3.3 Technology Stack
4. Component Specifications
4.1 Task Manager Node
Package:
task_framework_coreExecutable:
task_manager_nodeNode Name:
task_manager4.1.1 Responsibilities
4.1.2 Key Classes
4.1.3 Parameters
4.1.4 Published Topics
~/executor_statusExecutorStatusArray4.1.5 Action Servers
~/explore_tasktask_framework_msgs/action/Explore~/navigate_tasktask_framework_msgs/action/Navigate~/patrol_tasktask_framework_msgs/action/Patrol~/object_search_tasktask_framework_msgs/action/ObjectSearch~/3d_coverage_tasktask_framework_msgs/action/Coverage3D4.1.6 Services
~/list_executorsListExecutors~/check_executor_healthCheckExecutorHealth~/force_executor_reloadTrigger4.2 Base Task Executor
Package:
task_framework_coreHeader:
task_framework/base_task_executor.hpp4.2.1 Purpose
Abstract base class for all task executors, combining:
4.2.2 Class Definition
4.2.3 Executor Lifecycle States
4.2.4 Health Checking Implementation
4.3 Executor Implementation Example
Package:
exploration_executorsPlugin:
FrontierExplorerPlugin Description XML (
explorers_plugins.xml):Standalone Usage (for development/testing):
4.4 Behavior Tree Mission Planner
Package:
task_framework_btExecutable:
bt_mission_plannerNode Name:
bt_mission_planner4.4.1 Responsibilities
4.4.2 Custom BT Nodes
Action Nodes (execute tasks):
ExploreActionNode- Calls exploration actionNavigateActionNode- Calls navigation actionPatrolActionNode- Calls patrol actionObjectSearchActionNode- Calls object search actionCoverage3DActionNode- Calls 3D coverage actionCondition Nodes (check state):
WaitForTaskRequest- Monitors for incoming TaskRequest messagesExecutorAvailableCondition- Checks if executor is healthyBatteryLevelCondition- Checks battery chargeGPSQualityCondition- Checks GPS satellite count/accuracyTemperatureCondition- Checks system temperatureUtility Nodes:
SelectExecutorAction- Chooses best executor based on criteriaLogTaskResult- Logs task completion to fileSendTaskResponse- Publishes TaskResponse message4.4.3 BT Node: WaitForTaskRequest
4.4.4 Example Behavior Tree
File:
reactive_exploration_mission.xml4.4.5 Topics
/bt_mission_planner/task_requestsTaskRequest/bt_mission_planner/task_responsesTaskResponse4.4.6 Parameters
4.5 Rviz Panel
Package:
task_framework_rvizPlugin:
ExplorePanel4.5.1 UI Layout
4.5.2 Key Features
Parameter Input
Executor Selection
Task Dispatch
Status Display
4.5.3 Implementation Snippet
4.5.4 Topics
/bt_mission_planner/task_requestsTaskRequest/bt_mission_planner/task_responsesTaskResponse/task_manager/executor_statusExecutorStatusArray5. Interface Definitions
5.1 ROS2 Action Definitions
5.1.1 Explore Action
File:
task_framework_msgs/action/Explore.action5.1.2 Navigate Action
File:
task_framework_msgs/action/Navigate.action5.1.3 ObjectSearch Action
File:
task_framework_msgs/action/ObjectSearch.action5.2 Message Definitions
5.2.1 Dependency
File:
task_framework_msgs/msg/Dependency.msg5.2.2 ExecutorCapabilities
File:
task_framework_msgs/msg/ExecutorCapabilities.msg5.2.3 ExecutorStatus
File:
task_framework_msgs/msg/ExecutorStatus.msg5.2.4 ExecutorStatusArray
File:
task_framework_msgs/msg/ExecutorStatusArray.msg5.2.5 TaskRequest
File:
task_framework_msgs/msg/TaskRequest.msg5.2.6 TaskResponse
File:
task_framework_msgs/msg/TaskResponse.msg5.3 Service Definitions
5.3.1 ListExecutors
File:
task_framework_msgs/srv/ListExecutors.srv5.3.2 CheckExecutorHealth
File:
task_framework_msgs/srv/CheckExecutorHealth.srv6. Data Flow
6.1 Task Dispatch Flow
6.2 Health Monitoring Flow
6.3 Lifecycle State Transitions
7. Implementation Details
7.1 Package Structure
7.2 Build Configuration
7.2.1 task_framework_core CMakeLists.txt
7.2.2 exploration_executors CMakeLists.txt
7.2.3 Standalone Node Executable
7.2.4 plugins.xml
7.3 Launch File
File:
task_framework_bringup/launch/task_framework.launch.py7.4 Configuration Files
File:
config/task_manager.yamlFile:
config/bt_mission_planner.yaml8. Deployment
8.1 System Requirements
Hardware:
Software:
8.2 Installation
8.3 Launch Configurations
8.3.1 Development Mode (Test Executor Standalone)
8.3.2 Full System with GUI
8.3.3 Simulation
8.3.4 Real Robot (Drone)
8.4 Verifying Installation
9. Testing Strategy
9.1 Unit Tests
9.1.1 Dependency Checking
9.1.2 Health Status
9.2 Integration Tests
9.2.1 Standalone Executor Test
9.2.2 Full Task Dispatch Pipeline
9.3 Mock Executors
For testing GUI and BT without real robot:
10. Future Extensions
10.1 Multi-Robot Coordination
10.2 Advanced Task Types
11. Appendices
11.1 Glossary
11.2 Common Executor Patterns
Pattern 1: Map-Based Executor
Pattern 2: Vision-Based Executor
Pattern 3: Pure Planning Executor
11.3 Troubleshooting
<export>in package.xmlros2 topic listto verifyros2 topic echo /task_manager/executor_status~/execute_*action name11.4 Performance Tuning
Reduce Latency:
Reduce Memory:
Increase Reliability:
11.5 Design Decisions Log
11.6 References
Document Revision History
Beta Was this translation helpful? Give feedback.
All reactions