Petal App Manager Logo

Contents:

  • Introduction
    • What is Petal App Manager?
      • Overview
      • Key Features
      • Architecture
        • System Architecture Diagram
        • Architecture Components
        • Data Flow
      • Use Cases
      • Why Petal App Manager?
  • Getting Started
    • Dependencies Installation
      • System Requirements
      • Python 3.11 Installation
      • PDM Installation
      • Redis Installation and Configuration
      • Redis Development Tools
      • Controller Dashboard
    • Quick Start Guide
      • Development Installation
        • Using HEAR-CLI (Recommended)
        • Manual Development Setup
      • Production Installation
        • Using HEAR-CLI (Recommended)
        • Custom Version Installation (Field Testing)
        • Manual Production Installation
      • Environment Configuration
      • Running the Application
      • Verifying the Installation
      • Quick Development Workflow
      • Troubleshooting
  • How to Use
    • Making Requests
      • Using the Postman Collection
      • Using the /docs Interface
        • Accessing Swagger UI
        • Interactive API Testing
      • Using ReDoc
      • Example API Calls
      • Quick Testing Workflow
    • The Petal App Manager Service
      • Admin Dashboard Interface
        • Accessing the Admin Dashboard
        • Dashboard Features
        • Using the Admin Dashboard
        • Alternative Access Methods
      • Managing Petals and Proxies via API
        • Checking What’s Running
        • Viewing All Available Components
      • Petal Control via API
        • Enabling Petals
        • Disabling Petals
      • Proxy Control via API
        • Enabling Proxies
        • Disabling Proxies
      • Common Use Cases
      • Restart Management
      • Service Files and Locations
    • Configuration Changes in .env
      • Environment Variables Overview
      • General Configuration
        • PETAL_LOG_LEVEL
        • PETAL_LOG_TO_FILE
        • PETAL_LOG_DIR
      • MAVLink Configuration
        • PETAL_MAVLINK_ENDPOINT
        • PETAL_MAVLINK_BAUD
        • Other MAVLink Settings
      • Cloud Configuration
      • Redis Configuration
        • PETAL_REDIS_HOST and PETAL_REDIS_PORT
        • PETAL_REDIS_UNIX_SOCKET_PATH
        • PETAL_REDIS_HEALTH_MESSAGE_RATE
      • Database Configuration
      • Data Operations URLs
      • MQTT Configuration
      • Proxy Connection Retry Configuration
      • Petal-Specific Configuration
      • Applying Configuration Changes
      • Configuration Examples
  • Development and Contribution Guide
    • Adding a New Petal Guide
      • What is a Petal?
      • Creating a New Petal
        • Using HEAR-CLI (Recommended)
        • Manual Setup
        • Petal Structure
        • Key Components
      • MQTT Command Handlers (@mqtt_action)
        • Basic Usage
        • Handler Signature
        • The cpu_heavy Parameter
        • How It Works Under the Hood
        • Dynamic / Factory Handlers
        • Migration from Legacy Pattern
      • Registering the Petal
        • Adding to proxies.yaml
        • Adding to pyproject.toml (for Production)
      • Installing Your Petal
        • Development Installation (Editable)
        • Production Installation (Git Tag)
      • Testing Your Petal
        • Unit Tests
        • Integration Testing
        • Debugging
      • Best Practices
        • Naming Conventions
        • Proxy Management
        • Error Handling
        • Logging
        • Versioning
        • Documentation
      • Common Pitfalls
        • Petal Name Must Start with petal-*
        • Petal Not Loading
        • Entry Point Errors
      • Next Steps
    • Inter-Petal Communication Guide
      • Goal
      • Overview
        • Benefits
      • Implementation Guide
        • For Sink Petal Developers (Message Receivers)
        • For Source Petal Developers (Message Senders)
      • Best Practices
        • Data Model Design
        • Channel Naming Convention
        • Error Handling
        • Versioning
        • Testing
      • Example: Complete Implementation
        • Sink Petal (petal-leafsdk)
        • Source Petal (petal-qgc-mission-adapter)
      • Acceptance Criteria
      • Reference Implementation
      • Migration Path
        • For Existing Petals
        • Deprecation Strategy
      • Additional Resources
      • Troubleshooting
        • Common Issues
        • Getting Help
    • Contribution Guidelines
      • Dependency Architecture
        • Understanding the Petal Stack Dependencies
      • Version Management by Repository
        • Petal App Manager
        • Individual Petals
      • Non-Petal Packages
        • LeafSDK
        • mavlink/pymavlink (Very Special Case)
      • Version Summary Table
      • Getting Help
    • Using Proxies in Petals
      • Overview
      • Available Proxy Types
      • Accessing Proxies in Your Petal
      • RedisProxy
      • MavlinkExternalProxy
      • CloudDBProxy
      • LocalDBProxy
      • S3BucketProxy
      • MQTTProxy
      • Error Handling and Best Practices
      • Next Steps
    • Advanced Debugging and Logging
      • Overview
      • Available Logging Tools
      • Per-Level Logging Configuration
        • Configuration Methods
        • Output Options
        • Common Configuration Scenarios
        • Legacy Format Support
      • CSV Signal Logging Tool
        • Basic Usage
        • Advanced Configuration
        • Complete Petal Example
        • API Reference
      • Debugging Best Practices
        • Environment-Specific Configuration
        • Performance Considerations
        • Error Handling and Recovery
      • Integration with Admin Dashboard
      • Testing and Validation
      • File Management
      • Troubleshooting
      • Next Steps
    • Petal App Manager Profiling Tools
      • Table of Contents
      • Overview
      • Quick Start
        • 1. Prerequisites
        • 2. Install Dependencies
        • 3. Start PAM
        • 4. Run Profiling and/or Monitoring
        • 5. View Results
        • 6. Command-Line Flags
      • Profiling Scenarios
        • Workflow for Profiling Different Scenarios
        • Example SITL Mission for Profiling
      • Output Formats & Visualizations
        • Speedscope JSON (Interactive) ⭐
        • Monitor Output: CPU and Memory Usage
      • Interpretation Guide
        • What to Look For
        • Reading Flame Graphs
        • Common Patterns to Identify
      • Troubleshooting
        • Environment Issues
        • Profiler Issues
        • Visualization Issues
        • Performance Issues
        • Results Interpretation Issues
      • Quick Reference
        • Command Cheatsheet
        • File Naming Conventions
        • Keyboard Shortcuts (Speedscope)
      • Getting Help
      • Summary
  • Petal Documentation
    • Petal User Journey Coordinator
      • Overview
      • Required Proxies
      • Command Categories
      • ESC Calibration Commands
        • esc_calibration
        • esc_force_run_all
        • esc_force_run_single
        • esc_calibration_single
      • Parameter Configuration Commands
        • geometry
        • gps_module
        • dist_module
        • oflow_module
        • gps_spatial_offset
        • distance_spatial_offset
        • optical_flow_spatial_offset
        • esc_update_calibration_limits
      • Bulk Parameter Operations
        • bulk_set_parameters
        • bulk_get_parameters
      • Real-Time Telemetry Streams
        • subscribe_rc_value_stream
        • unsubscribe_rc_value_stream
        • subscribe_pose_value_stream
        • unsubscribe_pose_value_stream
        • subscribe_ks_status_stream
        • unsubscribe_ks_status_stream
        • subscribe_mfs_a_status_stream / subscribe_mfs_b_status_stream
        • unsubscribeall
      • Trajectory Verification Commands
        • verify_pos_yaw_directions
        • verify_pos_yaw_directions_complete
      • WiFi & OptiTrack Commands
        • connect_to_wifi_and_verify_optitrack
        • set_static_ip_address
      • System Commands
        • reboot_px4
        • format_sd_card
        • get_log_entries
      • Complete Usage Example
      • Error Handling
      • MQTT Topics Reference
        • Commands (Received on command/edge)
        • Published Topics (Sent to command/web)
      • See Also
    • Petal Flight Log
      • Overview
      • Required Proxies
      • Command Categories
      • Flight Record Fetch Commands
        • fetch_flight_records
        • subscribe_fetch_flight_records
        • unsubscribe_fetch_flight_records
        • cancel_fetch_flight_records
        • fetch_existing_flight_records
      • Flight Record Sync Commands
        • start_sync_flight_record
        • subscribe_sync_job_value_stream
        • unsubscribe_sync_job_value_stream
        • cancel_sync_job
      • Flight Record Management Commands
        • delete_flight_record
      • Bulk Delete Flight Records Commands
        • bulk_delete_flight_records
        • subscribe_bulk_delete_flight_records
        • unsubscribe_bulk_delete_flight_records
        • cancel_bulk_delete_flight_records
      • Clear Error Logs Commands
        • detect_error_logs
        • clear_error_logs
      • Clear All ULogs Commands
        • clear_all_ulogs
        • subscribe_clear_all_ulogs
        • unsubscribe_clear_all_ulogs
        • cancel_clear_all_ulogs
      • Job Status Values
      • MQTT Topics Reference
      • Data Models
        • FlightRecordMatch
      • Error Handling
      • MQTT Topics Reference
        • Commands (Received on command/edge)
        • Published Topics (Sent to command/web)
      • See Also
  • Changelog
    • Version 0.2.2 (2026-02-22)
    • Version 0.2.1 (2026-02-12)
    • Version 0.2.0 (2026-02-12)
    • Version 0.1.62 (2026-02-06)
    • Version 0.1.61 (2026-02-03)
    • Version 0.1.60 (2026-01-30)
    • Version 0.1.59 (2026-01-27)
    • Version 0.1.57 (2026-01-18)
    • Version 0.1.56 (2026-01-17)
    • Version 0.1.54 (2026-01-15)
    • Version 0.1.53 (2026-01-15)
    • Version 0.1.52 (2026-01-14)
    • Version 0.1.51 (2026-01-08)
    • Version 0.1.50 (2026-01-05)
    • Version 0.1.49 (2025-01-05)
    • Version 0.1.48 (2025-12-31)
    • Version 0.1.47 (2025-12-31)
    • Version 0.1.46 (2025-12-31)
    • Version 0.1.45 (2025-11-23)
    • Version 0.1.44 (2025-11-07)
    • Version 0.1.43 (2025-11-05) - Hotfix
    • Version 0.1.42 (2025-11-03)
    • Version 0.1.41 (2025-11-02)
    • Version 0.1.39 (2025-10-23)
    • Version 0.1.38 (2025-10-23)
    • Version 0.1.37 (2025-10-22)
    • Version 0.1.31 (2025-09-25)
    • Version 0.1.29 (2025-08-28)
    • Version 0.1.28 (2025-08-17)
    • Version 0.1.23 (2025-07-31)
    • Version 0.1.18 (2025-07-29)
    • Version 0.1.5 (2025-07-03) - First Stable Release
    • Version 0.1.0 (2025-06-22) - Initial Release
  • API Reference
    • Core API
      • Admin UI
        • admin_dashboard()
        • get_logger()
      • Health Endpoints
        • detailed_health_check()
        • get_logger()
        • health_check()
        • organization_health_check()
      • Configuration API
        • AllComponentsResponse
        • ConfigResponse
        • PetalControlRequest
        • PetalInfo
        • ProxyInfo
        • control_petals()
        • control_proxies()
        • get_logger()
        • get_status()
        • list_all_components()
      • Cloud API
        • GetItemRequest
        • ScanTableRequest
        • SetItemRequest
        • UpdateItemRequest
        • delete_item()
        • get_item()
        • get_logger()
        • scan_table()
        • set_item()
        • update_item()
      • Bucket API
        • delete_file_test()
        • download_file_test()
        • get_info()
        • get_logger()
        • list_files_test()
        • upload_file_test()
      • MAVLink FTP API
        • ClearFailLogsRequest
        • clear_fail_logs()
        • get_logger()
        • list_directory()
      • MQTT API
        • MQTTResponse
        • PublishMessageRequest
        • SubscribePatternRequest
        • SubscribeTopicRequest
        • UnsubscribeTopicRequest
        • get_logger()
        • get_mqtt_status()
        • list_subscriptions()
        • publish_message()
        • subscribe_topic()
        • unsubscribe_topic()
      • Proxy Info
        • get_logger()
        • list_proxies()
    • Proxies
      • Base Proxy
        • BaseProxy
      • Redis Proxy
        • RedisProxy
        • RedisProxy
      • External MAVLink Proxy
        • petalappmanager.proxies.external
        • DownloadCancelledException
        • ExternalProxy
        • FTPDeleteError
        • MavLinkExternalProxy
        • MavLinkFTPProxy
        • ULogInfo
        • setup_file_only_logger()
      • Local Database Proxy
        • LocalDBProxy
        • LocalDBProxy
      • Cloud Proxy
        • CloudDBProxy
        • CloudDBProxy
      • Bucket Proxy
        • S3BucketProxy
      • MQTT Proxy
        • MQTTProxy
        • MQTTProxy
        • MessageCallback
    • Plugins System
      • Base Petal
        • Petal
      • Decorators
        • http_action()
        • mqtt_action()
        • websocket_action()
      • Loader
        • initialize_petals()
        • load_petals()
        • startup_petals()
    • Available Petals
      • Production Petals
        • petal-flight-log
        • petal-warehouse
        • petal-leafsdk
        • petal-user-journey-coordinator
      • Development Petals
        • petal-qgc-mission-server
    • Core Modules
  • Known Issues
    • Petal Issues
      • Petal Name Must Start with petal-*
      • Petal Not Getting Loaded
    • Python 3.11 Issues
      • Python 3.11 Not Found
    • PDM Issues
      • PDM Installation Fails
      • PDM Lock File Issues
    • Redis Issues
      • Redis Connection Errors
      • Redis Configuration Issues
    • MAVLink Issues
      • MAVLink Connection Issues
      • MAVLink Submodule Branch Issues (SITL)
    • MQTT Issues
      • MQTT Proxy Fails on Fresh Installation
    • Port Conflicts
      • Port 9000 Already in Use
    • Reporting Issues
