Jump to content
I2Cdevlib Forums

luca

Members
  • Posts

    13
  • Joined

  • Last visited

luca's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I think that you should to use the MPU6050. It is less accurate that the only compass, but i think that this isn't a problem.... Life is simple!!
  2. I'm sorry, maybe we had a misunderstood!! In the file MPU6050_DMP6.ino there isn't any line of code that give you the position x and y!! If you want to obtain a measures of position (x,y,z) from an IMU you are needs six kind of measures: the velocity of the body (u,v,w in the my convention of symbols) the angular velocity of the body (P,Q,R) once you have this measures you needs some kinematics relation (rotation matrix) to convert this measures from the body frame to the inertial frame. A this points you simply integrate the new measure of the linear velocity vx,vy and vz to obtain the position x,y and z. This is the teory, in practice this "modus operandi" is wrong because the IMU is less accurate for different causes (drift, etc..) so the position in the x,y and z are incorrect! In this discussion i understand that you are able to measure the velocity of the wheels, so you can using this measures and using the yaw measure from the file MPU6050_ETC, you simply apply the odometry equations to obtain the position x and y. This is all!
  3. The answer is trivial! float euler[3]; // [psi, theta, phi] Euler angle container in the main loop: // display Euler angles in degrees mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetEuler(euler, &q); Serial.print("euler\t"); Serial.print(euler[0] * 180/M_PI); --> roll Serial.print("\t"); Serial.print(euler[1] * 180/M_PI); --> pitch Serial.print("\t"); Serial.println(euler[2] * 180/M_PI); --> yaw euler[2]* 180/M_P is the yaw value in degree.....
  4. To extract the yaw measurements you need convert the raw data from the IMU into the Euler angle (or quaternion), and from this you take the only yaw measurements. I don't know if Jeff Rowberg's github codes can do this, i think yes but i'm not sure. I'm not an Arduino user, so i don't know how to work his codes. However if you have a Invensense MPU, you also have a DMP, so if you use the DMP features you can extract easily the yaw measurement. My advice is to use the DMP! Otherwise you needs some programmer skills and some mathematical / mechanical skills to obtain the yaw measurement from the raw data. Notice that the raw data are noisy, so there is another difficulties that is the noise filtering. Try to study this code: https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino If you understand this code, you need only to extract the yaw measure from quaternion output!
  5. Nice video! You can try to extract the yaw measurement from IMU and follow this tutorial, i think that it's sufficient to solve your problem! Obviously, this a simple solution, other solution are complicated and the time is precious for you!!! Good Luck!
  6. I think that the compass is better than the IMU for this kind of problem. In the 2D problem you needs three types of measures: the distance along x, y and the heading angle phi (the yaw). Using this measure you know the pose of the robot in inertial frame. Using the velocity of the wheels and the kinematics you can obtain the x and y position in inertial frame, and using the compass you have the heading angle and the problem (in theory) is solved! In practice, you measure directly only the yaw, so i think that you should use a kalmann filter (with the odometry equations) to estimate with a good precision the pose of the robot. The kalmann filter is necessary because you don't measure directly the x and y position, also the odometry introduce an integration error then the filter is necessary!
  7. rodolf0ac, maybe i understand your problem... My point of view is that you try to find a pose (x,y and yaw) in inertial frame using measure take in body frame. This is a kinematics problem, my advice is to use the measure in body frame and use this measure in input a kalmann filter for estimate the pose (x,y,yaw). In reality you need other kind of sensor like exteroceptive sensors (like ultrasound) to measure the pose of the robot in inertial frame. Good luck! Thank you so much luisrodenas! Your post make me happy!!! I think so that the DMP functionalities is easier than implement a kalman filter!!
  8. Sondre, thank you so much for sharing this file! You help me a lot!! If you like the challenge then you are in the right way! My advice is to study a lot because this kind of project is multidisciplinar. From my point of view you should have a good skill in mathematics, mechanics and electronics, obviously you should be able to programming the microprocessor. I'm started my project, reading first this thesis: https://fenix.tecnico.ulisboa.pt/downloadFile/395139421058/Tese_de_Mestrado.pdf and this is only the start!!! Good luck!
  9. This is not a problem!! However you run a bit! It's not simple to implement a control system for real world application. In this case, the quadcopter dynamics is very non linear and unstable in open loop, so the design of control system it's difficult! There are a lot of problem, that is impossible to describe here now!! I'm not sure (this is that i will try to do now!!) but if you use the functionalities of the DMP of the MPU9150, probabily the output of the IMU (Euler angles, or quaternion) is very clear (i hope!!). Note that the output of IMU (Euler angles) can be obtain without use a DMP features! In this case you take the raw data, elaborate it and finally filter it, not using the MPU9150, but using your microcontroller! In this way you spend a lot of microcontroller resources and this is a problem!! The advantage of the use of the DMP is to save the microcontroller resources! However i'm sorry but i'm not able to download this document. I'm create another account, but nothing! Please can you upload it here?
  10. The problem isn't your ability to programming, but how use your library in real time application!!! After some years at university you will understand!! If you're not interested in creating real time applications, then many problems you can not see them!!! Java or C++ or Objective-C are hight level language! This languages are "simple" to use to make a robust library... However, i'm not interested in this kind of problem, i'm an automation engineering and my objective isn't to make a library, but i will design a control system to control my quadcopter. In this case my quadcopter isn't a drone (i not control it with any device such a PS3 joypad or iPad) but is a robot! This is a bit different!! I'm not using the I2CDevLib because this kind of library it's a part of my work (my exam is on the use of the microcontroller), so i writed my personal "library" to interface with I2C protocol. I think that for this kind of problem (interface with I2C protocol), the I2cDevLib work very well. The problem is that the MPU9150 have a proprietary library that help to use the proprietary DMP (Digital Motion Processor). My problem, now is how to use the DMP functionality of the MPU9150 to obtain a signal (Euler angles) without noise! For do this i need to know how use the Invensense library to obtain the signal without noise! This kind of problem are different than your!! I'm not sure that you understand all that i write! Maybe we will talk about, after some years!!
  11. Hello Sondre! I have an account, but maybe isn't good! The answer of the invensense site for my request is: " Your current registration status does not permit access to this file. If you have any questions or would like to re-validate your account by registering with your corporate email address, please fill out the form provided on the support page." I'm registred with my email, i haven't a corporate email address!! Any advice on how to access at this documents whitout corporate email?? I'm a university student and i make a quadcopter for university purpose. At this moment, my "library" is very simple! Now i'm able to comunicate with I2C protocol, and using I2C, i'm able to comunicate with the MPU9150, so i'm able to read raw values from this device. I'm not using an Arduino, i use an AVR STK500, and my code is in ANSI C (maybe!! ). What do you do with MPU9150? Make a "Robust libray" isn't simple, and for control purpose the raw data are useless without a filter..
  12. Hello Sondre! I have read your post, but follow your link the resource isn't available, after press the agree button! Please, can you help me to find this documentation?
×
×
  • Create New...