UAV / mission integration · SDK / protocol

PX4 ROS 2 Interface

PX4

Connect PX4 vehicle data and application logic to ROS 2.

Official documentationDownload development spec

References are main/development documentation. Match PX4 release, px4_msgs, ROS distribution and XRCE agent major version; newer DDS v3 configurations require the documented build option. Zenoh is explicitly experimental.

PX4 / ROS 2 INTEGRATION / DEVELOPER FIELD GUIDE

Choose an interface. Define a verifiable result.

Company or project context, ten technical entry points and a practical analysis of every reference.

2026-10-08 · Integration not tested

Company / project overview

Original summary of official company or project statements; use the source for the full original page.

PX4 / ROS 2 integration · About
ProjectPX4 is an open-source autopilot ecosystem. Its ROS 2 integration exposes selected internal message types for companion applications and offers a C++ interface library.
Developer fitDesigned for robotics teams combining PX4 with ROS 2 perception, estimation and application logic. Middleware compatibility and PX4-specific coordinate conventions are central integration responsibilities.
Complete official About page ↗
About reference — TA analysis
AudienceBuyers, partners and product owners shortlisting an AI provider.
Our assessmentUse positioning and company history for initial fit. Obtain project-specific deployment, support and commercial terms separately.

Official sources reviewed; no live API, inference or benchmark was run. Expected results are proposed internal contracts.

Top 10 technical entry points

Ten documented technical entry points selected by developer task; not ten separate SDKs or an official ranking.

Choose by the work you need to complete
InterfacePurpose and audience
01 · ROS 2 setup and conventionsAPI / SDK / developer guideSet up PX4 communication and compatible subscriptions.ROS 2 companion developers
02 · Multi-vehicle simulationAPI / SDK / developer guideSeparate multiple PX4 simulation instances in ROS 2.Simulation integration teams
03 · PX4 ROS 2 Interface LibraryAPI / SDK / developer guideUse higher-level interfaces for PX4 integration.C++ robotics developers
04 · Message Translation NodeAPI / SDK / developer guideTranslate supported versioned messages between definitions.Mixed-version maintainers
05 · uXRCE-DDS bridgeAPI / SDK / developer guideBridge selected uORB topics into DDS/ROS 2.Middleware integrators
06 · dds_topics.yaml mappingAPI / SDK / developer guideSelect PX4 messages exposed through the bridge.Topic/schema maintainers
07 · Zenoh middlewareAPI / SDK / developer guideIntegrate PX4 through Zenoh-pico and ROS 2 rmw_zenoh.Middleware evaluation teams
08 · Control interface architectureAPI / SDK / developer guideUnderstand ROS 2 mode and control integration.Simulator flight-mode developers
09 · Navigation interfaceAPI / SDK / developer guideIntegrate external navigation estimates.External-estimation developers
10 · VehicleLocalPosition schemaAPI / SDK / developer guideInterpret fused local position and validity flags.Telemetry data consumers

Reference analysis

Capabilities summarize official documentation. Constraints and proposed tests are our engineering assessment.

01

API / SDK / developer guide

ROS 2 setup and conventions

ROS 2 setup and conventions · TA
Target audienceROS 2 companion developers
Documented capabilitySet up PX4 communication and compatible subscriptions.
Input → outputROS workspace, message definitions and QoS → topic samples.
Execution environmentROS 2 node and PX4 middleware.
Our decision constraintPX4 NED/FRD differs from ROS ENU/FLU; subscriber QoS must match.
Our suggested validationValidate frames and QoS before interpreting received vectors.
Official reference · ROS 2 setup and conventions ↗
02

API / SDK / developer guide

Multi-vehicle simulation

Multi-vehicle simulation · TA
Target audienceSimulation integration teams
Documented capabilitySeparate multiple PX4 simulation instances in ROS 2.
Input → outputInstance/namespace configuration → distinct vehicle topics.
Execution environmentPX4 simulation plus ROS 2.
Our decision constraintNamespace and target identity must identify the same instance.
Our suggested validationCheck no cross-instance telemetry or command routing in simulation.
Official reference · Multi-vehicle simulation ↗
03

API / SDK / developer guide

PX4 ROS 2 Interface Library

