{"action":"created","comment":{"url":"https://api.github.com/repos/uf-mil/Navigator/pulls/comments/87953875","pull_request_review_id":8542434,"id":87953875,"diff_hunk":"@@ -0,0 +1,198 @@\n+#!/usr/bin/env python\n+from __future__ import division\n+import txros\n+import std_srvs.srv\n+import numpy as np\n+import tf\n+import tf.transformations as trns\n+from navigator_msgs.msg import ShooterDoAction, ShooterDoActionGoal\n+from navigator_msgs.srv import CameraToLidarTransform, CameraToLidarTransformRequest, FindPinger, FindPingerRequest, SetFrequency, SetFrequencyRequest\n+from geometry_msgs.msg import Point\n+from std_srvs.srv import SetBool, SetBoolRequest\n+from twisted.internet import defer\n+from image_geometry import PinholeCameraModel\n+from visualization_msgs.msg import Marker,MarkerArray\n+import navigator_tools\n+\n+class PingerMission:\n+    OBSERVE_DISTANCE_METERS = 12\n+    GATE_CROSS_METERS = 10\n+    FREQ = 35000\n+    LISTEN_TIME = 15\n+\n+    def __init__(self, navigator):\n+        self.navigator = navigator\n+        self.listen_client = self.navigator.nh.get_service_client('/hydrophones/set_listen', SetBool)\n+        self.pinger_client = self.navigator.nh.get_service_client('/hydrophones/find_pinger', FindPinger)\n+        self.reset_client = self.navigator.nh.get_service_client('/hydrophones/set_freq', SetFrequency)\n+        self.markers_pub = self.navigator.nh.advertise(\"/pinger/debug_marker\",MarkerArray)\n+        self.negate = False\n+\n+    @txros.util.cancellableInlineCallbacks\n+    def reset_freq(self):\n+        yield self.reset_client(SetFrequencyRequest(frequency=self.FREQ))\n+\n+    #@txros.util.cancellableInlineCallbacks\n+    def start_listen(self):\n+        return self.listen_client(SetBoolRequest(data=True))\n+\n+    #@txros.util.cancellableInlineCallbacks\n+    def stop_listen(self):\n+        return self.listen_client(SetBoolRequest(data=False))\n+\n+    @txros.util.cancellableInlineCallbacks\n+    def get_objects(self):\n+        self.gate_1 = yield self.navigator.database_query(\"Gate_1\")\n+        assert self.gate_1.found, \"Not found\"\n+        self.gate_1_pos = navigator_tools.rosmsg_to_numpy(self.gate_1.objects[0].position)[:2]\n+        self.gate_2 = yield self.navigator.database_query(\"Gate_2\")\n+        assert self.gate_2.found, \"Not found\"\n+        self.gate_2_pos = navigator_tools.rosmsg_to_numpy(self.gate_2.objects[0].position)[:2]\n+        self.gate_3 = yield self.navigator.database_query(\"Gate_3\")\n+        assert self.gate_3.found, \"Not found\"\n+        self.gate_3_pos = navigator_tools.rosmsg_to_numpy(self.gate_3.objects[0].position)[:2]\n+\n+    def get_observation_poses(self):","path":"mission_control/navigator_missions/nav_missions/pinger.py","position":55,"original_position":55,"commit_id":"8f1513f8a0b939555391746c7f4d606aeb094627","original_commit_id":"8f1513f8a0b939555391746c7f4d606aeb094627","user":{"login":"mattlangford","id":10998371,"avatar_url":"https://avatars.githubusercontent.com/u/10998371?v=3","gravatar_id":"","url":"https://api.github.com/users/mattlangford","html_url":"https://github.com/mattlangford","followers_url":"https://api.github.com/users/mattlangford/followers","following_url":"https://api.github.com/users/mattlangford/following{/other_user}","gists_url":"https://api.github.com/users/mattlangford/gists{/gist_id}","starred_url":"https://api.github.com/users/mattlangford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattlangford/subscriptions","organizations_url":"https://api.github.com/users/mattlangford/orgs","repos_url":"https://api.github.com/users/mattlangford/repos","events_url":"https://api.github.com/users/mattlangford/events{/privacy}","received_events_url":"https://api.github.com/users/mattlangford/received_events","type":"User","site_admin":false},"body":"I know it was written at the lake, but comments! (after the fact atleast)","created_at":"2016-11-15T06:17:36Z","updated_at":"2016-11-15T07:01:11Z","html_url":"https://github.com/uf-mil/Navigator/pull/131#discussion_r87953875","pull_request_url":"https://api.github.com/repos/uf-mil/Navigator/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/comments/87953875"},"html":{"href":"https://github.com/uf-mil/Navigator/pull/131#discussion_r87953875"},"pull_request":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/uf-mil/Navigator/pulls/131","id":93499391,"html_url":"https://github.com/uf-mil/Navigator/pull/131","diff_url":"https://github.com/uf-mil/Navigator/pull/131.diff","patch_url":"https://github.com/uf-mil/Navigator/pull/131.patch","issue_url":"https://api.github.com/repos/uf-mil/Navigator/issues/131","number":131,"state":"open","locked":false,"title":"ACOUSTIC PINGER: Add pinger perception and mission","user":{"login":"ironmig","id":9502636,"avatar_url":"https://avatars.githubusercontent.com/u/9502636?v=3","gravatar_id":"","url":"https://api.github.com/users/ironmig","html_url":"https://github.com/ironmig","followers_url":"https://api.github.com/users/ironmig/followers","following_url":"https://api.github.com/users/ironmig/following{/other_user}","gists_url":"https://api.github.com/users/ironmig/gists{/gist_id}","starred_url":"https://api.github.com/users/ironmig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironmig/subscriptions","organizations_url":"https://api.github.com/users/ironmig/orgs","repos_url":"https://api.github.com/users/ironmig/repos","events_url":"https://api.github.com/users/ironmig/events{/privacy}","received_events_url":"https://api.github.com/users/ironmig/received_events","type":"User","site_admin":false},"body":"From lakeday 11/12-11/13\r\n\r\n1.  Fix tf for hydrophones\r\n2. Add pinger finder perception which locates pingers\r\n3. Add mission to go to gates, locate pinger, and go through correct gate","created_at":"2016-11-14T02:23:30Z","updated_at":"2016-11-15T07:01:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43b4637c1126134ae763d1dab801d415f121aa52","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uf-mil/Navigator/pulls/131/commits","review_comments_url":"https://api.github.com/repos/uf-mil/Navigator/pulls/131/comments","review_comment_url":"https://api.github.com/repos/uf-mil/Navigator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uf-mil/Navigator/issues/131/comments","statuses_url":"https://api.github.com/repos/uf-mil/Navigator/statuses/8f1513f8a0b939555391746c7f4d606aeb094627","head":{"label":"ironmig:pinger-dev","ref":"pinger-dev","sha":"8f1513f8a0b939555391746c7f4d606aeb094627","user":{"login":"ironmig","id":9502636,"avatar_url":"https://avatars.githubusercontent.com/u/9502636?v=3","gravatar_id":"","url":"https://api.github.com/users/ironmig","html_url":"https://github.com/ironmig","followers_url":"https://api.github.com/users/ironmig/followers","following_url":"https://api.github.com/users/ironmig/following{/other_user}","gists_url":"https://api.github.com/users/ironmig/gists{/gist_id}","starred_url":"https://api.github.com/users/ironmig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironmig/subscriptions","organizations_url":"https://api.github.com/users/ironmig/orgs","repos_url":"https://api.github.com/users/ironmig/repos","events_url":"https://api.github.com/users/ironmig/events{/privacy}","received_events_url":"https://api.github.com/users/ironmig/received_events","type":"User","site_admin":false},"repo":{"id":62825057,"name":"Navigator","full_name":"ironmig/Navigator","owner":{"login":"ironmig","id":9502636,"avatar_url":"https://avatars.githubusercontent.com/u/9502636?v=3","gravatar_id":"","url":"https://api.github.com/users/ironmig","html_url":"https://github.com/ironmig","followers_url":"https://api.github.com/users/ironmig/followers","following_url":"https://api.github.com/users/ironmig/following{/other_user}","gists_url":"https://api.github.com/users/ironmig/gists{/gist_id}","starred_url":"https://api.github.com/users/ironmig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironmig/subscriptions","organizations_url":"https://api.github.com/users/ironmig/orgs","repos_url":"https://api.github.com/users/ironmig/repos","events_url":"https://api.github.com/users/ironmig/events{/privacy}","received_events_url":"https://api.github.com/users/ironmig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ironmig/Navigator","description":"On board software for UF's NaviGator Autonomous Surface Vehicle","fork":true,"url":"https://api.github.com/repos/ironmig/Navigator","forks_url":"https://api.github.com/repos/ironmig/Navigator/forks","keys_url":"https://api.github.com/repos/ironmig/Navigator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ironmig/Navigator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ironmig/Navigator/teams","hooks_url":"https://api.github.com/repos/ironmig/Navigator/hooks","issue_events_url":"https://api.github.com/repos/ironmig/Navigator/issues/events{/number}","events_url":"https://api.github.com/repos/ironmig/Navigator/events","assignees_url":"https://api.github.com/repos/ironmig/Navigator/assignees{/user}","branches_url":"https://api.github.com/repos/ironmig/Navigator/branches{/branch}","tags_url":"https://api.github.com/repos/ironmig/Navigator/tags","blobs_url":"https://api.github.com/repos/ironmig/Navigator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ironmig/Navigator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ironmig/Navigator/git/refs{/sha}","trees_url":"https://api.github.com/repos/ironmig/Navigator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ironmig/Navigator/statuses/{sha}","languages_url":"https://api.github.com/repos/ironmig/Navigator/languages","stargazers_url":"https://api.github.com/repos/ironmig/Navigator/stargazers","contributors_url":"https://api.github.com/repos/ironmig/Navigator/contributors","subscribers_url":"https://api.github.com/repos/ironmig/Navigator/subscribers","subscription_url":"https://api.github.com/repos/ironmig/Navigator/subscription","commits_url":"https://api.github.com/repos/ironmig/Navigator/commits{/sha}","git_commits_url":"https://api.github.com/repos/ironmig/Navigator/git/commits{/sha}","comments_url":"https://api.github.com/repos/ironmig/Navigator/comments{/number}","issue_comment_url":"https://api.github.com/repos/ironmig/Navigator/issues/comments{/number}","contents_url":"https://api.github.com/repos/ironmig/Navigator/contents/{+path}","compare_url":"https://api.github.com/repos/ironmig/Navigator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ironmig/Navigator/merges","archive_url":"https://api.github.com/repos/ironmig/Navigator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ironmig/Navigator/downloads","issues_url":"https://api.github.com/repos/ironmig/Navigator/issues{/number}","pulls_url":"https://api.github.com/repos/ironmig/Navigator/pulls{/number}","milestones_url":"https://api.github.com/repos/ironmig/Navigator/milestones{/number}","notifications_url":"https://api.github.com/repos/ironmig/Navigator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ironmig/Navigator/labels{/name}","releases_url":"https://api.github.com/repos/ironmig/Navigator/releases{/id}","deployments_url":"https://api.github.com/repos/ironmig/Navigator/deployments","created_at":"2016-07-07T17:18:13Z","updated_at":"2016-07-07T17:18:14Z","pushed_at":"2016-11-15T06:00:39Z","git_url":"git://github.com/ironmig/Navigator.git","ssh_url":"git@github.com:ironmig/Navigator.git","clone_url":"https://github.com/ironmig/Navigator.git","svn_url":"https://github.com/ironmig/Navigator","homepage":"","size":3644,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"uf-mil:dev","ref":"dev","sha":"e439ddada38bbb79302c46ce9a091730db9b2e3d","user":{"login":"uf-mil","id":6162945,"avatar_url":"https://avatars.githubusercontent.com/u/6162945?v=3","gravatar_id":"","url":"https://api.github.com/users/uf-mil","html_url":"https://github.com/uf-mil","followers_url":"https://api.github.com/users/uf-mil/followers","following_url":"https://api.github.com/users/uf-mil/following{/other_user}","gists_url":"https://api.github.com/users/uf-mil/gists{/gist_id}","starred_url":"https://api.github.com/users/uf-mil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uf-mil/subscriptions","organizations_url":"https://api.github.com/users/uf-mil/orgs","repos_url":"https://api.github.com/users/uf-mil/repos","events_url":"https://api.github.com/users/uf-mil/events{/privacy}","received_events_url":"https://api.github.com/users/uf-mil/received_events","type":"Organization","site_admin":false},"repo":{"id":42456121,"name":"Navigator","full_name":"uf-mil/Navigator","owner":{"login":"uf-mil","id":6162945,"avatar_url":"https://avatars.githubusercontent.com/u/6162945?v=3","gravatar_id":"","url":"https://api.github.com/users/uf-mil","html_url":"https://github.com/uf-mil","followers_url":"https://api.github.com/users/uf-mil/followers","following_url":"https://api.github.com/users/uf-mil/following{/other_user}","gists_url":"https://api.github.com/users/uf-mil/gists{/gist_id}","starred_url":"https://api.github.com/users/uf-mil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uf-mil/subscriptions","organizations_url":"https://api.github.com/users/uf-mil/orgs","repos_url":"https://api.github.com/users/uf-mil/repos","events_url":"https://api.github.com/users/uf-mil/events{/privacy}","received_events_url":"https://api.github.com/users/uf-mil/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uf-mil/Navigator","description":"On board software for UF's NaviGator Autonomous Surface Vehicle","fork":false,"url":"https://api.github.com/repos/uf-mil/Navigator","forks_url":"https://api.github.com/repos/uf-mil/Navigator/forks","keys_url":"https://api.github.com/repos/uf-mil/Navigator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uf-mil/Navigator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uf-mil/Navigator/teams","hooks_url":"https://api.github.com/repos/uf-mil/Navigator/hooks","issue_events_url":"https://api.github.com/repos/uf-mil/Navigator/issues/events{/number}","events_url":"https://api.github.com/repos/uf-mil/Navigator/events","assignees_url":"https://api.github.com/repos/uf-mil/Navigator/assignees{/user}","branches_url":"https://api.github.com/repos/uf-mil/Navigator/branches{/branch}","tags_url":"https://api.github.com/repos/uf-mil/Navigator/tags","blobs_url":"https://api.github.com/repos/uf-mil/Navigator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uf-mil/Navigator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uf-mil/Navigator/git/refs{/sha}","trees_url":"https://api.github.com/repos/uf-mil/Navigator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uf-mil/Navigator/statuses/{sha}","languages_url":"https://api.github.com/repos/uf-mil/Navigator/languages","stargazers_url":"https://api.github.com/repos/uf-mil/Navigator/stargazers","contributors_url":"https://api.github.com/repos/uf-mil/Navigator/contributors","subscribers_url":"https://api.github.com/repos/uf-mil/Navigator/subscribers","subscription_url":"https://api.github.com/repos/uf-mil/Navigator/subscription","commits_url":"https://api.github.com/repos/uf-mil/Navigator/commits{/sha}","git_commits_url":"https://api.github.com/repos/uf-mil/Navigator/git/commits{/sha}","comments_url":"https://api.github.com/repos/uf-mil/Navigator/comments{/number}","issue_comment_url":"https://api.github.com/repos/uf-mil/Navigator/issues/comments{/number}","contents_url":"https://api.github.com/repos/uf-mil/Navigator/contents/{+path}","compare_url":"https://api.github.com/repos/uf-mil/Navigator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uf-mil/Navigator/merges","archive_url":"https://api.github.com/repos/uf-mil/Navigator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uf-mil/Navigator/downloads","issues_url":"https://api.github.com/repos/uf-mil/Navigator/issues{/number}","pulls_url":"https://api.github.com/repos/uf-mil/Navigator/pulls{/number}","milestones_url":"https://api.github.com/repos/uf-mil/Navigator/milestones{/number}","notifications_url":"https://api.github.com/repos/uf-mil/Navigator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uf-mil/Navigator/labels{/name}","releases_url":"https://api.github.com/repos/uf-mil/Navigator/releases{/id}","deployments_url":"https://api.github.com/repos/uf-mil/Navigator/deployments","created_at":"2015-09-14T15:07:13Z","updated_at":"2016-10-28T20:42:01Z","pushed_at":"2016-11-15T06:00:39Z","git_url":"git://github.com/uf-mil/Navigator.git","ssh_url":"git@github.com:uf-mil/Navigator.git","clone_url":"https://github.com/uf-mil/Navigator.git","svn_url":"https://github.com/uf-mil/Navigator","homepage":"","size":3826,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":13,"forks":14,"open_issues":13,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/131"},"html":{"href":"https://github.com/uf-mil/Navigator/pull/131"},"issue":{"href":"https://api.github.com/repos/uf-mil/Navigator/issues/131"},"comments":{"href":"https://api.github.com/repos/uf-mil/Navigator/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uf-mil/Navigator/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/uf-mil/Navigator/statuses/8f1513f8a0b939555391746c7f4d606aeb094627"}}}}
{"actor":{"display_login":"mattlangford"}}