Sensor fusion to calculate joint angles between segments of a robot arm using IMU data - Robotics Stack Exchange most recent 30 from robotics.stackexchange.com 2019-12-11T20:25:15Z https://robotics.stackexchange.com/feeds/question/18350 https://creativecommons.org/licenses/by-sa/4.0/rdf https://robotics.stackexchange.com/q/18350 -1 Sensor fusion to calculate joint angles between segments of a robot arm using IMU data MaVe https://robotics.stackexchange.com/users/22472 2019-03-06T15:58:04Z 2019-03-08T01:17:32Z <p>I have an IMU attached to each of the segments of a robotic arm, which gives me accelerometer and gyroscope data. My goal is to first of all improve the quality of the sensor readings and subsequently get the angles of each of the joints.</p> <p>I'm new in robotics, but as far as I can see, I need a sensor fusion algorithm (e.g., complementary filter or Kalman filter) to improve the quality of the sensor readings. Subsequently, how can I calculate the angles between each of the joints using this data?</p> <p>Can this be done in one go (i.e., can you use the output of the complementary filter to get the angles)? Are there reference implementations in Python available?</p> https://robotics.stackexchange.com/questions/18350/-/18359#18359 0 Answer by Franky for Sensor fusion to calculate joint angles between segments of a robot arm using IMU data Franky https://robotics.stackexchange.com/users/21747 2019-03-07T08:21:36Z 2019-03-08T00:07:03Z <p>I don't understand which type of sensor fusion you like to do. You said you are using IMU and generally it gives you the orientation and accelerations.</p> <p>If you have the quaternion <span class="math-container">$\textbf{q}=(w,x,y,z)$</span> then your axis of rotation is vector <span class="math-container">$\textbf{v}=(x,y,z)$</span> and joint displacement (angle) is given by </p> <p><span class="math-container">$\alpha=2cos^{-1}w$</span> </p> https://robotics.stackexchange.com/questions/18350/-/18368#18368 0 Answer by Akshay Kumar for Sensor fusion to calculate joint angles between segments of a robot arm using IMU data Akshay Kumar https://robotics.stackexchange.com/users/18572 2019-03-08T01:17:32Z 2019-03-08T01:17:32Z <p>There has been a lot of research done in joint angle estimation using IMUs and it works as the principle technology behind segways, self-balancing robots and humanoid robots as well. </p> <p>The theoretical concept is that gyroscope gives you the orientation of the sensor and using it in conjunction with the pre-determined mounting orientation of the sensor, you can find the orientation of the link itself. An accelerometer basically computes acceleration and its double integration can give you the linear motion. Additional resource to understand IMUs is the <a href="https://stanford.edu/class/ee267/lectures/lecture10.pdf" rel="nofollow noreferrer">this lecture from the Virtual Reality course EE267 at Stanford</a>.</p> <p>Improving and cleaning up the sensor data is very important for the IMU due to drifting and biasing reasons and Kalman Filtering and its variants are definitely the most used technologies to resolve this. Theoretical concepts are well explained in <a href="https://www.navlab.net/Publications/Introduction_to_Inertial_Navigation_and_Kalman_Filtering.pdf" rel="nofollow noreferrer">this presentation on Inertial Navigation and Kalman Filtering by Navlab</a> while <a href="https://github.com/TKJElectronics/Example-Sketch-for-IMU-including-Kalman-filter/tree/master/IMU/MPU6050_HMC5883L" rel="nofollow noreferrer">TKJ Electronics has a highly-starred Kalman Filtering implemented on IMUs codebase on Github</a>.</p> <p>However, I am not sure by what you mean by doing it in one go.</p> <p>PS: You shoudl refer to this paper <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4029684/" rel="nofollow noreferrer">IMU-Based Joint Angle Measurement for Gait Analysis</a> for and end-to-end discussion on your concerned task.</p>