{"action":"created","comment":{"url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/comments/76595661","id":76595661,"diff_hunk":"@@ -0,0 +1,139 @@\n+/*********************************************************************\n+* Software License Agreement (BSD License)\n+*\n+*  Copyright (c) 2016, Delft Robotics\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 the copyright holder 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+\n+/** \\Author Maarten de Vries <maarten@de-vri.es> */\n+\n+#include <geometric_shapes/mesh_operations.h>\n+#include <gtest/gtest.h>\n+#include <string>\n+\n+namespace {\n+\n+std::string makeDaeModel(std::string const & up_axis) {","path":"test/test_create_mesh.cpp","position":43,"original_position":43,"commit_id":"7df2e92de8782939f720632370ec95ffae6e1531","original_commit_id":"7df2e92de8782939f720632370ec95ffae6e1531","user":{"login":"de-vri-es","id":786213,"avatar_url":"https://avatars.githubusercontent.com/u/786213?v=3","gravatar_id":"","url":"https://api.github.com/users/de-vri-es","html_url":"https://github.com/de-vri-es","followers_url":"https://api.github.com/users/de-vri-es/followers","following_url":"https://api.github.com/users/de-vri-es/following{/other_user}","gists_url":"https://api.github.com/users/de-vri-es/gists{/gist_id}","starred_url":"https://api.github.com/users/de-vri-es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/de-vri-es/subscriptions","organizations_url":"https://api.github.com/users/de-vri-es/orgs","repos_url":"https://api.github.com/users/de-vri-es/repos","events_url":"https://api.github.com/users/de-vri-es/events{/privacy}","received_events_url":"https://api.github.com/users/de-vri-es/received_events","type":"User","site_admin":false},"body":"True. What is the preferred method of making the file available at runtime then? Use a `package://` URL (already supported by `geometric_shapes`, so no new dependency) and require the environment to be set up with a proper `ROS_PACKAGE_PATH`? I imagine that the `run_tests` target of the generated `Makefile` already sets up the environment correctly?\r\n\r\nAlternatively the file can exist in the source tree and be linked in to the executable as a binary blob, but I imagine this is less standard for ROS packages.","created_at":"2016-08-29T12:07:18Z","updated_at":"2016-08-29T12:07:18Z","html_url":"https://github.com/ros-planning/geometric_shapes/pull/52#discussion_r76595661","pull_request_url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/comments/76595661"},"html":{"href":"https://github.com/ros-planning/geometric_shapes/pull/52#discussion_r76595661"},"pull_request":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52","id":82800529,"html_url":"https://github.com/ros-planning/geometric_shapes/pull/52","diff_url":"https://github.com/ros-planning/geometric_shapes/pull/52.diff","patch_url":"https://github.com/ros-planning/geometric_shapes/pull/52.patch","issue_url":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/52","number":52,"state":"open","locked":false,"title":"Clear root transformation on imported Collada meshes.","user":{"login":"de-vri-es","id":786213,"avatar_url":"https://avatars.githubusercontent.com/u/786213?v=3","gravatar_id":"","url":"https://api.github.com/users/de-vri-es","html_url":"https://github.com/de-vri-es","followers_url":"https://api.github.com/users/de-vri-es/followers","following_url":"https://api.github.com/users/de-vri-es/following{/other_user}","gists_url":"https://api.github.com/users/de-vri-es/gists{/gist_id}","starred_url":"https://api.github.com/users/de-vri-es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/de-vri-es/subscriptions","organizations_url":"https://api.github.com/users/de-vri-es/orgs","repos_url":"https://api.github.com/users/de-vri-es/repos","events_url":"https://api.github.com/users/de-vri-es/events{/privacy}","received_events_url":"https://api.github.com/users/de-vri-es/received_events","type":"User","site_admin":false},"body":"Assimp enforces a Y_UP convention when importing file formats that store this metadata, such as the collada format with the `<up_axes>` tag. If an imported model is using a different convention such as Z_UP, the whole model is rotated until the Y axis of the model is pointing up [1]. This is both confusing and not in-line with the ROS convention where the Z axis is pointing up.\r\n\r\nEven worse, it causes collision checks on most collada models to use this wrongly rotated model. Rviz is already undoing this rotation[2], so the collision mesh used by moveit doesn't even match the collision mesh as visualized by rviz.\r\n\r\nIt is conceivable though that the root node transformation may be used for legit purposes with other file types, so this PR limits itself to files with `dae` or `zae` extension.\r\n\r\nI made a small test case which publishes three meshes as markers [3]: a collada model with Z_UP, one with Y_UP and an stl model. Without this patch the Z_UP model is rotated, with the patch all three models are the same and the metadata is basically ignored.\r\n\r\nAnother option would be to assume Y is pointing up after import and rotate the model to make Z point up again. This would be in line with the ROS convention. However, this would still leave a mismatch with rviz, and frankly I think that Assimp adjusting the model orientation based on this metadata is misguided in the first place. I think that what was X in the CAD program or 3D modelling software should remain X after importing.\r\n\r\n[1] https://github.com/assimp/assimp/blob/23baecaff30b7a280648834368b1c0c792e4092e/code/ColladaLoader.cpp#L192\r\n[2] https://github.com/ros-visualization/rviz/blob/0d423d6249a39f7f3ddd591007952c6dc940b6ac/src/rviz/mesh_loader.cpp#L232\r\n[3] https://github.com/de-vri-es/test_load_mesh","created_at":"2016-08-25T21:57:42Z","updated_at":"2016-08-29T12:07:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"249a4c30d17e5c84e98919f4c0827cb5919de28e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52/commits","review_comments_url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52/comments","review_comment_url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/52/comments","statuses_url":"https://api.github.com/repos/ros-planning/geometric_shapes/statuses/7df2e92de8782939f720632370ec95ffae6e1531","head":{"label":"delftrobotics-forks:assimp-unrotate","ref":"assimp-unrotate","sha":"7df2e92de8782939f720632370ec95ffae6e1531","user":{"login":"delftrobotics-forks","id":21259075,"avatar_url":"https://avatars.githubusercontent.com/u/21259075?v=3","gravatar_id":"","url":"https://api.github.com/users/delftrobotics-forks","html_url":"https://github.com/delftrobotics-forks","followers_url":"https://api.github.com/users/delftrobotics-forks/followers","following_url":"https://api.github.com/users/delftrobotics-forks/following{/other_user}","gists_url":"https://api.github.com/users/delftrobotics-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/delftrobotics-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftrobotics-forks/subscriptions","organizations_url":"https://api.github.com/users/delftrobotics-forks/orgs","repos_url":"https://api.github.com/users/delftrobotics-forks/repos","events_url":"https://api.github.com/users/delftrobotics-forks/events{/privacy}","received_events_url":"https://api.github.com/users/delftrobotics-forks/received_events","type":"Organization","site_admin":false},"repo":{"id":63874807,"name":"geometric_shapes","full_name":"delftrobotics-forks/geometric_shapes","owner":{"login":"delftrobotics-forks","id":21259075,"avatar_url":"https://avatars.githubusercontent.com/u/21259075?v=3","gravatar_id":"","url":"https://api.github.com/users/delftrobotics-forks","html_url":"https://github.com/delftrobotics-forks","followers_url":"https://api.github.com/users/delftrobotics-forks/followers","following_url":"https://api.github.com/users/delftrobotics-forks/following{/other_user}","gists_url":"https://api.github.com/users/delftrobotics-forks/gists{/gist_id}","starred_url":"https://api.github.com/users/delftrobotics-forks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delftrobotics-forks/subscriptions","organizations_url":"https://api.github.com/users/delftrobotics-forks/orgs","repos_url":"https://api.github.com/users/delftrobotics-forks/repos","events_url":"https://api.github.com/users/delftrobotics-forks/events{/privacy}","received_events_url":"https://api.github.com/users/delftrobotics-forks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/delftrobotics-forks/geometric_shapes","description":"Representation of geometric shapes","fork":true,"url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes","forks_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/forks","keys_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/teams","hooks_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/hooks","issue_events_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/issues/events{/number}","events_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/events","assignees_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/assignees{/user}","branches_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/branches{/branch}","tags_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/tags","blobs_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/git/refs{/sha}","trees_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/statuses/{sha}","languages_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/languages","stargazers_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/stargazers","contributors_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/contributors","subscribers_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/subscribers","subscription_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/subscription","commits_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/commits{/sha}","git_commits_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/git/commits{/sha}","comments_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/comments{/number}","issue_comment_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/issues/comments{/number}","contents_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/contents/{+path}","compare_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/merges","archive_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/downloads","issues_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/issues{/number}","pulls_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/pulls{/number}","milestones_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/milestones{/number}","notifications_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/labels{/name}","releases_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/releases{/id}","deployments_url":"https://api.github.com/repos/delftrobotics-forks/geometric_shapes/deployments","created_at":"2016-07-21T14:08:49Z","updated_at":"2016-08-26T11:22:02Z","pushed_at":"2016-08-28T20:45:06Z","git_url":"git://github.com/delftrobotics-forks/geometric_shapes.git","ssh_url":"git@github.com:delftrobotics-forks/geometric_shapes.git","clone_url":"https://github.com/delftrobotics-forks/geometric_shapes.git","svn_url":"https://github.com/delftrobotics-forks/geometric_shapes","homepage":null,"size":184,"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":"kinetic-devel"}},"base":{"label":"ros-planning:kinetic-devel","ref":"kinetic-devel","sha":"7de74c13c3ac3c40537c458c0faeccb334997b35","user":{"login":"ros-planning","id":2328631,"avatar_url":"https://avatars.githubusercontent.com/u/2328631?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-planning","html_url":"https://github.com/ros-planning","followers_url":"https://api.github.com/users/ros-planning/followers","following_url":"https://api.github.com/users/ros-planning/following{/other_user}","gists_url":"https://api.github.com/users/ros-planning/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-planning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-planning/subscriptions","organizations_url":"https://api.github.com/users/ros-planning/orgs","repos_url":"https://api.github.com/users/ros-planning/repos","events_url":"https://api.github.com/users/ros-planning/events{/privacy}","received_events_url":"https://api.github.com/users/ros-planning/received_events","type":"Organization","site_admin":false},"repo":{"id":6668676,"name":"geometric_shapes","full_name":"ros-planning/geometric_shapes","owner":{"login":"ros-planning","id":2328631,"avatar_url":"https://avatars.githubusercontent.com/u/2328631?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-planning","html_url":"https://github.com/ros-planning","followers_url":"https://api.github.com/users/ros-planning/followers","following_url":"https://api.github.com/users/ros-planning/following{/other_user}","gists_url":"https://api.github.com/users/ros-planning/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-planning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-planning/subscriptions","organizations_url":"https://api.github.com/users/ros-planning/orgs","repos_url":"https://api.github.com/users/ros-planning/repos","events_url":"https://api.github.com/users/ros-planning/events{/privacy}","received_events_url":"https://api.github.com/users/ros-planning/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-planning/geometric_shapes","description":"Representation of geometric shapes","fork":false,"url":"https://api.github.com/repos/ros-planning/geometric_shapes","forks_url":"https://api.github.com/repos/ros-planning/geometric_shapes/forks","keys_url":"https://api.github.com/repos/ros-planning/geometric_shapes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-planning/geometric_shapes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-planning/geometric_shapes/teams","hooks_url":"https://api.github.com/repos/ros-planning/geometric_shapes/hooks","issue_events_url":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/events{/number}","events_url":"https://api.github.com/repos/ros-planning/geometric_shapes/events","assignees_url":"https://api.github.com/repos/ros-planning/geometric_shapes/assignees{/user}","branches_url":"https://api.github.com/repos/ros-planning/geometric_shapes/branches{/branch}","tags_url":"https://api.github.com/repos/ros-planning/geometric_shapes/tags","blobs_url":"https://api.github.com/repos/ros-planning/geometric_shapes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-planning/geometric_shapes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-planning/geometric_shapes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-planning/geometric_shapes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-planning/geometric_shapes/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-planning/geometric_shapes/languages","stargazers_url":"https://api.github.com/repos/ros-planning/geometric_shapes/stargazers","contributors_url":"https://api.github.com/repos/ros-planning/geometric_shapes/contributors","subscribers_url":"https://api.github.com/repos/ros-planning/geometric_shapes/subscribers","subscription_url":"https://api.github.com/repos/ros-planning/geometric_shapes/subscription","commits_url":"https://api.github.com/repos/ros-planning/geometric_shapes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-planning/geometric_shapes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-planning/geometric_shapes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros-planning/geometric_shapes/contents/{+path}","compare_url":"https://api.github.com/repos/ros-planning/geometric_shapes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-planning/geometric_shapes/merges","archive_url":"https://api.github.com/repos/ros-planning/geometric_shapes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-planning/geometric_shapes/downloads","issues_url":"https://api.github.com/repos/ros-planning/geometric_shapes/issues{/number}","pulls_url":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-planning/geometric_shapes/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-planning/geometric_shapes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-planning/geometric_shapes/labels{/name}","releases_url":"https://api.github.com/repos/ros-planning/geometric_shapes/releases{/id}","deployments_url":"https://api.github.com/repos/ros-planning/geometric_shapes/deployments","created_at":"2012-11-13T10:07:18Z","updated_at":"2016-02-04T02:34:55Z","pushed_at":"2016-08-28T20:45:07Z","git_url":"git://github.com/ros-planning/geometric_shapes.git","ssh_url":"git@github.com:ros-planning/geometric_shapes.git","clone_url":"https://github.com/ros-planning/geometric_shapes.git","svn_url":"https://github.com/ros-planning/geometric_shapes","homepage":null,"size":417,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":8,"forks":24,"open_issues":8,"watchers":1,"default_branch":"kinetic-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52"},"html":{"href":"https://github.com/ros-planning/geometric_shapes/pull/52"},"issue":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/52"},"comments":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/ros-planning/geometric_shapes/statuses/7df2e92de8782939f720632370ec95ffae6e1531"}}}}
{"actor":{"display_login":"de-vri-es"}}