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 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 pressureATTITUDE(50 Hz): roll, pitch and yawSCALED_PRESSURE(50 Hz): barometric pressure and temperatureVFR_HUD(50 Hz): airspeed, ground speed, heading and altitudeWIND(2 Hz): wind speed and directionLOCAL_POSITION_NED(15 Hz): position and velocity relative to the EKF originEXTENDED_SYS_STATE(15 Hz): landed stateGPS_GLOBAL_ORIGIN: the EKF originRC_CHANNELS(10 Hz): RC channel valuesHEARTBEAT: autopilot type, flight mode and armed stateTIMESYNC: clock offset between PX4 and the companion computerGPS_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).
What Cyclops sends to PX4
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
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
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
