Untwist cables
  • Hello all,
    I build a 2-axis gimbal but it's not continous 360º pan. I have to go from 180 to -180 degrees passing through the center position. I'm using "untwist cables" command to do so, triggering it when gimbal position goes from 180 to -180 and viceversa.
    When I trigger it, the gimbal makes a 360º turn, but after that, I get a "confirmation" tone and the gimbal doesn't keep its new position.
    Have anyone tried this out or know if I'm missing something?
    Control is done via MavLink (controls all axes).

    Thank you!
  • Just post a solution I figured out in case anyone is interested:
    1 - know if the gimbal is rotating clockwise or c-clockwise
    2 - know when it has passed from 180 to -180 and vice-versa
    3 - trigger an event ->
    Now, with MavLink command, if you command 0 degrees at any moment, pan will point forwards and then go to the point the shortest way. So trigger the event at 175º/-175º and so, yaw angle goes to 0º the right way, and from 0º it will go to the point needed in one or another direction. Now in the trigger event,
    4 - Send mavlink command "pan = 0" during some cycles
    5 - Back to normal operation.

    Hope it helps!

    Still, whenever I run a Script moving to an angle, telling system not to restart (CONFIG INIT_SYSTEM_ON_FINISH(0)), it goes back the same way when the script finishes.