My professor give me a project. I need to make a quadcopter can independent avoid obstacles.
I choose four LV-EZ0 sonars mount to front,back,left and right(like the photo).
Four sonars value has filtering by APM originally filtering code. Through those value calculated gain belongs to four directions. Put those gain to PID function calculate avoid obstacles value(pitch & roll). Finally, put the avoid obstacles value of pitch and roll to " case ROLL_PITCH_STABLE" belongs to function "update_roll_pitch_mode" at main code.(Remark : firmware is "ArduCopter V2.9.1b")
Now,I encountered a problem. The quadcopter's roll attitude can avoid obstacles fast and correct but pitch attitude can not. I were sure four sonars is good for work. The pitch's code is same as roll's code. I have no idea why is it so. Someone can give me a hand?
(If you want the complete code,sent the email for me,please.My email is w19900112@gmail.com)
Replies
I'm going to take a wild stab in the dark here. See if this box indicated with the arrow is marked in mission planner .. If it is Unmark it.