{"action":"created","comment":{"url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/comments/136451979","pull_request_review_id":59994058,"id":136451979,"diff_hunk":"@@ -0,0 +1,183 @@\n+/*********************************************************************\n+ *\n+ * Software License Agreement (BSD License)\n+ *\n+ *  Copyright (c) 2016, 6 River Systems\n+ *  All rights reserved.\n+ *\n+ *  Redistribution and use in source and binary forms, with or without\n+ *  modification, are permitted provided that the following conditions\n+ *  are met:\n+ *\n+ *   * Redistributions of source code must retain the above copyright\n+ *     notice, this list of conditions and the following disclaimer.\n+ *   * Redistributions in binary form must reproduce the above\n+ *     copyright notice, this list of conditions and the following\n+ *     disclaimer in the documentation and/or other materials provided\n+ *     with the distribution.\n+ *   * Neither the name of Willow Garage, Inc. nor the names of its\n+ *     contributors may be used to endorse or promote products derived\n+ *     from this software without specific prior written permission.\n+ *\n+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *  \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n+ *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n+ *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n+ *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n+ *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n+ *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n+ *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ *  POSSIBILITY OF SUCH DAMAGE.\n+ *\n+ * Author: Daniel Grieneisen\n+ *********************************************************************/\n+\n+#ifndef SPEED_COST_FUNCTION_H_\n+#define SPEED_COST_FUNCTION_H_\n+\n+#include <base_local_planner/critics/trajectory_cost_function.h>\n+#include <geometry_msgs/PoseStamped.h>\n+#include <costmap_2d/ObstructionMsg.h>\n+#include <tf/tf.h>\n+\n+namespace base_local_planner {\n+\n+/**\n+ * This class provides cost speed and distance from dynamic obstacles\n+ *\n+ * It will reject trajectories that are over a speed curve given distance to obstacles\n+ */\n+class SpeedCostFunction: public base_local_planner::TrajectoryCostFunction {\n+public:\n+  /**\n+   * Constructor\n+   */\n+  SpeedCostFunction();\n+\n+  /**\n+   * Destructor\n+   */\n+  ~SpeedCostFunction() {}\n+\n+  /**\n+   * Set the obstructions\n+   * @param obstructions\n+   */\n+  void setObstructions(std::shared_ptr<std::vector<costmap_2d::ObstructionMsg>> obstructions) {\n+    obstructions_ = obstructions;\n+  }\n+\n+  /**\n+   * Set the current pose of the robot\n+   * @param pose The current pose\n+   */\n+  void setCurrentPose(geometry_msgs::PoseStamped pose);\n+  /**\n+   * Prepare for operation.\n+   * @return true if preparations were successful\n+   */\n+  bool prepare();\n+\n+  /**\n+   * Scores the trajectory.  Returns a negative value for rejected trajectories.\n+   * @param traj The trajectory\n+   * @return Non-negative value if the trajectory is valid, negative otherwise.\n+   *     -1 indicates that it is in violation of the distance to obstruction metric\n+   */\n+  double scoreTrajectory(Trajectory &traj);\n+\n+  void setMaxVelocity(double vel) {","path":"base_local_planner/include/base_local_planner/critics/speed_cost_function.h","position":92,"original_position":92,"commit_id":"c0a8235ff7c1d9d31bcaddc1639f05c0d628012d","original_commit_id":"c0a8235ff7c1d9d31bcaddc1639f05c0d628012d","user":{"login":"dantwinkler","id":2089359,"avatar_url":"https://avatars2.githubusercontent.com/u/2089359?v=4","gravatar_id":"","url":"https://api.github.com/users/dantwinkler","html_url":"https://github.com/dantwinkler","followers_url":"https://api.github.com/users/dantwinkler/followers","following_url":"https://api.github.com/users/dantwinkler/following{/other_user}","gists_url":"https://api.github.com/users/dantwinkler/gists{/gist_id}","starred_url":"https://api.github.com/users/dantwinkler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantwinkler/subscriptions","organizations_url":"https://api.github.com/users/dantwinkler/orgs","repos_url":"https://api.github.com/users/dantwinkler/repos","events_url":"https://api.github.com/users/dantwinkler/events{/privacy}","received_events_url":"https://api.github.com/users/dantwinkler/received_events","type":"User","site_admin":false},"body":"Name should match variable (linear).","created_at":"2017-08-31T21:20:01Z","updated_at":"2017-08-31T21:20:01Z","html_url":"https://github.com/6RiverSystems/navigation/pull/49#discussion_r136451979","pull_request_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/comments/136451979"},"html":{"href":"https://github.com/6RiverSystems/navigation/pull/49#discussion_r136451979"},"pull_request":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49","id":138768509,"html_url":"https://github.com/6RiverSystems/navigation/pull/49","diff_url":"https://github.com/6RiverSystems/navigation/pull/49.diff","patch_url":"https://github.com/6RiverSystems/navigation/pull/49.patch","issue_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/49","number":49,"state":"open","locked":false,"title":"Feature/slow down dynamic obs","user":{"login":"grieneis","id":10405663,"avatar_url":"https://avatars2.githubusercontent.com/u/10405663?v=4","gravatar_id":"","url":"https://api.github.com/users/grieneis","html_url":"https://github.com/grieneis","followers_url":"https://api.github.com/users/grieneis/followers","following_url":"https://api.github.com/users/grieneis/following{/other_user}","gists_url":"https://api.github.com/users/grieneis/gists{/gist_id}","starred_url":"https://api.github.com/users/grieneis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grieneis/subscriptions","organizations_url":"https://api.github.com/users/grieneis/orgs","repos_url":"https://api.github.com/users/grieneis/repos","events_url":"https://api.github.com/users/grieneis/events{/privacy}","received_events_url":"https://api.github.com/users/grieneis/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-31T21:17:50Z","updated_at":"2017-08-31T21:20:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9246d5e95c8a5a65f3022d53503d5e919a1e47cf","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49/commits","review_comments_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49/comments","review_comment_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/49/comments","statuses_url":"https://api.github.com/repos/6RiverSystems/navigation/statuses/c0a8235ff7c1d9d31bcaddc1639f05c0d628012d","head":{"label":"6RiverSystems:feature/slow-down-dynamic-obs","ref":"feature/slow-down-dynamic-obs","sha":"c0a8235ff7c1d9d31bcaddc1639f05c0d628012d","user":{"login":"6RiverSystems","id":15053376,"avatar_url":"https://avatars0.githubusercontent.com/u/15053376?v=4","gravatar_id":"","url":"https://api.github.com/users/6RiverSystems","html_url":"https://github.com/6RiverSystems","followers_url":"https://api.github.com/users/6RiverSystems/followers","following_url":"https://api.github.com/users/6RiverSystems/following{/other_user}","gists_url":"https://api.github.com/users/6RiverSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/6RiverSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6RiverSystems/subscriptions","organizations_url":"https://api.github.com/users/6RiverSystems/orgs","repos_url":"https://api.github.com/users/6RiverSystems/repos","events_url":"https://api.github.com/users/6RiverSystems/events{/privacy}","received_events_url":"https://api.github.com/users/6RiverSystems/received_events","type":"Organization","site_admin":false},"repo":{"id":71017104,"name":"navigation","full_name":"6RiverSystems/navigation","owner":{"login":"6RiverSystems","id":15053376,"avatar_url":"https://avatars0.githubusercontent.com/u/15053376?v=4","gravatar_id":"","url":"https://api.github.com/users/6RiverSystems","html_url":"https://github.com/6RiverSystems","followers_url":"https://api.github.com/users/6RiverSystems/followers","following_url":"https://api.github.com/users/6RiverSystems/following{/other_user}","gists_url":"https://api.github.com/users/6RiverSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/6RiverSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6RiverSystems/subscriptions","organizations_url":"https://api.github.com/users/6RiverSystems/orgs","repos_url":"https://api.github.com/users/6RiverSystems/repos","events_url":"https://api.github.com/users/6RiverSystems/events{/privacy}","received_events_url":"https://api.github.com/users/6RiverSystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/6RiverSystems/navigation","description":"ROS Navigation stack.  Code for finding where the robot is and how it can get somewhere else.","fork":true,"url":"https://api.github.com/repos/6RiverSystems/navigation","forks_url":"https://api.github.com/repos/6RiverSystems/navigation/forks","keys_url":"https://api.github.com/repos/6RiverSystems/navigation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6RiverSystems/navigation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6RiverSystems/navigation/teams","hooks_url":"https://api.github.com/repos/6RiverSystems/navigation/hooks","issue_events_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/events{/number}","events_url":"https://api.github.com/repos/6RiverSystems/navigation/events","assignees_url":"https://api.github.com/repos/6RiverSystems/navigation/assignees{/user}","branches_url":"https://api.github.com/repos/6RiverSystems/navigation/branches{/branch}","tags_url":"https://api.github.com/repos/6RiverSystems/navigation/tags","blobs_url":"https://api.github.com/repos/6RiverSystems/navigation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6RiverSystems/navigation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6RiverSystems/navigation/git/refs{/sha}","trees_url":"https://api.github.com/repos/6RiverSystems/navigation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6RiverSystems/navigation/statuses/{sha}","languages_url":"https://api.github.com/repos/6RiverSystems/navigation/languages","stargazers_url":"https://api.github.com/repos/6RiverSystems/navigation/stargazers","contributors_url":"https://api.github.com/repos/6RiverSystems/navigation/contributors","subscribers_url":"https://api.github.com/repos/6RiverSystems/navigation/subscribers","subscription_url":"https://api.github.com/repos/6RiverSystems/navigation/subscription","commits_url":"https://api.github.com/repos/6RiverSystems/navigation/commits{/sha}","git_commits_url":"https://api.github.com/repos/6RiverSystems/navigation/git/commits{/sha}","comments_url":"https://api.github.com/repos/6RiverSystems/navigation/comments{/number}","issue_comment_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/comments{/number}","contents_url":"https://api.github.com/repos/6RiverSystems/navigation/contents/{+path}","compare_url":"https://api.github.com/repos/6RiverSystems/navigation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6RiverSystems/navigation/merges","archive_url":"https://api.github.com/repos/6RiverSystems/navigation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6RiverSystems/navigation/downloads","issues_url":"https://api.github.com/repos/6RiverSystems/navigation/issues{/number}","pulls_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls{/number}","milestones_url":"https://api.github.com/repos/6RiverSystems/navigation/milestones{/number}","notifications_url":"https://api.github.com/repos/6RiverSystems/navigation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6RiverSystems/navigation/labels{/name}","releases_url":"https://api.github.com/repos/6RiverSystems/navigation/releases{/id}","deployments_url":"https://api.github.com/repos/6RiverSystems/navigation/deployments","created_at":"2016-10-15T22:31:21Z","updated_at":"2016-10-15T22:31:23Z","pushed_at":"2017-08-31T21:17:50Z","git_url":"git://github.com/6RiverSystems/navigation.git","ssh_url":"git@github.com:6RiverSystems/navigation.git","clone_url":"https://github.com/6RiverSystems/navigation.git","svn_url":"https://github.com/6RiverSystems/navigation","homepage":null,"size":4564,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":false,"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":"indigo-devel"}},"base":{"label":"6RiverSystems:indigo-devel","ref":"indigo-devel","sha":"0b3a4bf8091d832aef427448672ed8096438f32f","user":{"login":"6RiverSystems","id":15053376,"avatar_url":"https://avatars0.githubusercontent.com/u/15053376?v=4","gravatar_id":"","url":"https://api.github.com/users/6RiverSystems","html_url":"https://github.com/6RiverSystems","followers_url":"https://api.github.com/users/6RiverSystems/followers","following_url":"https://api.github.com/users/6RiverSystems/following{/other_user}","gists_url":"https://api.github.com/users/6RiverSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/6RiverSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6RiverSystems/subscriptions","organizations_url":"https://api.github.com/users/6RiverSystems/orgs","repos_url":"https://api.github.com/users/6RiverSystems/repos","events_url":"https://api.github.com/users/6RiverSystems/events{/privacy}","received_events_url":"https://api.github.com/users/6RiverSystems/received_events","type":"Organization","site_admin":false},"repo":{"id":71017104,"name":"navigation","full_name":"6RiverSystems/navigation","owner":{"login":"6RiverSystems","id":15053376,"avatar_url":"https://avatars0.githubusercontent.com/u/15053376?v=4","gravatar_id":"","url":"https://api.github.com/users/6RiverSystems","html_url":"https://github.com/6RiverSystems","followers_url":"https://api.github.com/users/6RiverSystems/followers","following_url":"https://api.github.com/users/6RiverSystems/following{/other_user}","gists_url":"https://api.github.com/users/6RiverSystems/gists{/gist_id}","starred_url":"https://api.github.com/users/6RiverSystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6RiverSystems/subscriptions","organizations_url":"https://api.github.com/users/6RiverSystems/orgs","repos_url":"https://api.github.com/users/6RiverSystems/repos","events_url":"https://api.github.com/users/6RiverSystems/events{/privacy}","received_events_url":"https://api.github.com/users/6RiverSystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/6RiverSystems/navigation","description":"ROS Navigation stack.  Code for finding where the robot is and how it can get somewhere else.","fork":true,"url":"https://api.github.com/repos/6RiverSystems/navigation","forks_url":"https://api.github.com/repos/6RiverSystems/navigation/forks","keys_url":"https://api.github.com/repos/6RiverSystems/navigation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/6RiverSystems/navigation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/6RiverSystems/navigation/teams","hooks_url":"https://api.github.com/repos/6RiverSystems/navigation/hooks","issue_events_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/events{/number}","events_url":"https://api.github.com/repos/6RiverSystems/navigation/events","assignees_url":"https://api.github.com/repos/6RiverSystems/navigation/assignees{/user}","branches_url":"https://api.github.com/repos/6RiverSystems/navigation/branches{/branch}","tags_url":"https://api.github.com/repos/6RiverSystems/navigation/tags","blobs_url":"https://api.github.com/repos/6RiverSystems/navigation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/6RiverSystems/navigation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/6RiverSystems/navigation/git/refs{/sha}","trees_url":"https://api.github.com/repos/6RiverSystems/navigation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/6RiverSystems/navigation/statuses/{sha}","languages_url":"https://api.github.com/repos/6RiverSystems/navigation/languages","stargazers_url":"https://api.github.com/repos/6RiverSystems/navigation/stargazers","contributors_url":"https://api.github.com/repos/6RiverSystems/navigation/contributors","subscribers_url":"https://api.github.com/repos/6RiverSystems/navigation/subscribers","subscription_url":"https://api.github.com/repos/6RiverSystems/navigation/subscription","commits_url":"https://api.github.com/repos/6RiverSystems/navigation/commits{/sha}","git_commits_url":"https://api.github.com/repos/6RiverSystems/navigation/git/commits{/sha}","comments_url":"https://api.github.com/repos/6RiverSystems/navigation/comments{/number}","issue_comment_url":"https://api.github.com/repos/6RiverSystems/navigation/issues/comments{/number}","contents_url":"https://api.github.com/repos/6RiverSystems/navigation/contents/{+path}","compare_url":"https://api.github.com/repos/6RiverSystems/navigation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/6RiverSystems/navigation/merges","archive_url":"https://api.github.com/repos/6RiverSystems/navigation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/6RiverSystems/navigation/downloads","issues_url":"https://api.github.com/repos/6RiverSystems/navigation/issues{/number}","pulls_url":"https://api.github.com/repos/6RiverSystems/navigation/pulls{/number}","milestones_url":"https://api.github.com/repos/6RiverSystems/navigation/milestones{/number}","notifications_url":"https://api.github.com/repos/6RiverSystems/navigation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/6RiverSystems/navigation/labels{/name}","releases_url":"https://api.github.com/repos/6RiverSystems/navigation/releases{/id}","deployments_url":"https://api.github.com/repos/6RiverSystems/navigation/deployments","created_at":"2016-10-15T22:31:21Z","updated_at":"2016-10-15T22:31:23Z","pushed_at":"2017-08-31T21:17:50Z","git_url":"git://github.com/6RiverSystems/navigation.git","ssh_url":"git@github.com:6RiverSystems/navigation.git","clone_url":"https://github.com/6RiverSystems/navigation.git","svn_url":"https://github.com/6RiverSystems/navigation","homepage":null,"size":4564,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":false,"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":"indigo-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49"},"html":{"href":"https://github.com/6RiverSystems/navigation/pull/49"},"issue":{"href":"https://api.github.com/repos/6RiverSystems/navigation/issues/49"},"comments":{"href":"https://api.github.com/repos/6RiverSystems/navigation/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/6RiverSystems/navigation/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/6RiverSystems/navigation/statuses/c0a8235ff7c1d9d31bcaddc1639f05c0d628012d"}},"author_association":"NONE"}}
{"actor":{"display_login":"dantwinkler"}}