EN CN
Mavlink Connection PX4
  • I am trying to figure out the gimbal controller connections with mavlink specifically using PX4.

    I have the following settings configured:

    RC Settings
    RC_ROLL pin mode: Serial port (Serial API, etc)
    ROLL/PITCH/YAW: no input

    External IMU
    Model: MavLink FC channel 1
    Connection: UART1
    Serial port: UART1
    System ID/Component Id: 1 154
    Port settings: 115200, none parity
    send heartbeat: yes
    Query RC data: yes

    In GCS
    MNT_MODE_IN: MAVLINK_DO_MOUNT
    MNT_MODE_OUT: MAVLINK
    MAV_1_CONFIG: TELEM2
    MAV_1_MODE: NORMAL
    MAV_1_RATE: 1200 B/s


    Currently I am getting AHRS: no, GPS: no, RC: no, Control: no

  • Hello,

    Do you actually connect PX4 to UART1? Note that it's shared with the USB in our controllers (so you can't have GUI connection parallel with the MavLink).
    MAV_1_RATE: 1200 B/s - is it for serial baud rate? in this case should be 115200
  • Hi,
    Thank you for catching the error I made with MAV_1_RATE.

    I believe that I have the flight controller connected to the UART 1 port. I connected the TELEM2 port of the flight controller to the four pins next to the micro USB.

    It doesn't appear that the gimbal controller is connected to the FC in QGroundControl but I might just not know the commands to use to test it. On the PX4 website (https://docs.px4.io/master/en/advanced/gimbal_control.html) it mentions using the mavlink command "vmount test yaw 30" to see if the gimbal moves. I tried this with no success but I feel like I am still missing settings. Is there a different way of moving the gimbal through mavlink that you know of? Do I need to put the gimbal controller in a specific mode to allow access to the mavlink controls (other than what I have set it to)?

    Do you think UART with mavlink is the best way to control the gimbals, or would it be better/easier to implement the gimbal controller in a different way?

    Thank you, I appreciate your help

  • Hello,

    If you configured all as described in section 19 of the User Manual - control should work, too. BTW, we have updated the MavLink-related section in the manual, maybe it will give you a better understanding of the supported commands and modes.

    Gimbal control over the MavLink works, but it' very limited in functionality. If you need access to more functionality, better to use our Serial API.
  • Good morning,
    I use a BaseCam SimpleBGC 32-bit Extended.
    I am connected to the Tx, Rx and ground of the card to autopilot in modem 2.
    I would like to be able to control the camera with a joystick the yaw and the pitch. At the moment this is not working. The joystick works because I can start the engines. The pitch control and yaw on the joystick are adjusted
    My settings on PX4 autopilot
    MNT_MODE_IN MAVLINK GIMBAL PROTOCOL v2
    MNT_MODE_OUT MAVLINK GIMBAL PROTOCOL v2
    MAV_2_CONFIG TELEM2
    MAV_2_NORMAL MODE
    SER_TEL2_BAUD 115200
    MAV_2_RATE 115200B/S
    MNT_MAV 1
    MNT_COMP_ID 154

    settings on the basecam side
    Is it necessary to regulate some things on external IMU? in mavlink connection?
    Thank you for your help, I can't find my problem. The ground station I use and Qgroundcontrol