PX4 ULog is a robust, extensible log file format used by the PX4 autopilot system to record flight data from unmanned aerial vehicles (drones). Designed with performance and analysis in mind, ULog captures high-frequency data streams such as sensor readings, estimator states, actuator outputs, and control loop timings in a binary format.
The ULog format is tailored for embedded systems, allowing real-time logging with minimal overhead. It supports features like message buffering, variable-length messages, and multi-topic logging. ULog files typically have a .ulg extension and can be analyzed post-flight to assess vehicle performance, identify anomalies, and optimize algorithms.
At its core, ULog helps PX4 developers and users understand what their robot or drone was doing at any given moment during operation.
In the robotics domain, ULog files are critical for debugging, validation, and performance tuning. They provide detailed insights into the inner workings of a robot’s flight controller and subsystems. Here are some key use cases:
1. Flight analysis and debugging.
PX4 ULog logs raw and processed sensor data, estimator inputs/outputs, control setpoints, and actuator commands. Engineers use this data to troubleshoot issues like unstable flight, GPS loss, or erratic behavior. Comparing logs across multiple flights helps pinpoint systemic issues or hardware failures.
2. System identification and tuning.
ULog’s high-frequency sampling enables system identification for model-based control design and PID tuning. Developers analyze logs to characterize system dynamics and improve control strategies.
3. Autonomy development.
For autonomous navigation and perception stacks, ULog files record the state estimator’s output (e.g., pose, velocity) alongside perception data. This time-synchronized data is essential for developing and validating algorithms in areas like SLAM, obstacle avoidance, and mission planning.
4. Data-driven machine learning.
ULog’s structured format is ideal for feeding large-scale datasets into machine learning models. Robotics engineers export features from logs to train models for tasks like failure prediction, terrain classification, or adaptive control.
5. Post-flight review and compliance.
In regulated environments (e.g., drone delivery or inspection), ULog serves as a flight record for compliance verification and performance reporting.
Here’s an overview of the data types commonly found in a ULog file:
Use PX4 ULog with Foxglove.Foxglove provides a powerful visualization and debugging platform that seamlessly supports PX4 ULog data. By integrating ULog with Foxglove, robotics teams can visualize flight logs, gain deeper insights, and collaborate effectively.
By combining the depth of PX4 ULog logs with the clarity of Foxglove’s visualization tools, robotics teams can rapidly iterate, deploy safer systems, and unlock greater insights from their flight data.