PX4 ROS 2 Interface Library · TA
Target audienceC++ robotics developers
Documented capabilityUse higher-level interfaces for PX4 integration.
Input → outputApplication configuration/data → library-managed PX4 interaction.
Execution environmentC++ ROS 2 library.
Our decision constraintMatch library, PX4 and message versions.
Our suggested validationReview required capabilities and lifecycle callbacks using simulation first.
Official reference · PX4 ROS 2 Interface Library ↗
04

API / SDK / developer guide

Message Translation Node

Message Translation Node · TA
Target audienceMixed-version maintainers
Documented capabilityTranslate supported versioned messages between definitions.
Input → outputVersioned topic/service input → compatible translated message.
Execution environmentROS 2 translation node.
Our decision constraintVersioning support is not arbitrary schema compatibility.
Our suggested validationVerify a supported translation path and field semantics for each version pair.
Official reference · Message Translation Node ↗
05

API / SDK / developer guide

uXRCE-DDS bridge

uXRCE-DDS bridge · TA
Target audienceMiddleware integrators
Documented capabilityBridge selected uORB topics into DDS/ROS 2.
Input → outputPX4 client plus compatible agent → DDS topics.
Execution environmentFirmware client and companion agent.
Our decision constraintAgent major version, ROS distribution and firmware build options must align.
Our suggested validationUse the documented version matrix; a running agent alone proves no topic data.
Official reference · uXRCE-DDS bridge ↗
06

API / SDK / developer guide

dds_topics.yaml mapping

dds_topics.yaml mapping · TA
Target audienceTopic/schema maintainers
Documented capabilitySelect PX4 messages exposed through the bridge.
Input → outputTopic mapping configuration → generated publications/subscriptions.
Execution environmentFirmware build-time configuration.
Our decision constraintNot every uORB topic is automatically exposed.
Our suggested validationCheck actual build mapping and direction before subscribing.
Official reference · dds_topics.yaml mapping ↗
07

API / SDK / developer guide

Zenoh middleware

Zenoh middleware · TA
Target audienceMiddleware evaluation teams
Documented capabilityIntegrate PX4 through Zenoh-pico and ROS 2 rmw_zenoh.
Input → outputEnabled firmware and router configuration → topic exchange.
Execution environmentPX4 Zenoh build plus ROS 2 environment.
Our decision constraintOfficial guide marks this experimental and subject to change.
Our suggested validationPin versions and validate separately from XRCE-DDS assumptions.
Official reference · Zenoh middleware ↗
08

API / SDK / developer guide

Control interface architecture

Control interface architecture · TA
Target audienceSimulator flight-mode developers
Documented capabilityUnderstand ROS 2 mode and control integration.
Input → outputMode/state/setpoint interfaces → integration lifecycle.
Execution environmentC++ interface library with PX4.
Our decision constraintControl interfaces can actuate vehicles; this listing runs none.
Our suggested validationEvaluate registration, activation and failure transitions in simulation.
Official reference · Control interface architecture ↗
09

API / SDK / developer guide

Navigation interface

Navigation interface · TA
Target audienceExternal-estimation developers
Documented capabilityIntegrate external navigation estimates.
Input → outputPosition/attitude estimate with uncertainty → PX4 navigation input.
Execution environmentROS 2 interface library.
Our decision constraintFrame, timestamp and uncertainty conventions must match.
Our suggested validationValidate metadata in offline fixtures; do not inject estimates here.
Official reference · Navigation interface ↗
10

API / SDK / developer guide

VehicleLocalPosition schema

VehicleLocalPosition schema · TA
Target audienceTelemetry data consumers
Documented capabilityInterpret fused local position and validity flags.
Input → outputVehicleLocalPosition → NED meters, timestamps and validity.
Execution environmentuORB/bridged ROS 2 message.
Our decision constraintTimestamp is system-start microseconds; xy/z validity are separate.
Our suggested validationNever interpret invalid coordinates as a real zero position.
Official reference · VehicleLocalPosition schema ↗

PX4 ROS 2 overview

PX4 ROS 2 overview · Supporting reference analysis
TAArchitecture selection teams
Our validation adviceCompare XRCE-DDS and experimental Zenoh paths; main docs may include features beyond the chosen stable release.
Official reference · PX4 ROS 2 overview ↗

04 / INPUT · EXPECTED OUTPUT · ACCEPTANCE

