3. Setup Interface to PX4#

SkyHub can be connected to the flight controller flashed with the PX4 1.10.x or higher firmware.

  1. Make sure UgCS version 4.3 or higher is used (download links can be found in Preparation section) and VSM for PX4 vehicles is installed.

../../../../_images/ugcs_px4_vsm_install.png

UgCS installation Support for PX4 based vehicles#

  1. Configure UgCS PX4 VSM. Open vsm-px4.conf in a text editor with administrator privileges. The file is located in the UgCS installation folder (default path C:\Program Files (x86)\UgCS\bin). Find, uncomment, and adjust the following settings if needed.

../../../../_images/px4_vsm.png

PX4 VSM configuration file#

  1. Connect the SkyHub to the drone and power on the system.

  2. Launch the UgCS-CPM software on your computer.

  3. Navigate to “Settings”, from the drop-down list select “SkyHub Autopilots” and enable “MAVLINK”.

Note

Only one autopilot may be enabled at a time. In this case, DJI should be disabled.

../../../../_images/mv-autopilot.png

MAVLINK autopilot#

  1. Restart SkyHub.

  2. Make sure that the UgCS PX4 VSM parameter vehicle.px4.custom_payload.onboard.component_id is equal to the Component ID value in the MAVLink settings within the UgCS-CPM.

  3. Make sure that the V2 Extension parameter is enabled.

../../../../_images/mv-settings.png

MAVLINK settings#

  1. If SkyHub is connected to telemetry port 2, open the QGroundControl application, then go to Parameters -> MAVLink and set the parameter MAV_1_CONFIG to TELEM2.

../../../../_images/qgc_telem2.png

SkyHub PX4 TELEM2 port configuration#

  1. Restart the autopilot.

  2. After restart, data forwarding for TELEM2 autopilot telemetry ports should be enabled. Set the parameter MAV_1_FORWARD to 1.

../../../../_images/mav_forward.png

SkyHub PX4 TELEM2 port data forwarding configuration#

  1. Change the baud rate for the TELEM2 Serial Port (recommended 230400). Speed should be the same as configured on the SkyHub side in the MAVLink settings within the UgCS-CPM.

../../../../_images/telem2_baud.png

SkyHub PX4 TELEM2 port baudrate configuration#

Note

SkyHub subscribes to the following MAVLink messages with telemetry rate defined by the Telemetry rate parameter in the MAVLink settings within the UgCS-CPM:

GPS2_RAW; GPS_RAW_INT; GLOBAL_POSITION_INT; ATTITUDE; SYSTEM_TIME; HEARTBEAT; DISTANCE_SENSOR

../../../../_images/mav-telem-rate.png

Mavlink telemetry rate#