{"action":"created","comment":{"url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/comments/33501599","id":33501599,"diff_hunk":"@@ -996,48 +996,33 @@ PlanningGraph::LinearWeightResult PlanningGraph::linearWeight(const JointTraject\n   LinearWeightResult result;\n   result.first = false;\n \n-  // Retrieve the nominal joint position\n-  std::vector<std::vector<double> > joint_poses_start;\n-  start.getJointPoses(*robot_model_, joint_poses_start);\n-\n-  std::vector<std::vector<double> > joint_poses_end;\n-  end.getJointPoses(*robot_model_, joint_poses_end);\n-\n-  // each should only return one\n-  if (joint_poses_start.size() == 1 && joint_poses_end.size() == 1)\n-  {\n-    const std::vector<double>& start_vector = joint_poses_start[0];\n-    const std::vector<double>& end_vector = joint_poses_end[0];\n-    if (start_vector.size() == end_vector.size())\n+  const std::vector<double>& start_vector = start.nominal();\n+  const std::vector<double>& end_vector = end.nominal();\n+  if (start_vector.size() == end_vector.size())\n+  {\n+    // Check to see if time is specified and if so, check to see if the\n+    // joint motion is possible in the window provided\n+    if (end.getTiming().isSpecified() &&\n+        !robot_model_->isValidMove(start_vector, end_vector, end.getTiming().upper))\n     {\n-      // Check to see if time is specified and if so, check to see if the\n-      // joint motion is possible in the window provided\n-      if (end.getTiming().isSpecified() &&\n-          !robot_model_->isValidMove(start_vector, end_vector, end.getTiming().upper))\n-      {\n-        return result;\n-      }\n-\n-      double vector_diff = 0;\n-      for (unsigned i = 0; i < start_vector.size(); i++)\n-      {\n-        double joint_diff = std::abs(end_vector[i] - start_vector[i]);\n-        vector_diff += joint_diff ;\n-      }\n-\n-      result.first = true;\n-      result.second = vector_diff;\n       return result;","path":"descartes_planner/src/planning_graph.cpp","position":43,"original_position":43,"commit_id":"4d438955e3f095da4c481e06871df0df456b8ee5","original_commit_id":"4d438955e3f095da4c481e06871df0df456b8ee5","user":{"login":"jrgnicho","id":3279718,"avatar_url":"https://avatars.githubusercontent.com/u/3279718?v=3","gravatar_id":"","url":"https://api.github.com/users/jrgnicho","html_url":"https://github.com/jrgnicho","followers_url":"https://api.github.com/users/jrgnicho/followers","following_url":"https://api.github.com/users/jrgnicho/following{/other_user}","gists_url":"https://api.github.com/users/jrgnicho/gists{/gist_id}","starred_url":"https://api.github.com/users/jrgnicho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrgnicho/subscriptions","organizations_url":"https://api.github.com/users/jrgnicho/orgs","repos_url":"https://api.github.com/users/jrgnicho/repos","events_url":"https://api.github.com/users/jrgnicho/events{/privacy}","received_events_url":"https://api.github.com/users/jrgnicho/received_events","type":"User","site_admin":false},"body":"+1","created_at":"2015-06-29T19:23:13Z","updated_at":"2015-06-29T19:23:13Z","html_url":"https://github.com/ros-industrial-consortium/descartes/pull/127#discussion_r33501599","pull_request_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/comments/33501599"},"html":{"href":"https://github.com/ros-industrial-consortium/descartes/pull/127#discussion_r33501599"},"pull_request":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127","id":38790774,"html_url":"https://github.com/ros-industrial-consortium/descartes/pull/127","diff_url":"https://github.com/ros-industrial-consortium/descartes/pull/127.diff","patch_url":"https://github.com/ros-industrial-consortium/descartes/pull/127.patch","issue_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/127","number":127,"state":"open","locked":false,"title":"Updated the linearWeight function to use the new 'nominal' function in JointTrajectoryPt","user":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"body":"This reduces copying by a huge amount, allowing the graph to build twice as fast for edge heavy graphs. The diff below looks kinda gnarly but all I did was remove the outer-most if check and the cruft related to calling ```getJointPoses```.","created_at":"2015-06-29T16:18:05Z","updated_at":"2015-06-29T19:23:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8991bd0051f74ac5d578f091b1109b7a7355a4e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127/commits","review_comments_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127/comments","review_comment_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/127/comments","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/statuses/4d438955e3f095da4c481e06871df0df456b8ee5","head":{"label":"Jmeyer1292:planning_graph_nominal_joints","ref":"planning_graph_nominal_joints","sha":"4d438955e3f095da4c481e06871df0df456b8ee5","user":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"repo":{"id":30791141,"name":"descartes","full_name":"Jmeyer1292/descartes","owner":{"login":"Jmeyer1292","id":4960180,"avatar_url":"https://avatars.githubusercontent.com/u/4960180?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyer1292","html_url":"https://github.com/Jmeyer1292","followers_url":"https://api.github.com/users/Jmeyer1292/followers","following_url":"https://api.github.com/users/Jmeyer1292/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyer1292/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyer1292/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyer1292/subscriptions","organizations_url":"https://api.github.com/users/Jmeyer1292/orgs","repos_url":"https://api.github.com/users/Jmeyer1292/repos","events_url":"https://api.github.com/users/Jmeyer1292/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyer1292/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Jmeyer1292/descartes","description":"ROS-Industrial Special Project: Cartesian Path Planner","fork":true,"url":"https://api.github.com/repos/Jmeyer1292/descartes","forks_url":"https://api.github.com/repos/Jmeyer1292/descartes/forks","keys_url":"https://api.github.com/repos/Jmeyer1292/descartes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Jmeyer1292/descartes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Jmeyer1292/descartes/teams","hooks_url":"https://api.github.com/repos/Jmeyer1292/descartes/hooks","issue_events_url":"https://api.github.com/repos/Jmeyer1292/descartes/issues/events{/number}","events_url":"https://api.github.com/repos/Jmeyer1292/descartes/events","assignees_url":"https://api.github.com/repos/Jmeyer1292/descartes/assignees{/user}","branches_url":"https://api.github.com/repos/Jmeyer1292/descartes/branches{/branch}","tags_url":"https://api.github.com/repos/Jmeyer1292/descartes/tags","blobs_url":"https://api.github.com/repos/Jmeyer1292/descartes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Jmeyer1292/descartes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Jmeyer1292/descartes/git/refs{/sha}","trees_url":"https://api.github.com/repos/Jmeyer1292/descartes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Jmeyer1292/descartes/statuses/{sha}","languages_url":"https://api.github.com/repos/Jmeyer1292/descartes/languages","stargazers_url":"https://api.github.com/repos/Jmeyer1292/descartes/stargazers","contributors_url":"https://api.github.com/repos/Jmeyer1292/descartes/contributors","subscribers_url":"https://api.github.com/repos/Jmeyer1292/descartes/subscribers","subscription_url":"https://api.github.com/repos/Jmeyer1292/descartes/subscription","commits_url":"https://api.github.com/repos/Jmeyer1292/descartes/commits{/sha}","git_commits_url":"https://api.github.com/repos/Jmeyer1292/descartes/git/commits{/sha}","comments_url":"https://api.github.com/repos/Jmeyer1292/descartes/comments{/number}","issue_comment_url":"https://api.github.com/repos/Jmeyer1292/descartes/issues/comments{/number}","contents_url":"https://api.github.com/repos/Jmeyer1292/descartes/contents/{+path}","compare_url":"https://api.github.com/repos/Jmeyer1292/descartes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Jmeyer1292/descartes/merges","archive_url":"https://api.github.com/repos/Jmeyer1292/descartes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Jmeyer1292/descartes/downloads","issues_url":"https://api.github.com/repos/Jmeyer1292/descartes/issues{/number}","pulls_url":"https://api.github.com/repos/Jmeyer1292/descartes/pulls{/number}","milestones_url":"https://api.github.com/repos/Jmeyer1292/descartes/milestones{/number}","notifications_url":"https://api.github.com/repos/Jmeyer1292/descartes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Jmeyer1292/descartes/labels{/name}","releases_url":"https://api.github.com/repos/Jmeyer1292/descartes/releases{/id}","created_at":"2015-02-14T08:17:36Z","updated_at":"2015-04-28T16:22:19Z","pushed_at":"2015-06-29T16:22:29Z","git_url":"git://github.com/Jmeyer1292/descartes.git","ssh_url":"git@github.com:Jmeyer1292/descartes.git","clone_url":"https://github.com/Jmeyer1292/descartes.git","svn_url":"https://github.com/Jmeyer1292/descartes","homepage":"","size":786,"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":"hydro-devel"}},"base":{"label":"ros-industrial-consortium:hydro-devel","ref":"hydro-devel","sha":"cca3078a4650893e9f428e31567eb705eba6c86b","user":{"login":"ros-industrial-consortium","id":6336074,"avatar_url":"https://avatars.githubusercontent.com/u/6336074?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-industrial-consortium","html_url":"https://github.com/ros-industrial-consortium","followers_url":"https://api.github.com/users/ros-industrial-consortium/followers","following_url":"https://api.github.com/users/ros-industrial-consortium/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial-consortium/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial-consortium/orgs","repos_url":"https://api.github.com/users/ros-industrial-consortium/repos","events_url":"https://api.github.com/users/ros-industrial-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial-consortium/received_events","type":"Organization","site_admin":false},"repo":{"id":19514912,"name":"descartes","full_name":"ros-industrial-consortium/descartes","owner":{"login":"ros-industrial-consortium","id":6336074,"avatar_url":"https://avatars.githubusercontent.com/u/6336074?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-industrial-consortium","html_url":"https://github.com/ros-industrial-consortium","followers_url":"https://api.github.com/users/ros-industrial-consortium/followers","following_url":"https://api.github.com/users/ros-industrial-consortium/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial-consortium/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial-consortium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial-consortium/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial-consortium/orgs","repos_url":"https://api.github.com/users/ros-industrial-consortium/repos","events_url":"https://api.github.com/users/ros-industrial-consortium/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial-consortium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-industrial-consortium/descartes","description":"ROS-Industrial Special Project: Cartesian Path Planner","fork":false,"url":"https://api.github.com/repos/ros-industrial-consortium/descartes","forks_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/forks","keys_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/teams","hooks_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/hooks","issue_events_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/events{/number}","events_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/events","assignees_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/assignees{/user}","branches_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/branches{/branch}","tags_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/tags","blobs_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/languages","stargazers_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/stargazers","contributors_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/contributors","subscribers_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/subscribers","subscription_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/subscription","commits_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/contents/{+path}","compare_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/merges","archive_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/downloads","issues_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues{/number}","pulls_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/labels{/name}","releases_url":"https://api.github.com/repos/ros-industrial-consortium/descartes/releases{/id}","created_at":"2014-05-06T23:55:32Z","updated_at":"2015-04-28T20:22:11Z","pushed_at":"2015-06-29T16:18:05Z","git_url":"git://github.com/ros-industrial-consortium/descartes.git","ssh_url":"git@github.com:ros-industrial-consortium/descartes.git","clone_url":"https://github.com/ros-industrial-consortium/descartes.git","svn_url":"https://github.com/ros-industrial-consortium/descartes","homepage":"","size":1625,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":28,"forks":8,"open_issues":28,"watchers":8,"default_branch":"hydro-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127"},"html":{"href":"https://github.com/ros-industrial-consortium/descartes/pull/127"},"issue":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/127"},"comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/ros-industrial-consortium/descartes/statuses/4d438955e3f095da4c481e06871df0df456b8ee5"}}}}