EN RU CN
Mavlink to Arducopter- yaw spins slowly and other issues
  • Hi,

    I've built a 3 axis gimbal (rctimer legacy) and fitted a 32 bit Basecam board with 2 IMUs, 2nd fitted under yaw motor as I use a slip ring and don't have enough spare cables left. Also no encoders.

    Gimbal is stable and works in follow mode without mavlink connection. I want to setup Mavlink for extra stability and to setup 2 profiles- 1 is a follow mode with pitch control, 2 is full mavlink control so I or GCS can control yaw and pitch for ROI etc.

    Connected to a pixhack via mavlink using serial 4- AHRS, GPS, control and RC all received OK.

    RC set to control pitch and yaw via API_VIRT_CH x and y

    In Mavlink tab, if I set control mode to : disabled, use normal rc/follow settings the gimbal is stable and allows control of pitch and yaw- great- but no mavlink control so no ROI.

    If I set to default: control all axes- gimbal only responds to yaw control, yaw slowly drifts continuously at approx 1/2 RPM in either direction and never corrects as if commanded to do so. Mavlink can send ROI commands and camera responds but due to drift isn't accurate at all.

    Questions:
    Do I have to have an encoder on the YAW to use mavlink control, is this why I have such massive yaw drift?

    why isn't pitch working in Mavlink control?

    Thanks in advance if anyone knows or has made mavlink work for them in a useful way.

  • Answered my own second question- heres the answer if anyone else has the same problem.
    In mission planner I have pitch set to 0 to -90 limits, horizontal to facing straight down. I swapped those values in the profile I want to use for full mavlink control of axes.

    It seems at least in my case that arducopter's control of gimbal pitch when ardupilot is in mavlink targeting mode was reversed compared to rc targeting.

    Question remains- why does yaw drift slowly only in mavlink targeting mode? Do I need an encoder and or 2nd imu moved above yaw motor and am I wasting my time trying to make it work? Can I just make ardupilot think I have a 2 axis gimbal and use follow yaw while having pitch change for ROI if that's the case?
  • Hello,
    Can you tell me how to connect Flight Control to gimbal through Mavlink Protocol?
    Control is no.