Just a post to talk a bit about my recent attempts to get into Arduino and more specifically in Ardupilot Mega.
I was hopping to find a pre-programmed pde file (the firmware you upload into your arduino board) that would be ready out of the box.
Why ? because Ardupilot Mega v2 (APMv2) includes already all the electrical components that you had to buy separatly before with APMv1 (that is : a gyroscope, a GPS, accelerometer, magnometer). When you buy the ArduPilot Mega v2 hardware, everything is intgrated and you don't have to buy the complementary arduIMU board you had to buy before with APM v1.
I looked into the manual of APMv2, I found a test program (IMU test) that prints out values in the command line interpreter/shell of Arduino.
But then what ? I'm having a hard time to understand the block diagram that describes the whole chain starting from "getting values from the sensors" to "servo moving in such or such direction to compensate".
The compensation movement a sensor must make is dependant on the structure you're playing with. If you're playing with a multicopter, the compensation (variation of engines speed) will be different that if you're playing with an aircraft (motion compensation is produced by ailerons/rudder/pitch compensation, thus servo motion.
You have to imagine how complexe it is to program the variation of engines speed in order to maintain heading/altitude or in order to maintain stability.
Also, in an aircraft problem is a little easier, because the axis you want to compensate is well defined : yaw, pitch, roll
In my case, it's about the same : I have pitch and roll of the camera inside the basket, and yaw outside the basket
Anyway, at this point, I still need to understand how to route the values acquired by the DCM to servos, but I really have this crazy feeling that I'm trying to do stuff that is already programmed somewhere.
I will be writing a post specifically on my understanding of IMU problems
Some documentation
http://www.youtube.com/watch?v=bWDXsKlHvIs
http://www.youtube.com/watch?v=yAVCZstkORY&feature=related
A tutorial on kalman filter
http://www.youtube.com/watch?v=37ZoeVqouc8&feature=channel&list=UL
http://www.youtube.com/watch?v=8R0Ny1l1o1Q&feature=related
A description of DCM algorithm
A code understandable to create stabilization : http://ardupilot.googlecode.com/svn/trunk/Ardupilot_25/attitude.pde
http://ardupilot-kit.googlecode.com/svn-history/r9/trunk/ArduPilotSIM_2_6/attitude.pde
Compass test
http://code.google.com/p/ardupilot-mega/source/browse/libraries/AP_Compass/examples/AP_Compass_test/AP_Compass_test.pde?r=cefe1a07bc82c346bb5f99a7e1425de3a9298229
Some information about understanding how a servo is put into rotation :
http://arduino.cc/fr/Main/LibrairieServo
Here's a test about driving a servo into rotation :
http://api.ning.com/files/XwPN7URDsnkplTraVMr-7sjgFznrv7VhulKe60zoO95*kYBeXvrIoTiax7I8S-9lynBUKK940lFTo0Ghyw5HO6XsaelWJZqR/RCTest.pde
Aucun commentaire:
Enregistrer un commentaire