mageshms / arducopter

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

control in STABILIZE mode #173

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Arducoper NG or ACM?

All ACM firmware now.

I have setup for my tricopter stable.
I can hover it without control for a while.
But when I control the roll and loop stick, then the copter is starting to 
oscillate.
If I release the stick, the copter is going to be stable again.

I looked into the code, and I think that we should add some more code to check 
if the roll or loop channel is not 0 then we use rate control for them.
Then we use output_stabilize_roll(); and output_stabilize_pitch(); to stabilize 
the copter if the stick has been released.
What do you think?

Thanks,
Duy

Original issue reported on code.google.com by duypha...@gmail.com on 29 May 2011 at 4:33

GoogleCodeExporter commented 8 years ago
I don't understand. When you try and hold an angle it oscillates? Did you 
adjust your D  term?

Original comment by jasonshort on 31 May 2011 at 5:16

GoogleCodeExporter commented 8 years ago
It did not oscillate when I was using aile/elev stick. After I released the 
stick, the copter was starting oscillate.

The copter is stable if I do not use aile/elev stick to move.
It oscillated after I used stick to move the copter.
Thanks,
Duy

Ps:

void
output_stabilize_roll()
{
    float error;//, rate;
    //int dampener;

    error       = g.rc_1.servo_out - dcm.roll_sensor;
..}

I think we use control_in in here instead of servo_out, and the same for pitch.
What do you think?

Original comment by duypha...@gmail.com on 1 Jun 2011 at 10:06

GoogleCodeExporter commented 8 years ago
output_stabilize_roll comes after we mix the nav_control, so it's correct.
Try and tune your PIDs a bit more.

You can also try ACRO mode. It has the ability to do what your saying. 

#define ACRO_RATE_TRIGGER 200
will give you rate control for stick input, and stabilization with no stick 
input.

Original comment by jasonshort on 3 Jun 2011 at 3:49