Spaces:
No application file
No application file
A newer version of the Gradio SDK is available:
5.43.1
π Enhanced Editing Workflow Guide
π§ Fixed Issues
β Persistent Editing Problem Solved
- Issue: After updating DAG, editor showed empty
{"tasks": []}
on subsequent edits - Solution: Enhanced state management to preserve task plans across edit cycles
- Result: Task plans now persist through the complete workflow
π Complete Workflow
1οΈβ£ LLM Generation Phase
User Input β LLM Response β DAG Generated β Buttons Appear
Buttons shown: π Edit Task Plan
+ π Validate & Deploy Task Plan
2οΈβ£ Manual Editing Phase (Optional)
Click "π Edit Task Plan" β JSON Editor Opens β Make Changes
Buttons shown: π Update DAG Visualization
3οΈβ£ DAG Update Phase
Click "π Update DAG Visualization" β New DAG Generated β Review Changes
Buttons shown: π Validate & Deploy Task Plan
4οΈβ£ Deployment Phase
Click "π Validate & Deploy Task Plan" β Send to ROS Topics β Confirmation
Status: β
Task Plan Successfully Deployed
5οΈβ£ Re-editing Capability
Click "π Edit Task Plan" Again β Previous Plan Loads β Continue Editing
Feature: Deployed plans can be re-edited and updated
π― Key Features
π Persistent State Management
- β Task plans persist across edit cycles
- β Deployed plans remain available for re-editing
- β Intelligent fallback to templates when needed
- β Proper error handling for malformed data
π Smart Editor Behavior
- With existing plan: Shows current task JSON for editing
- After deployment: Shows deployed plan for potential re-editing
- Empty state: Shows example template with proper structure
- Malformed data: Gracefully falls back to template
π‘οΈ Error Handling
- JSON Syntax Errors: Shows clear error messages and keeps editor open
- Missing Fields: Validates required structure (
tasks
field) - Empty Tasks: Handles empty task arrays gracefully
- State Corruption: Recovers with template when state is invalid
π Example JSON Structure
{
"tasks": [
{
"task": "excavate_soil_from_pile",
"instruction_function": {
"name": "excavate_soil_from_pile",
"robot_ids": ["robot_excavator_01"],
"dependencies": [],
"object_keywords": ["soil_pile"]
}
},
{
"task": "transport_soil_to_pit",
"instruction_function": {
"name": "transport_soil_to_pit",
"robot_ids": ["robot_dump_truck_01"],
"dependencies": ["excavate_soil_from_pile"],
"object_keywords": ["pit"]
}
}
]
}
π Testing Commands
Run the Application
cd /root/share/QA_LLM_Module
python3 main.py
Monitor ROS Topics
./monitor_topics.sh
Test Editing Workflow
python3 test_persistent_editing.py
π Success Indicators
β Working Correctly When:
- First Edit: LLM plan loads in editor
- Update DAG: New visualization appears
- Deploy: Confirmation message shows
- Re-edit: Previous plan content loads (not empty template)
- Multiple Cycles: Can edit β update β deploy repeatedly
π§ Troubleshooting
Problem: Editor shows empty tasks
- Cause: State management issue
- Solution: Fixed with enhanced persistence logic
Problem: DAG not updating
- Cause: JSON syntax error
- Solution: Check error message, fix JSON, try again
Problem: Cannot deploy
- Cause: ROS node not initialized
- Solution: Restart application, check ROS connection
π Benefits
- Enhanced Safety: Multiple review opportunities before deployment
- Flexibility: Manual fine-tuning of LLM-generated plans
- Persistence: No loss of work during editing cycles
- User-Friendly: Clear status messages and error handling
- IEEE Compliant: Professional terminology and workflow