{"action":"created","issue":{"url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/84","repository_url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools","labels_url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/84/comments","events_url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/84/events","html_url":"https://github.com/ccny-ros-pkg/imu_tools/issues/84","id":309034211,"number":84,"title":"[imu_filter_madgwick] - Weird Yaw Offset","user":{"login":"JesusMarquez12","id":37219727,"avatar_url":"https://avatars3.githubusercontent.com/u/37219727?v=4","gravatar_id":"","url":"https://api.github.com/users/JesusMarquez12","html_url":"https://github.com/JesusMarquez12","followers_url":"https://api.github.com/users/JesusMarquez12/followers","following_url":"https://api.github.com/users/JesusMarquez12/following{/other_user}","gists_url":"https://api.github.com/users/JesusMarquez12/gists{/gist_id}","starred_url":"https://api.github.com/users/JesusMarquez12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JesusMarquez12/subscriptions","organizations_url":"https://api.github.com/users/JesusMarquez12/orgs","repos_url":"https://api.github.com/users/JesusMarquez12/repos","events_url":"https://api.github.com/users/JesusMarquez12/events{/privacy}","received_events_url":"https://api.github.com/users/JesusMarquez12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-27T16:05:12Z","updated_at":"2018-03-28T16:32:41Z","closed_at":null,"author_association":"NONE","body":"Hi, I hope someone can help me with this problem:\r\n\r\nI'm working with an imu UM7 Orientation Sensor, that incorporate a 3 axis gyroscope, a 3 axis accelerometer and a 3 axis magnetometer. I'm using um7_driver to capture and publish the data, at a effective rate of 45~47 Hz. This imu had a ekf_filter incorporated, but the result sometimes is very noisy and low accurate, so i'm using the node that implements madgwick to obtain a better quality orientation based in the angular rate and acceleration from the imu.\r\n\r\nBut the result i'm having is this:\r\n\r\n![pitch_comparison_slow_1](https://user-images.githubusercontent.com/37219727/37976643-52f98e74-31b8-11e8-9bcb-84feb7d44b98.png)\r\n\r\n![roll_comparison_slow_1](https://user-images.githubusercontent.com/37219727/37976644-534ee8a6-31b8-11e8-839b-cf47ca658448.png)\r\n\r\n![yaw_comparison_slow_1](https://user-images.githubusercontent.com/37219727/37976594-3116c178-31b8-11e8-9570-3b941c5364a5.png)\r\n\r\nUsing the ekf filter output as reference for the orientation, i got a good response for the roll and pitch angles, but also i got an offset of 107° approx in the yaw angle. So susbtracting that offset, the next result is obtained:\r\n\r\n![yaw_offset_slow_1](https://user-images.githubusercontent.com/37219727/37977847-0221e480-31bb-11e8-8e11-995609a3bcb3.png)\r\n\r\nThe input is a recorded bag files with a sequence where i put the imu in the next angles:\r\n(yaw,pitch,roll)={(0,0,0),(0,0,90),(0,0,0),(0,0,-90),(0,0,0),(0,90,0),(0,0,0),(0,-90,0),(0,0,0),(90,0,0),(0,0,0),(-90,0,0),(0,0,0)}. But the rotations were hand-made, as result, the angles obtained weren't zero when expected. Anyways, the tendency where clear, so i still used it.\r\n\r\nThe imu is in a ned reference position, as well the world_reference parameter in the node. The magnetometers measures weren't considerate.\r\n\r\nThe real problem of the situation is that the offset isn't constant. Trying the configuration with 3 more bagfiles with the same sequence recorded, i got the next results:\r\n\r\n![yaw_comparison_slow_2](https://user-images.githubusercontent.com/37219727/37979329-b5f0b8bc-31be-11e8-9d37-8ea49856b021.png)\r\n\r\n![yaw_comparison_fast_1](https://user-images.githubusercontent.com/37219727/37979327-b5ac2f26-31be-11e8-8d12-d5ec38138e07.png)\r\n\r\n![yaw_comparison_fast_2](https://user-images.githubusercontent.com/37219727/37979328-b5cffe4c-31be-11e8-8685-f7688075576f.png)\r\n\r\nWhere the offset used to correct the angle was 145.6, 46.7 and 74.5 respectively.\r\n\r\n![yaw_offset_slow_2](https://user-images.githubusercontent.com/37219727/37979354-c4760c20-31be-11e8-9ddc-22354cb20839.png)\r\n\r\n![yaw_offset_fast_1](https://user-images.githubusercontent.com/37219727/37979352-c4338cf6-31be-11e8-9308-ed37eed99a48.png)\r\n\r\n![yaw_offset_fast_2](https://user-images.githubusercontent.com/37219727/37979353-c4558b08-31be-11e8-9a79-171389364dc0.png)\r\n\r\nSo, what could be the origin for this comportment of the node? \r\n\r\nTo get the euler angles i made a node that applies the conversion mentioned [in this wikipedia page](https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles) and their are in degrees [°], in a range of -180 to 180, that the reason for the vertical lines in the graphs.\r\n\r\nHere are my [bags files](http://www.mediafire.com/file/slc1t3ubbe9mvcf/Imu_n_GPS_data.zip) and [launch file](http://www.mediafire.com/file/vg6l9wbh9a9d110/test_from_bag_-_Madgwick.launch) if it is useful.\r\n\r\nThanks in advance.\r\n"},"comment":{"url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/comments/376951032","html_url":"https://github.com/ccny-ros-pkg/imu_tools/issues/84#issuecomment-376951032","issue_url":"https://api.github.com/repos/ccny-ros-pkg/imu_tools/issues/84","id":376951032,"user":{"login":"mintar","id":320188,"avatar_url":"https://avatars2.githubusercontent.com/u/320188?v=4","gravatar_id":"","url":"https://api.github.com/users/mintar","html_url":"https://github.com/mintar","followers_url":"https://api.github.com/users/mintar/followers","following_url":"https://api.github.com/users/mintar/following{/other_user}","gists_url":"https://api.github.com/users/mintar/gists{/gist_id}","starred_url":"https://api.github.com/users/mintar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mintar/subscriptions","organizations_url":"https://api.github.com/users/mintar/orgs","repos_url":"https://api.github.com/users/mintar/repos","events_url":"https://api.github.com/users/mintar/events{/privacy}","received_events_url":"https://api.github.com/users/mintar/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T16:32:41Z","updated_at":"2018-03-28T16:32:41Z","author_association":"COLLABORATOR","body":"By the way: if you look closely at your plots, you can see that the roll and pitch angles between the two filters don't diverge, but that the yaw angle diverges. So there is no constant offset. The reason is the same as above: there is always drift, and there is no reference to correct it. Hopefully you can tune the parameters to get better results than the built-in EKF. "}}
{"actor":{"display_login":"mintar"}}