Skip to content

Instantly share code, notes, and snippets.

View zainmehdi's full-sized avatar
😀

Zain zainmehdi

😀
View GitHub Profile
@zainmehdi
zainmehdi / imu_gravity.md
Last active February 9, 2021 03:46
Gravity Vector Subtraction for IMUs

This article is about handling data from a MEMS IMU. There are used abundantly in alot of consumer devices and as a robotics engineer its important to understand important concepts and handling of such data. Often prone to noise, various filtering techniques are needed to refine this data.

Gravity Compensation:

See Madgwick filter for details

Useful Links:

https://stackoverflow.com/questions/60492369/gravity-compensation-in-imu-data
@zainmehdi
zainmehdi / angle_type_conversion.cpp
Created November 20, 2020 02:16 — forked from LimHyungTae/angle_type_conversion.cpp
ROS quaternion to rotation matrix OR rotation matrix to roll-pitch-yaw OR roll-pitch-yaw to quaternion
#include <iostream>
#include <tf/tf.h>
int main(){
/**< Declaration of quaternion */
tf::Quaternion q;
q.setW(1);
q.setX(0);
q.setY(0);