Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

MAVLink

Cyclops talks to PX4 over MAVLink 2 through the companion computer's MAVLink router. It needs a link that works both ways: it reads the flight controller's sensors and sends a position back.

Cyclops on a PX4 aircraft: the camera sends video and the flight controller sends sensor data to Cyclops over MAVLink, and Cyclops sends a position back to EKF2.
What Cyclops reads from PX4 and what it sends back.

Cyclops works out where the aircraft is from the camera, the flight controller's IMU and a satellite map stored on the device. It sends that position back to PX4, but only while it trusts it. If it stops trusting it, it stops sending. See Losing Cyclops in flight.

What Cyclops reads from PX4

Cyclops asks PX4 for each stream with SET_MESSAGE_INTERVAL when it connects. You don't need to set any stream rates yourself.

  • HIGHRES_IMU (200 Hz): gyro, accelerometer, magnetometer and barometric pressure

  • ATTITUDE (50 Hz): roll, pitch and yaw

  • SCALED_PRESSURE (50 Hz): barometric pressure and temperature

  • VFR_HUD (50 Hz): airspeed, ground speed, heading and altitude

  • WIND (2 Hz): wind speed and direction

  • LOCAL_POSITION_NED (15 Hz): position and velocity relative to the EKF origin

  • EXTENDED_SYS_STATE (15 Hz): landed state

  • GPS_GLOBAL_ORIGIN: the EKF origin

  • RC_CHANNELS (10 Hz): RC channel values

  • HEARTBEAT: autopilot type, flight mode and armed state

  • TIMESYNC: clock offset between PX4 and the companion computer

  • GPS_RAW_INT (5 Hz): raw GPS fix. Logged only, never used for position.

If the link is busy, Cyclops lowers these rates, but it keeps each above a minimum (for example, 10 Hz for HIGHRES_IMU).

PX4 1.16 fills the pressure fields of HIGHRES_IMU in pascals, although MAVLink says hectopascals. Cyclops corrects this for PX4 1.16. Newer PX4 code reports hectopascals, which is one reason we check each new version before you fly it.

What Cyclops sends to PX4

Message
When
What it is

ODOMETRY

In flight, at the VIO rate (typically 10 to 20 Hz)

The position for EKF2. See below.

SET_GPS_GLOBAL_ORIGIN

On the ground, disarmed, only if PX4 has no origin

Sets where local position zero is

COMMAND_LONG

At startup

SET_MESSAGE_INTERVAL to request the streams above

HEARTBEAT

1 Hz

NAMED_VALUE_INT VPS_ERR

1 Hz, while disarmed

Why Cyclops is in its current state. Sent by a separate service (component 190), so it still arrives if Cyclops crashes. Not sent while armed.

STATUSTEXT

On changes

Short messages for the pilot, for example Cyclops: Health failed, GPS stopped

TIMESYNC, SYSTEM_TIME

Continuously

Clock alignment. PX4 only takes SYSTEM_TIME while its own clock is unset.

That's the complete list. Cyclops doesn't send PARAM_SET, so it never changes your parameters, and it doesn't change flight modes on PX4.

Inside the ODOMETRY message

Field
Value

frame_id, child_frame_id

MAV_FRAME_LOCAL_NED

x, y, z

Position in metres, north-east-down from the EKF origin. PX4 only uses x and y.

vx, vy, vz

Velocity in metres per second, north-east-down

q, body rates

NaN. Cyclops doesn't give PX4 attitude.

pose_covariance

Position noise. Small on the ground so EKF2 locks on quickly, then larger in flight.

velocity_covariance

Velocity noise

reset_counter

Goes up by one each time the map matcher corrects the position, and once each time VIO recovers after a failure

estimator_type

MAV_ESTIMATOR_TYPE_VIO

quality

100 healthy, 25 degraded, 0 not known yet. When VIO has failed, nothing is sent at all.

Two of these fields need explaining.

reset_counter is how Cyclops tells PX4 that a sudden jump in position is a correction, not a glitch. When the counter changes, PX4 moves its position straight to the new value instead of treating it as an outlier. So the counter doesn't change often: the map matcher corrects the position about once every 500 m of flight, and only when the camera actually matched the map.

quality lets PX4 refuse samples Cyclops already knows are bad. That only works if EKF2_EV_QMIN is set to 50. See PX4 Integration.

System ID

Cyclops only accepts messages from the system ID and component ID it is set up for. If the flight controller uses a different system ID, Cyclops ignores its heartbeat and reports VPS_ERR 1 (no autopilot heartbeat), even though the cable and router are fine. Set the system ID in Vozilla under Settings > MAV.

Last updated