mageshms / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Quad yaw control #152

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
AC2
QUAD x

I had a look into the quad motor pde. and did not see this error that was fixed 
on the hexa.

I still have this exact issue with my quad X.
No mag installed or selected in setup.
Right yaw results in a jump and slow constant yaw after centering yaw control.
Left yaw intially yaws right then yaws left and poroperly stops but will slowly 
 "unwind" some after centering yaw control.

Arducoper ACM with compass enabled
What steps will reproduce the problem?
*Sometimes wanting to hold one heading, despite yawing around to a new heading 
it goes back to where it was

*will hold one heading, the yaw round 10 degreea, hold there for a while, then 
yaw back to where it was

*on controller yaw, it forgets to 'lock' when rudder is centered, and continues 
to spin round slowly...it can be fought but evenrually you have to land

Expect to hold heading when rudder is centered.  This has been an issue for all 
versions of AC 2.xxx
Comment 1 by ch...@musicmagpie.co.uk, May 17 (45 hours ago) 
If it helps, there is a forum post under: 
http://www.diydrones.com/forum/topics/yaw-control-with-compass?id=705844%3ATopic
%3A365637&page=5#comments

I think I found the problem for hexap.See motor_hexa_.pde

//Back side
    motor_out[CH_2]        = g.rc_3.radio_out - g.rc_2.pwm_out;        // CCW    BACK
    motor_out[CH_3]        = g.rc_3.radio_out + roll_out - pitch_out;    // CW,     BACK LEFT
    motor_out[CH_8]        = g.rc_3.radio_out - roll_out - pitch_out;    // CW    BACK RIGHT

    //Front side
    motor_out[CH_1]        = g.rc_3.radio_out + g.rc_2.pwm_out;        // CW     FRONT
    motor_out[CH_7]     = g.rc_3.radio_out + roll_out + pitch_out;    // CCW     FRONT LEFT
    motor_out[CH_4]     = g.rc_3.radio_out - roll_out + pitch_out;    // CCW     FRONT RIGHT
/*****************************CHANGE THIS LINE******************************
    // Yaw
    motor_out[CH_1]        += g.rc_4.pwm_out;    // CCW
    motor_out[CH_3]        += g.rc_4.pwm_out;    // CCW
    motor_out[CH_8]     += g.rc_4.pwm_out;    // CCW

    motor_out[CH_2]        -= g.rc_4.pwm_out;    // CW
    motor_out[CH_4]        -= g.rc_4.pwm_out;    // CW
    motor_out[CH_7]        -= g.rc_4.pwm_out;      // CW

*******************************LIKE 
THIS*****************************************/

// Yaw
    motor_out[CH_2]        += g.rc_4.pwm_out;    // CCW
    motor_out[CH_7]        += g.rc_4.pwm_out;    // CCW
    motor_out[CH_4]     += g.rc_4.pwm_out;    // CCW

    motor_out[CH_1]        -= g.rc_4.pwm_out;    // CW
    motor_out[CH_3]        -= g.rc_4.pwm_out;    // CW
    motor_out[CH_8]        -= g.rc_4.pwm_out;      // CW

Walla... my yaw works so stable now. Hope devteam can verify this.

Comment 2 by project member jasonsh...@gmail.com, Yesterday (36 hours ago) 
Yes, The Hexa folks changed this at the last minute. I have the fix already in 
the new code which will be ready in a day.
Status: Fixed

Comment 3 by ch...@musicmagpie.co.uk, Yesterday (21 hours ago) 
Was the fix for hexa only?  I am using quad....issues are a problem for me too
Delete comment Comment 4 by brent...@gmail.com, Today (moments ago) 

Original issue reported on code.google.com by brent...@gmail.com on 19 May 2011 at 4:17

GoogleCodeExporter commented 8 years ago
Hi
Quad plus
AC2.0.6 up to r2348
Magnetometer and GPS working

Don't know if this is connected or not but I notice that, while manipulating my 
quad by hand (awaiting replacement parts!) that the roll and pitch axes are as 
expected but they both affect the indicated yaw (yaw axis held as steady as 
possible). Deliberate yaw changes are ok and do not affect the other two axes.

Mal

Original comment by j...@mal.myzen.co.uk on 19 May 2011 at 5:19

GoogleCodeExporter commented 8 years ago
Try without compass enabled.

Original comment by jasonshort on 20 May 2011 at 5:36

GoogleCodeExporter commented 8 years ago

Original comment by jasonshort on 28 May 2011 at 10:22