{"action":"created","comment":{"url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/comments/88906724","pull_request_review_id":9463629,"id":88906724,"diff_hunk":"@@ -28,58 +35,46 @@ const float error_measurement_gyro = 0.001;\n double t_current = 0.0;\n double t_last = 0.0;\n double dt = 0.0;\n-int counter = 0;\n-\n-const Eigen::Matrix3d I = Eigen::Matrix3d::Identity();\n-Eigen::MatrixXd A;\n-const Eigen::MatrixXd B = Eigen::MatrixXd::Zero(15, 15);\n-Eigen::MatrixXd C;\n-\n-//Initialising inital state\n-const Eigen::VectorXd x0 = Eigen::VectorXd::Zero(9);\n-const Eigen::Vector3d init_angles(x0(3), x0(4), x0(5));\n-\n-//Initialising error matrices\n-Eigen::MatrixXd R;\n-Eigen::VectorXd Q;\n+bool first_step = true;\n \n //Initialization for kalman Update (global: no new initialization every step)\n Eigen::Vector3d current_angles;\n Eigen::VectorXd current_state;\n-Eigen::VectorXd current_measurements;\n geometry_msgs::Quaternion current_orientation;\n \n-//Initialising Kalman Filter\n-KalmanFilter kalman(A, B, C, Q, R);\n+//Declaration Kalman Filter\n+KalmanFilter_Orientation kalman;\n \n int main(int argc, char** argv){\n \n \tros::init(argc, argv, \"attitudefilter\");\n \tros::NodeHandle node;\n \n+\t//Initialising state matrices\n+\tEigen::Matrix<double,15,15> A = Eigen::MatrixXd::Identity(15,15);","path":"src/attitude_filter.cpp","position":63,"original_position":63,"commit_id":"12373d43972b1ddc55c77482d35d4d0a779405da","original_commit_id":"12373d43972b1ddc55c77482d35d4d0a779405da","user":{"login":"foehnph","id":17403970,"avatar_url":"https://avatars.githubusercontent.com/u/17403970?v=3","gravatar_id":"","url":"https://api.github.com/users/foehnph","html_url":"https://github.com/foehnph","followers_url":"https://api.github.com/users/foehnph/followers","following_url":"https://api.github.com/users/foehnph/following{/other_user}","gists_url":"https://api.github.com/users/foehnph/gists{/gist_id}","starred_url":"https://api.github.com/users/foehnph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foehnph/subscriptions","organizations_url":"https://api.github.com/users/foehnph/orgs","repos_url":"https://api.github.com/users/foehnph/repos","events_url":"https://api.github.com/users/foehnph/events{/privacy}","received_events_url":"https://api.github.com/users/foehnph/received_events","type":"User","site_admin":false},"body":"I guess he sets up the matrices and passes it to the kalman in its `init()` method down at row 77.\r\nI would rather recommend doing so in the constructor of the kalman class if possible.\r\n@SeleSchaefer google for \"c++ member initializer list\", it's the cleanest way to do this.","created_at":"2016-11-21T14:40:43Z","updated_at":"2016-11-21T14:44:39Z","html_url":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1#discussion_r88906724","pull_request_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/comments/88906724"},"html":{"href":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1#discussion_r88906724"},"pull_request":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1","id":94622947,"html_url":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1","diff_url":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1.diff","patch_url":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1.patch","issue_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/1","number":1,"state":"open","locked":false,"title":"Work","user":{"login":"rdube","id":7094165,"avatar_url":"https://avatars.githubusercontent.com/u/7094165?v=3","gravatar_id":"","url":"https://api.github.com/users/rdube","html_url":"https://github.com/rdube","followers_url":"https://api.github.com/users/rdube/followers","following_url":"https://api.github.com/users/rdube/following{/other_user}","gists_url":"https://api.github.com/users/rdube/gists{/gist_id}","starred_url":"https://api.github.com/users/rdube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdube/subscriptions","organizations_url":"https://api.github.com/users/rdube/orgs","repos_url":"https://api.github.com/users/rdube/repos","events_url":"https://api.github.com/users/rdube/events{/privacy}","received_events_url":"https://api.github.com/users/rdube/received_events","type":"User","site_admin":false},"body":"@foehnph @Messikommer for your info! :-)","created_at":"2016-11-21T14:17:15Z","updated_at":"2016-11-21T14:44:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12abdecb7e5070ec482bc985a6553e9e92392435","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/1/comments","statuses_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/statuses/12373d43972b1ddc55c77482d35d4d0a779405da","head":{"label":"ProjectARCeth:work","ref":"work","sha":"12373d43972b1ddc55c77482d35d4d0a779405da","user":{"login":"ProjectARCeth","id":23221621,"avatar_url":"https://avatars.githubusercontent.com/u/23221621?v=3","gravatar_id":"","url":"https://api.github.com/users/ProjectARCeth","html_url":"https://github.com/ProjectARCeth","followers_url":"https://api.github.com/users/ProjectARCeth/followers","following_url":"https://api.github.com/users/ProjectARCeth/following{/other_user}","gists_url":"https://api.github.com/users/ProjectARCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectARCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectARCeth/subscriptions","organizations_url":"https://api.github.com/users/ProjectARCeth/orgs","repos_url":"https://api.github.com/users/ProjectARCeth/repos","events_url":"https://api.github.com/users/ProjectARCeth/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectARCeth/received_events","type":"Organization","site_admin":false},"repo":{"id":74227522,"name":"arc_state_estimation","full_name":"ProjectARCeth/arc_state_estimation","owner":{"login":"ProjectARCeth","id":23221621,"avatar_url":"https://avatars.githubusercontent.com/u/23221621?v=3","gravatar_id":"","url":"https://api.github.com/users/ProjectARCeth","html_url":"https://github.com/ProjectARCeth","followers_url":"https://api.github.com/users/ProjectARCeth/followers","following_url":"https://api.github.com/users/ProjectARCeth/following{/other_user}","gists_url":"https://api.github.com/users/ProjectARCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectARCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectARCeth/subscriptions","organizations_url":"https://api.github.com/users/ProjectARCeth/orgs","repos_url":"https://api.github.com/users/ProjectARCeth/repos","events_url":"https://api.github.com/users/ProjectARCeth/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectARCeth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ProjectARCeth/arc_state_estimation","description":null,"fork":false,"url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation","forks_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/forks","keys_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/teams","hooks_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/hooks","issue_events_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/events{/number}","events_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/events","assignees_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/assignees{/user}","branches_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/branches{/branch}","tags_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/tags","blobs_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/statuses/{sha}","languages_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/languages","stargazers_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/stargazers","contributors_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/contributors","subscribers_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/subscribers","subscription_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/subscription","commits_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/contents/{+path}","compare_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/merges","archive_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/downloads","issues_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues{/number}","pulls_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls{/number}","milestones_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/milestones{/number}","notifications_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/labels{/name}","releases_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/releases{/id}","deployments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/deployments","created_at":"2016-11-19T18:35:38Z","updated_at":"2016-11-19T18:41:14Z","pushed_at":"2016-11-21T14:17:15Z","git_url":"git://github.com/ProjectARCeth/arc_state_estimation.git","ssh_url":"git@github.com:ProjectARCeth/arc_state_estimation.git","clone_url":"https://github.com/ProjectARCeth/arc_state_estimation.git","svn_url":"https://github.com/ProjectARCeth/arc_state_estimation","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ProjectARCeth:master","ref":"master","sha":"a1d133f7fb68a7f0018c23e66376dafb9cfda35a","user":{"login":"ProjectARCeth","id":23221621,"avatar_url":"https://avatars.githubusercontent.com/u/23221621?v=3","gravatar_id":"","url":"https://api.github.com/users/ProjectARCeth","html_url":"https://github.com/ProjectARCeth","followers_url":"https://api.github.com/users/ProjectARCeth/followers","following_url":"https://api.github.com/users/ProjectARCeth/following{/other_user}","gists_url":"https://api.github.com/users/ProjectARCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectARCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectARCeth/subscriptions","organizations_url":"https://api.github.com/users/ProjectARCeth/orgs","repos_url":"https://api.github.com/users/ProjectARCeth/repos","events_url":"https://api.github.com/users/ProjectARCeth/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectARCeth/received_events","type":"Organization","site_admin":false},"repo":{"id":74227522,"name":"arc_state_estimation","full_name":"ProjectARCeth/arc_state_estimation","owner":{"login":"ProjectARCeth","id":23221621,"avatar_url":"https://avatars.githubusercontent.com/u/23221621?v=3","gravatar_id":"","url":"https://api.github.com/users/ProjectARCeth","html_url":"https://github.com/ProjectARCeth","followers_url":"https://api.github.com/users/ProjectARCeth/followers","following_url":"https://api.github.com/users/ProjectARCeth/following{/other_user}","gists_url":"https://api.github.com/users/ProjectARCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectARCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectARCeth/subscriptions","organizations_url":"https://api.github.com/users/ProjectARCeth/orgs","repos_url":"https://api.github.com/users/ProjectARCeth/repos","events_url":"https://api.github.com/users/ProjectARCeth/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectARCeth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ProjectARCeth/arc_state_estimation","description":null,"fork":false,"url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation","forks_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/forks","keys_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/teams","hooks_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/hooks","issue_events_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/events{/number}","events_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/events","assignees_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/assignees{/user}","branches_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/branches{/branch}","tags_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/tags","blobs_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/refs{/sha}","trees_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/statuses/{sha}","languages_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/languages","stargazers_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/stargazers","contributors_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/contributors","subscribers_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/subscribers","subscription_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/subscription","commits_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/commits{/sha}","git_commits_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/git/commits{/sha}","comments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/comments{/number}","issue_comment_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/comments{/number}","contents_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/contents/{+path}","compare_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/merges","archive_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/downloads","issues_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues{/number}","pulls_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls{/number}","milestones_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/milestones{/number}","notifications_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/labels{/name}","releases_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/releases{/id}","deployments_url":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/deployments","created_at":"2016-11-19T18:35:38Z","updated_at":"2016-11-19T18:41:14Z","pushed_at":"2016-11-21T14:17:15Z","git_url":"git://github.com/ProjectARCeth/arc_state_estimation.git","ssh_url":"git@github.com:ProjectARCeth/arc_state_estimation.git","clone_url":"https://github.com/ProjectARCeth/arc_state_estimation.git","svn_url":"https://github.com/ProjectARCeth/arc_state_estimation","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1"},"html":{"href":"https://github.com/ProjectARCeth/arc_state_estimation/pull/1"},"issue":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/1"},"comments":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ProjectARCeth/arc_state_estimation/statuses/12373d43972b1ddc55c77482d35d4d0a779405da"}}}}
{"actor":{"display_login":"foehnph"}}