Petal App Manager
  • Development and Contribution Guide
  • View page source

Development and Contribution Guide

Learn how to contribute to Petal App Manager and develop custom petals.

  • Adding a New Petal Guide
    • What is a Petal?
    • Creating a New Petal
    • MQTT Command Handlers (@mqtt_action)
    • Registering the Petal
    • Installing Your Petal
    • Testing Your Petal
    • Best Practices
    • Common Pitfalls
    • Next Steps
  • Inter-Petal Communication Guide
    • Goal
    • Overview
    • Implementation Guide
    • Best Practices
    • Example: Complete Implementation
    • Acceptance Criteria
    • Reference Implementation
    • Migration Path
    • Additional Resources
    • Troubleshooting
  • Contribution Guidelines
    • Dependency Architecture
    • Version Management by Repository
    • Non-Petal Packages
    • Version Summary Table
    • Getting Help
  • Using Proxies in Petals
    • Overview
    • Available Proxy Types
    • Accessing Proxies in Your Petal
    • RedisProxy
    • MavlinkExternalProxy
    • CloudDBProxy
    • LocalDBProxy
    • S3BucketProxy
    • MQTTProxy
    • Error Handling and Best Practices
    • Next Steps
  • Advanced Debugging and Logging
    • Overview
    • Available Logging Tools
    • Per-Level Logging Configuration
    • CSV Signal Logging Tool
    • Debugging Best Practices
    • Integration with Admin Dashboard
    • Testing and Validation
    • File Management
    • Troubleshooting
    • Next Steps
  • Petal App Manager Profiling Tools
    • Table of Contents
    • Overview
    • Quick Start
    • Profiling Scenarios
    • Output Formats & Visualizations
    • Interpretation Guide
    • Troubleshooting
    • Quick Reference
    • Getting Help
    • Summary
Previous Next

© Copyright 2025, DroneLeaf.

Built with Sphinx using a theme provided by Read the Docs.