Skip to content
The Chat Archive
MiniMaxminimax-m1· MiniMaxHugging Face LMArena Human Preference 140K

Are commercial, hobby drones any decent nowadays? Is it possible to actually program…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with o4-mini-2025-04-16’s answer.
  1. User

    Are commercial, hobby drones any decent nowadays?

    Is it possible to actually program something for them?

  2. MiniMax Assistant

    Are Commercial/Hobby Drones Any Decent Nowadays?

    Modern commercial and hobby drones have advanced significantly, offering impressive capabilities:

    • Flight Performance:
      • Flight times range from 20–45+ minutes (e.g., DJI Mavic 3 Pro: 43 mins).
      • Enhanced stability via GPS, IMUs, and advanced gimbals (3-axis stabilization).
      • Obstacle avoidance (e.g., DJI’s omnidirectional sensors, Autel’s 360° LiDAR).
    • Camera & Sensors:
      • 4K/8K video, 20MP+ stills, and specialized sensors (thermal, LiDAR, multispectral).
      • Examples: DJI Inspire 3 (8K cinema), Autel EVO Max 4N (night vision + LiDAR).
    • Smart Features:
      • Automated missions (waypoints, follow-me, orbit), AI tracking, and return-to-home.
      • Enterprise drones (e.g., DJI Matrice 350 RTK) support precision mapping and inspections.
    • Affordability:
      • Entry-level models (e.g., DJI Mini 4 Pro, $759) offer pro features at lower costs.
      • DIY kits (e.g., Holy Stone HS170) are budget-friendly for hobbyists.

    Is Programming Possible for Drones?

    Yes! Modern drones are highly programmable:

    1. SDKs & APIs:
      • DJI SDK: Develop apps for iOS/Android to control camera, flight, and data.
      • Autel SDK: Similar to DJI, supports custom app integration.
      • Parrot SDK: For ANAFI series, enabling automated flights.
    2. Open-Source Platforms:
      • PX4/ArduPilot: Open-source autopilots for custom builds (e.g., Raspberry Pi + Pixhawk).
      • Dronecode: A collaborative framework for developers.
    3. Languages & Tools:
      • Python: Popular for scripting (e.g., Tello SDK uses Python).
      • ROS (Robot OS): For advanced robotics integration.
      • C++/Java: Used in enterprise/industrial applications.
    4. Use Cases:
      • Hobbyist: Program autonomous flights, FPV racing, or light shows.
      • Professional: Agricultural monitoring, delivery systems, or AI-powered inspections.
      • Education: Platforms like Tello EDU or Cozmo teach coding basics.

    Conclusion

    Today’s drones are excellent for both casual and professional use, with robust programmability. Whether you want a ready-to-fly camera drone or a customizable platform for coding, the ecosystem is mature and accessible. Start with SDKs for app-based control or dive into open-source frameworks for full autonomy!

    Let me know if you'd like a deeper dive into specific tools or projects! 🚀

  3. User

    Tell me more about the DJI SDK and suggest a few sample projects.

  4. MiniMax Assistant

    DJI SDK Overview

    The DJI SDK (Software Development Kit) is a powerful toolset for developers to create custom applications that control DJI drones, access sensor data, and integrate advanced features like autonomous flight, computer vision, and payload management. DJI offers multiple SDKs tailored to different platforms and use cases:


    Key DJI SDKs

    1. Mobile SDK

      • Platforms: Android, iOS.
      • Purpose: Build mobile apps to control drones, access cameras, and retrieve telemetry data.
      • Features:
        • Flight control (takeoff, landing, waypoints).
        • Camera operations (start/stop recording, adjust settings).
        • Live video streaming.
        • Battery/IMU/altitude data.
      • Languages: Java (Android), Swift/Objective-C (iOS).
    2. Onboard SDK

      • Platforms: Linux-based systems (e.g., DJI Manifold 2-G computer).
      • Purpose: Direct low-level control of drones via onboard computers.
      • Features:
        • High-frequency data transmission.
        • Custom payload integration (e.g., sensors, robotic arms).
      • Languages: C/C++.
    3. Payload SDK

      • Purpose: Integrate third-party payloads (e.g., cameras, LiDAR) with DJI drones.
      • Features:
        • Control gimbals, trigger sensors, and sync data.
      • Supported Drones: Matrice 300 RTK, Matrice 350 RTK.
    4. Windows SDK

      • Platforms: Windows.
      • Purpose: Develop desktop applications for drone management.

    Sample Projects with DJI SDK

    Here are practical project ideas to explore DJI’s capabilities:

    1. Basic Flight Controller App

    • Goal: Create a mobile app to manually fly a drone via touchscreen/joystick.
    • Key Features:
      • Takeoff/land buttons.
      • Real-time telemetry display (altitude, speed, battery).
      • Emergency stop.
    • Tools: DJI Mobile SDK (Android/iOS).
    • Sample Code: Check DJI’s GitHub repositories for starter templates.

    2. Autonomous Waypoint Mission

    • Goal: Program a drone to follow predefined GPS coordinates.
    • Key Features:
      • Upload a CSV file of waypoints.
      • Adjust speed/altitude during flight.
      • Return-to-home on completion.
    • Tools: DJI Mobile SDK + DJI Assistant 2 for simulation.

    3. Object Tracking & Video Analysis

    • Goal: Use the drone’s camera to track a moving object (e.g., a car or person).
    • Key Features:
      • Integrate OpenCV for object detection.
      • Adjust gimbal and drone position to keep the target in frame.
    • Tools:
      • DJI Mobile SDK + Python (via FFmpeg for video streaming).
      • TensorFlow Lite or PyTorch for on-device ML.

    4. Live Video Streaming & Broadcast

    • Goal: Stream drone footage to a live platform (e.g., YouTube, a custom dashboard).
    • Key Features:
      • Low-latency video transmission.
      • Overlay telemetry data (altitude, speed) on the video.
    • Tools: DJI Mobile SDK + RTMP (Real-Time Messaging Protocol).

    5. Agricultural Monitoring

    • Goal: Map a field and analyze crop health using multispectral data.
    • Key Features:
      • Use a drone like the Matrice 300 RTK with a multispectral camera.
      • Generate NDVI (Normalized Difference Vegetation Index) maps.
    • Tools:
      • DJI Payload SDK + GIS tools (e.g., DroneDeploy, Pix4D).

    6. Drone Light Show

    • Goal: Coordinate multiple drones to perform synchronized LED light patterns.
    • Key Features:
      • Program flight paths and timing.
      • Control RGB LED payloads (e.g., SkyElements).
    • Tools: DJI Onboard SDK + Python scripting.

    Getting Started with DJI SDK

    1. Download the SDK:
    2. Simulate First:
      • Use the DJI Flight Simulator to test code without physical hardware.
    3. Study Sample Code:

    Why DJI SDK?

    • Mature Ecosystem: Supports most DJI drones (e.g., Mavic, Matrice, Agras).
    • Enterprise-Grade: Used in agriculture, search/rescue, and cinematography.
    • Community Support: Large developer community and extensive documentation.

    Let me know if you’d like help brainstorming a specific project! 🛠️

  5. User

    Show me the sample project you find most exciting (for a single DJI drone, say the Mavic Air 2) and how you would implement it for iOS.

  6. MiniMax Assistant

    Sample Project: Real-Time Object Tracking & Following with DJI Mavic Air 2 (iOS)

    This project creates an iOS app that uses the DJI SDK to program a Mavic Air 2 to autonomously track and follow a moving object (e.g., a person, car, or animal) using the drone’s camera feed and GPS. It’s exciting because it combines computer vision, autonomous flight, and real-time control.


    What You’ll Build

    A drone that:

    1. Streams live video to your iOS app.
    2. Uses on-device object detection (e.g., a person or car) to locate a target.
    3. Adjusts its position to keep the target centered in the frame.
    4. Follows the target at a fixed distance/altitude.

    Tools Needed

    • Hardware:
      • DJI Mavic Air 2 (or similar DJI drone with camera).
      • iOS device (iPhone/iPad) running iOS 13+.
    • Software:
      • Xcode (latest version).
      • DJI iOS SDK (v4.16+).
      • Apple’s Vision framework (for object detection).
      • Optional: Core ML model (e.g., YOLOv3 or custom model for object detection).

    Step 1: Set Up the iOS Project

    1. Create a new Xcode project (Swift language).
    2. Install the DJI SDK:
      • Use CocoaPods: Add pod 'DJI-SDK-iOS' to your Podfile.
      • Run pod install.
    3. Register your app on the DJI Developer Portal to get a App Key (required to activate the SDK).
    4. Enable permissions in Info.plist:
      <key>NSAppTransportSecurity</key>
      <dict>
          <key>NSAllowsArbitraryLoads</key>
          <true/>
      </dict>
      <key>NSMicrophoneUsageDescription</key>
      <string>For voice control</string>
      <key>NSCameraUsageDescription</key>
      <string>For object detection</string>
      

    Step 2: Initialize DJI SDK and Connect to Drone

    Use Swift code to initialize the SDK and connect to the Mavic Air 2:

    import DJISDK
    
    class ViewController: UIViewController, DJISDKManagerDelegate {
        override func viewDidLoad() {
            super.viewDidLoad()
            DJISDKManager.registerApp(with: self)
        }
    
        func appRegisteredWithError(_ error: Error?) {
            if error == nil {
                print("DJI SDK registered!")
                connectToDrone()
            }
        }
    
        func connectToDrone() {
            let product = DJISDKManager.product()
            if let aircraft = product as? DJIAircraft {
                print("Connected to \(aircraft.model!)")
                setupLiveStream()
            }
        }
    }
    

    Step 3: Stream Live Video Feed

    Access the drone’s camera feed using the DJICamera class:

    var camera: DJICamera?
    
    func setupLiveStream() {
        guard let aircraft = DJISDKManager.product() as? DJIAircraft else { return }
        camera = aircraft.camera
        camera?.setCameraMode(.takePhoto, with: nil)
        camera?.liveViewDisplayMode = .normalVideoPreview
        camera?.addCameraListener(self)
    }
    
    func camera(_ camera: DJICamera, didReceiveVideoData videoData: Data, length: Int) {
        // Process video frame-by-frame here
    }
    

    Step 4: Implement Object Detection

    Use Apple’s Vision framework to detect objects in the video stream. For simplicity, we’ll track a person:

    import Vision
    
    func detectObject(in frame: CVPixelBuffer) {
        let request = VNRecognizePersonsRequest { (request, error) in
            guard let observations = request.results as? [VNRecognizedPerson] else { return }
            for observation in observations {
                // Get bounding box of detected person
                if let boundingBox = observation.boundingBox {
                    self.trackObject(boundingBox)
                }
            }
        }
        let handler = VNImageRequestHandler(cvPixelBuffer: frame, options: [:])
        try? handler.perform([request])
    }
    

    Step 5: Control Drone Movement

    Adjust the drone’s position to center the tracked object. Use the DJIFlightController to move the drone:

    var flightController: DJIFlightController?
    
    func trackObject(_ boundingBox: CGRect) {
        // Convert bounding box position to drone movement commands
        let frameWidth = UIScreen.main.bounds.width
        let frameHeight = UIScreen.main.bounds.height
        let objectCenterX = boundingBox.midX
        let objectCenterY = boundingBox.midY
    
        // Calculate offset from center of screen
        let screenCenterX = frameWidth / 2
        let screenCenterY = frameHeight / 2
        let deltaX = objectCenterX - screenCenterX
        let deltaY = objectCenterY - screenCenterY
    
        // Adjust drone yaw (rotation) and pitch (forward/backward)
        let yaw = deltaX * 0.01 // Adjust sensitivity
        let pitch = deltaY * 0.01
    
        flightController?.setYaw(yaw, pitch: pitch, roll: 0, verticalThrust: 0, with: .start)
    }
    

    Step 6: Test in DJI Simulator

    Before flying a physical drone:

    1. Use the DJI Assistant 2 software to simulate the drone.
    2. Test object tracking in a safe virtual environment.

    Enhancements

    • 3D Tracking: Use the drone’s GPS and altitude data to maintain a fixed distance.
    • Advanced Models: Replace Vision framework with a custom Core ML model (e.g., YOLOv5) for better accuracy.
    • Avoid Obstacles: Integrate the drone’s obstacle avoidance sensors (Mavic Air 2 has forward/backward sensors).

    Why This Project is Exciting

    • Autonomy: The drone acts intelligently without manual input.
    • Real-Time Processing: Combines video streaming, computer vision, and flight control.
    • Scalable: Expand to agricultural monitoring, search-and-rescue, or cinematography.

    Final Notes

    • DJI’s iOS SDK is well-documented: Check the DJI iOS SDK Guide.
    • For a real-world app, add error handling, UI controls, and safety features (e.g., geofencing).

    Let me know if you’d like code snippets for specific steps! 📱✈️

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.