What is PX4 ULog?

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.

How is PX4 ULog used in robotics?

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:

Data type Description Example topics
Sensor data Raw IMU, GPS, barometer, etc. sensor_combined, gps_position
Estimator output State estimates like position, velocity, attitude vehicle_local_position, estimator_status
Control signals Setpoints and actuator commands vehicle_attitude_setpoint, actuator_outputs
System metrics CPU load, memory usage, error codes system_resource, logger_status


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.

How to use PX4 ULog in Foxglove.

  1. Export ULog from PX4.
    1. After a flight, download the .ulg file from your flight controller using QGroundControl or via SD card.
  2. Convert to ROS-compatible format (optional).
    1. If desired, use ulog2rosbag to convert the log into a ROS bag for integration with other tools in your robotics pipeline.
  3. Open in Foxglove.
    1. Drag and drop the .ulg file into the Foxglove interface or upload it via the data panel. Foxglove will parse and display all time-synchronized topics automatically.
  4. Visualize data.
    1. Use built-in panels like Plot, Image, 3D View, and Raw Messages to inspect signal trends, inertial navigation data, control commands, and more.
    2. Leverage the 3D viewer to replay flight trajectories, visualize poses, and detect anomalies spatially.
  5. Inspect and correlate.
    1. Align log data with onboard video, map overlays, or point cloud streams for a holistic view of the robot’s operation.
    2. Correlate estimator errors with sensor drifts or latency issues.

Benefits of using PX4 ULog with Foxglove.

  • Unified visualization: Aggregate telemetry, camera, and sensor data in one view.
  • Time-synchronized insights: Correlate control signals and state estimates for root-cause analysis.
  • Interactive debugging: Use time scrubbers, bookmarks, and metric overlays to pinpoint failures.
  • Collaboration-ready: Share annotated logs across teams or stakeholders for faster decision-making.
  • Flexible integration: Use alongside ROS or standalone, supporting both research and production workflows.

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.

Start building with Foxglove.

Get started