Expected results before implementation

Offline read-only ROS 2 telemetry contract; no PX4 connection, estimator injection, setpoint publication, mode activation or live flight operation.

Illustrative contract · no API call or model execution · not measured provider output

Valid local-position fixture

Expected behavior — illustrative, not executed
InputInvented VehicleLocalPosition x=1,y=2,z=-3 meters with xy_valid/z_valid true.
Expected resultInternal NED position preserved; optional ENU conversion is [2,1,3] meters.
AcceptanceLabel both frames explicitly; timestamp remains boot-time microseconds.

No bridged sample

Expected behavior — illustrative, not executed
InputTopic is absent from the selected firmware mapping or no samples arrive.
Expected resultInternal status=unavailable with cause pending diagnosis; position=null.
AcceptanceInspect mapping/QoS/agent compatibility before concluding vehicle failure.

Invalid estimator position

Expected behavior — illustrative, not executed
InputFixture has xy_valid=false despite numeric x/y fields.
Expected resultInternal horizontal_position=null, quality=invalid; raw fields optional for diagnostics.
AcceptanceDo not show invalid coordinates as navigation-ready telemetry.

Bridge disconnect

Expected behavior — illustrative, not executed
InputPreviously observed topic stops beyond the configured freshness interval.
Expected resultInternal state=disconnected_or_stale with last sample/time retained.
AcceptanceExpose uncertainty and reconnect diagnosis; do not publish setpoints.

Map the expected result to your application

Map the actual SDK or service response into this proposed internal contract after integration. All IDs and values below are invented examples; no credentials or live requests are included.

Expected output JSON — illustrative, not measured · PX4ROS2-expected-results.json
{
  "schema_version": "1.0.0",
  "example": true,
  "provider": "PX4 / ROS 2 integration",
  "status": "ok",
  "input_id": "sample-001",
  "data": {
    "topic": "/fmu/out/vehicle_local_position",
    "frame": "NED",
    "position_m": {
      "x": 1.0,
      "y": 2.0,
      "z": -3.0
    },
    "xy_valid": true,
    "z_valid": true,
    "timestamp_us_since_boot": 1000000,
    "received_at": null,
    "freshness": "unmeasured",
    "connection_state": "illustrative_observed"
  },
  "error": null,
  "verification": "illustrative-only;not-provider-response"
}
Download specification, example and acceptance plan
Engineering handoff — our proposed contract and gates
Result interpretationSuccessful transport or execution does not establish model accuracy. Preserve valid empty results separately from operational failure.
ReproducibilityRecord model, runtime, configuration and input identifiers; agree quality and latency criteria before representative tests. No measured performance is claimed.
Operation boundaryOffline read-only ROS 2 telemetry contract; no PX4 connection, estimator injection, setpoint publication, mode activation or live flight operation.

Development assessment

Companion-computer data bridge

Development concept · integration not tested

Provider capabilities above are based on official documentation or repositories. The proposed product, inputs, deliverable and acceptance criteria below are our development assessment.

Integration pilot

Validate runtime, schemas or hardware together before estimating a deployable product.

Proposed inputs
A supported simulator or test vehicle, pinned firmware and telemetry channels.
Proposed deliverable
A read-only mission-data view with vehicle, frame, timestamp and connection state.
Acceptance criterion
Compare position, battery and link states with reference logs; show stale data and disconnects explicitly.
Dependencies
Exact vehicle/firmware compatibility, a simulator and a separate reviewed process for physical operations.

Integration condition

References are main/development documentation. Match PX4 release, px4_msgs, ROS distribution and XRCE agent major version; newer DDS v3 configurations require the documented build option. Zenoh is explicitly experimental.

Development sequence

  1. Confirm access to PX4 ROS 2 Interface, license and the exact supported version.
  2. Prepare the sample above and implement one documented operation for “Companion-computer data bridge”.
  3. Normalize the result with source, time and explicit error state; keep the provider response for review.
  4. Run the acceptance criterion before estimating rollout effort or committing a customer deliverable.

How to validate demand

Record product views, documentation clicks, specification downloads and contextual hub clicks. These are event counts, not unique people or completed integrations.

This feasibility assessment uses implementation conditions. No traffic-based rank or delivery-time promise is assigned.

Related products