{"action":"created","comment":{"url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/comments/40510555","id":40510555,"diff_hunk":"@@ -0,0 +1,26 @@\n+/**\n+ * @file motor_controller.cpp\n+ * @brief The implementation file for the MotorController class\n+ */\n+\n+#include <motor_controller.h>\n+\n+MotorController::MotorController()\n+{\n+    //Initialize publishers and subscribers\n+    twist_sub = nh.subscribe<geometry_msgs::Twist>(CONTROL_TOPIC, 1, &MotorController::twistCallback, this);\n+    right_vel_pub = nh.advertise<std_msgs::Float64>(RIGHT_VEL_TOPIC, 1);\n+    left_vel_pub = nh.advertise<std_msgs::Float64>(LEFT_VEL_TOPIC, 1);\n+}\n+\n+void MotorController::twistCallback(const geometry_msgs::Twist::ConstPtr& msg)\n+{\n+    right_vel.data = (2 * msg->linear.x + msg->angular.z * ROBOT_BASE) / (2 * WHEEL_RAD);\n+    left_vel.data = (2 * msg->linear.x + msg->angular.z * ROBOT_BASE) / (2 * WHEEL_RAD);","path":"ros_ws/src/control/src/control/motor_controller.cpp","position":19,"original_position":19,"commit_id":"ade3649b44a6162f9f51c6ddc01cdf8d042098ba","original_commit_id":"ade3649b44a6162f9f51c6ddc01cdf8d042098ba","user":{"login":"islamelnabarawy","id":8903584,"avatar_url":"https://avatars.githubusercontent.com/u/8903584?v=3","gravatar_id":"","url":"https://api.github.com/users/islamelnabarawy","html_url":"https://github.com/islamelnabarawy","followers_url":"https://api.github.com/users/islamelnabarawy/followers","following_url":"https://api.github.com/users/islamelnabarawy/following{/other_user}","gists_url":"https://api.github.com/users/islamelnabarawy/gists{/gist_id}","starred_url":"https://api.github.com/users/islamelnabarawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islamelnabarawy/subscriptions","organizations_url":"https://api.github.com/users/islamelnabarawy/orgs","repos_url":"https://api.github.com/users/islamelnabarawy/repos","events_url":"https://api.github.com/users/islamelnabarawy/events{/privacy}","received_events_url":"https://api.github.com/users/islamelnabarawy/received_events","type":"User","site_admin":false},"body":"There's an error in the math here. Please double-check it.\r\n\r\nAlso please refactor the math equations into separate functions so it would be clear what the calculation represents.","created_at":"2015-09-27T22:11:35Z","updated_at":"2015-09-27T22:11:35Z","html_url":"https://github.com/MST-Robotics/IGVC/pull/24#discussion_r40510555","pull_request_url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/comments/40510555"},"html":{"href":"https://github.com/MST-Robotics/IGVC/pull/24#discussion_r40510555"},"pull_request":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24","id":46086254,"html_url":"https://github.com/MST-Robotics/IGVC/pull/24","diff_url":"https://github.com/MST-Robotics/IGVC/pull/24.diff","patch_url":"https://github.com/MST-Robotics/IGVC/pull/24.patch","issue_url":"https://api.github.com/repos/MST-Robotics/IGVC/issues/24","number":24,"state":"open","locked":false,"title":"Create motor_controller_node","user":{"login":"matthewia94","id":2702838,"avatar_url":"https://avatars.githubusercontent.com/u/2702838?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewia94","html_url":"https://github.com/matthewia94","followers_url":"https://api.github.com/users/matthewia94/followers","following_url":"https://api.github.com/users/matthewia94/following{/other_user}","gists_url":"https://api.github.com/users/matthewia94/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewia94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewia94/subscriptions","organizations_url":"https://api.github.com/users/matthewia94/orgs","repos_url":"https://api.github.com/users/matthewia94/repos","events_url":"https://api.github.com/users/matthewia94/events{/privacy}","received_events_url":"https://api.github.com/users/matthewia94/received_events","type":"User","site_admin":false},"body":"The motor_controller_node will convert twist messages to motor\r\nvelocities and send them to the boards which are controlling the motors.\r\nThey are currently arbitrarily scaled and will need to be adjusted later\r\nbased on the robots speed.\r\n\r\nCloses #5","created_at":"2015-09-26T17:56:48Z","updated_at":"2015-09-27T22:11:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0556a7c922f71adb1a16405c7b3a5decee35eef","assignee":{"login":"islamelnabarawy","id":8903584,"avatar_url":"https://avatars.githubusercontent.com/u/8903584?v=3","gravatar_id":"","url":"https://api.github.com/users/islamelnabarawy","html_url":"https://github.com/islamelnabarawy","followers_url":"https://api.github.com/users/islamelnabarawy/followers","following_url":"https://api.github.com/users/islamelnabarawy/following{/other_user}","gists_url":"https://api.github.com/users/islamelnabarawy/gists{/gist_id}","starred_url":"https://api.github.com/users/islamelnabarawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/islamelnabarawy/subscriptions","organizations_url":"https://api.github.com/users/islamelnabarawy/orgs","repos_url":"https://api.github.com/users/islamelnabarawy/repos","events_url":"https://api.github.com/users/islamelnabarawy/events{/privacy}","received_events_url":"https://api.github.com/users/islamelnabarawy/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/MST-Robotics/IGVC/milestones/1","html_url":"https://github.com/MST-Robotics/IGVC/milestones/Teleop%20Controlled%20Robot","labels_url":"https://api.github.com/repos/MST-Robotics/IGVC/milestones/1/labels","id":1307670,"number":1,"title":"Teleop Controlled Robot","description":"The robot components which are necessary for basic teleoperated control should be completed.  This means that the robot can be driven via remote control.  This does not encompass autonomy or sensing and is just bare-bones to create a code base that we can continue to build upon.","creator":{"login":"matthewia94","id":2702838,"avatar_url":"https://avatars.githubusercontent.com/u/2702838?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewia94","html_url":"https://github.com/matthewia94","followers_url":"https://api.github.com/users/matthewia94/followers","following_url":"https://api.github.com/users/matthewia94/following{/other_user}","gists_url":"https://api.github.com/users/matthewia94/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewia94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewia94/subscriptions","organizations_url":"https://api.github.com/users/matthewia94/orgs","repos_url":"https://api.github.com/users/matthewia94/repos","events_url":"https://api.github.com/users/matthewia94/events{/privacy}","received_events_url":"https://api.github.com/users/matthewia94/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":10,"state":"open","created_at":"2015-09-16T03:10:10Z","updated_at":"2015-09-26T17:56:48Z","due_on":"2015-10-01T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24/commits","review_comments_url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24/comments","review_comment_url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MST-Robotics/IGVC/issues/24/comments","statuses_url":"https://api.github.com/repos/MST-Robotics/IGVC/statuses/ade3649b44a6162f9f51c6ddc01cdf8d042098ba","head":{"label":"matthewia94:master","ref":"master","sha":"ade3649b44a6162f9f51c6ddc01cdf8d042098ba","user":{"login":"matthewia94","id":2702838,"avatar_url":"https://avatars.githubusercontent.com/u/2702838?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewia94","html_url":"https://github.com/matthewia94","followers_url":"https://api.github.com/users/matthewia94/followers","following_url":"https://api.github.com/users/matthewia94/following{/other_user}","gists_url":"https://api.github.com/users/matthewia94/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewia94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewia94/subscriptions","organizations_url":"https://api.github.com/users/matthewia94/orgs","repos_url":"https://api.github.com/users/matthewia94/repos","events_url":"https://api.github.com/users/matthewia94/events{/privacy}","received_events_url":"https://api.github.com/users/matthewia94/received_events","type":"User","site_admin":false},"repo":{"id":41498412,"name":"IGVC","full_name":"matthewia94/IGVC","owner":{"login":"matthewia94","id":2702838,"avatar_url":"https://avatars.githubusercontent.com/u/2702838?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewia94","html_url":"https://github.com/matthewia94","followers_url":"https://api.github.com/users/matthewia94/followers","following_url":"https://api.github.com/users/matthewia94/following{/other_user}","gists_url":"https://api.github.com/users/matthewia94/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewia94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewia94/subscriptions","organizations_url":"https://api.github.com/users/matthewia94/orgs","repos_url":"https://api.github.com/users/matthewia94/repos","events_url":"https://api.github.com/users/matthewia94/events{/privacy}","received_events_url":"https://api.github.com/users/matthewia94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewia94/IGVC","description":"The Missouri S&T Robotics team IGVC repository.","fork":true,"url":"https://api.github.com/repos/matthewia94/IGVC","forks_url":"https://api.github.com/repos/matthewia94/IGVC/forks","keys_url":"https://api.github.com/repos/matthewia94/IGVC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewia94/IGVC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewia94/IGVC/teams","hooks_url":"https://api.github.com/repos/matthewia94/IGVC/hooks","issue_events_url":"https://api.github.com/repos/matthewia94/IGVC/issues/events{/number}","events_url":"https://api.github.com/repos/matthewia94/IGVC/events","assignees_url":"https://api.github.com/repos/matthewia94/IGVC/assignees{/user}","branches_url":"https://api.github.com/repos/matthewia94/IGVC/branches{/branch}","tags_url":"https://api.github.com/repos/matthewia94/IGVC/tags","blobs_url":"https://api.github.com/repos/matthewia94/IGVC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewia94/IGVC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewia94/IGVC/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewia94/IGVC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewia94/IGVC/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewia94/IGVC/languages","stargazers_url":"https://api.github.com/repos/matthewia94/IGVC/stargazers","contributors_url":"https://api.github.com/repos/matthewia94/IGVC/contributors","subscribers_url":"https://api.github.com/repos/matthewia94/IGVC/subscribers","subscription_url":"https://api.github.com/repos/matthewia94/IGVC/subscription","commits_url":"https://api.github.com/repos/matthewia94/IGVC/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewia94/IGVC/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewia94/IGVC/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewia94/IGVC/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthewia94/IGVC/contents/{+path}","compare_url":"https://api.github.com/repos/matthewia94/IGVC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewia94/IGVC/merges","archive_url":"https://api.github.com/repos/matthewia94/IGVC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewia94/IGVC/downloads","issues_url":"https://api.github.com/repos/matthewia94/IGVC/issues{/number}","pulls_url":"https://api.github.com/repos/matthewia94/IGVC/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewia94/IGVC/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewia94/IGVC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewia94/IGVC/labels{/name}","releases_url":"https://api.github.com/repos/matthewia94/IGVC/releases{/id}","created_at":"2015-08-27T16:29:35Z","updated_at":"2015-09-11T14:54:17Z","pushed_at":"2015-09-26T17:57:35Z","git_url":"git://github.com/matthewia94/IGVC.git","ssh_url":"git@github.com:matthewia94/IGVC.git","clone_url":"https://github.com/matthewia94/IGVC.git","svn_url":"https://github.com/matthewia94/IGVC","homepage":null,"size":152,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MST-Robotics:master","ref":"master","sha":"387a803f5ab41f2cfbc5e5900babc96079e5ef26","user":{"login":"MST-Robotics","id":1018649,"avatar_url":"https://avatars.githubusercontent.com/u/1018649?v=3","gravatar_id":"","url":"https://api.github.com/users/MST-Robotics","html_url":"https://github.com/MST-Robotics","followers_url":"https://api.github.com/users/MST-Robotics/followers","following_url":"https://api.github.com/users/MST-Robotics/following{/other_user}","gists_url":"https://api.github.com/users/MST-Robotics/gists{/gist_id}","starred_url":"https://api.github.com/users/MST-Robotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MST-Robotics/subscriptions","organizations_url":"https://api.github.com/users/MST-Robotics/orgs","repos_url":"https://api.github.com/users/MST-Robotics/repos","events_url":"https://api.github.com/users/MST-Robotics/events{/privacy}","received_events_url":"https://api.github.com/users/MST-Robotics/received_events","type":"Organization","site_admin":false},"repo":{"id":41380704,"name":"IGVC","full_name":"MST-Robotics/IGVC","owner":{"login":"MST-Robotics","id":1018649,"avatar_url":"https://avatars.githubusercontent.com/u/1018649?v=3","gravatar_id":"","url":"https://api.github.com/users/MST-Robotics","html_url":"https://github.com/MST-Robotics","followers_url":"https://api.github.com/users/MST-Robotics/followers","following_url":"https://api.github.com/users/MST-Robotics/following{/other_user}","gists_url":"https://api.github.com/users/MST-Robotics/gists{/gist_id}","starred_url":"https://api.github.com/users/MST-Robotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MST-Robotics/subscriptions","organizations_url":"https://api.github.com/users/MST-Robotics/orgs","repos_url":"https://api.github.com/users/MST-Robotics/repos","events_url":"https://api.github.com/users/MST-Robotics/events{/privacy}","received_events_url":"https://api.github.com/users/MST-Robotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MST-Robotics/IGVC","description":"The Missouri S&T Robotics team IGVC repository.","fork":false,"url":"https://api.github.com/repos/MST-Robotics/IGVC","forks_url":"https://api.github.com/repos/MST-Robotics/IGVC/forks","keys_url":"https://api.github.com/repos/MST-Robotics/IGVC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MST-Robotics/IGVC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MST-Robotics/IGVC/teams","hooks_url":"https://api.github.com/repos/MST-Robotics/IGVC/hooks","issue_events_url":"https://api.github.com/repos/MST-Robotics/IGVC/issues/events{/number}","events_url":"https://api.github.com/repos/MST-Robotics/IGVC/events","assignees_url":"https://api.github.com/repos/MST-Robotics/IGVC/assignees{/user}","branches_url":"https://api.github.com/repos/MST-Robotics/IGVC/branches{/branch}","tags_url":"https://api.github.com/repos/MST-Robotics/IGVC/tags","blobs_url":"https://api.github.com/repos/MST-Robotics/IGVC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MST-Robotics/IGVC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MST-Robotics/IGVC/git/refs{/sha}","trees_url":"https://api.github.com/repos/MST-Robotics/IGVC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MST-Robotics/IGVC/statuses/{sha}","languages_url":"https://api.github.com/repos/MST-Robotics/IGVC/languages","stargazers_url":"https://api.github.com/repos/MST-Robotics/IGVC/stargazers","contributors_url":"https://api.github.com/repos/MST-Robotics/IGVC/contributors","subscribers_url":"https://api.github.com/repos/MST-Robotics/IGVC/subscribers","subscription_url":"https://api.github.com/repos/MST-Robotics/IGVC/subscription","commits_url":"https://api.github.com/repos/MST-Robotics/IGVC/commits{/sha}","git_commits_url":"https://api.github.com/repos/MST-Robotics/IGVC/git/commits{/sha}","comments_url":"https://api.github.com/repos/MST-Robotics/IGVC/comments{/number}","issue_comment_url":"https://api.github.com/repos/MST-Robotics/IGVC/issues/comments{/number}","contents_url":"https://api.github.com/repos/MST-Robotics/IGVC/contents/{+path}","compare_url":"https://api.github.com/repos/MST-Robotics/IGVC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MST-Robotics/IGVC/merges","archive_url":"https://api.github.com/repos/MST-Robotics/IGVC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MST-Robotics/IGVC/downloads","issues_url":"https://api.github.com/repos/MST-Robotics/IGVC/issues{/number}","pulls_url":"https://api.github.com/repos/MST-Robotics/IGVC/pulls{/number}","milestones_url":"https://api.github.com/repos/MST-Robotics/IGVC/milestones{/number}","notifications_url":"https://api.github.com/repos/MST-Robotics/IGVC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MST-Robotics/IGVC/labels{/name}","releases_url":"https://api.github.com/repos/MST-Robotics/IGVC/releases{/id}","created_at":"2015-08-25T18:27:43Z","updated_at":"2015-09-13T02:02:53Z","pushed_at":"2015-09-27T19:34:42Z","git_url":"git://github.com/MST-Robotics/IGVC.git","ssh_url":"git@github.com:MST-Robotics/IGVC.git","clone_url":"https://github.com/MST-Robotics/IGVC.git","svn_url":"https://github.com/MST-Robotics/IGVC","homepage":null,"size":539,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":9,"forks":5,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24"},"html":{"href":"https://github.com/MST-Robotics/IGVC/pull/24"},"issue":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/issues/24"},"comments":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/MST-Robotics/IGVC/statuses/ade3649b44a6162f9f51c6ddc01cdf8d042098ba"}}}}