{"action":"created","comment":{"url":"https://api.github.com/repos/ros-visualization/rviz/pulls/comments/168627690","pull_request_review_id":97029294,"id":168627690,"diff_hunk":"@@ -148,6 +157,41 @@ void MarkerBase::extractMaterials( Ogre::Entity *entity, S_MaterialPtr &material\n   }\n }\n \n+MarkerBase* createMarker(int marker_type, MarkerDisplay* owner, DisplayContext* context, Ogre::SceneNode* parent_node )\n+{\n+  switch (marker_type) {\n+  case visualization_msgs::Marker::CUBE:\n+  case visualization_msgs::Marker::CYLINDER:\n+  case visualization_msgs::Marker::SPHERE:\n+     return new rviz::ShapeMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::ARROW:\n+     return new rviz::ArrowMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::LINE_STRIP:\n+     return new rviz::LineStripMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::LINE_LIST:\n+     return new rviz::LineListMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::SPHERE_LIST:\n+  case visualization_msgs::Marker::CUBE_LIST:\n+  case visualization_msgs::Marker::POINTS:\n+     return new rviz::PointsMarker(owner, context, parent_node);\n \n+  case visualization_msgs::Marker::TEXT_VIEW_FACING:\n+     return new rviz::TextViewFacingMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::MESH_RESOURCE:\n+     return new rviz::MeshResourceMarker(owner, context, parent_node);\n+\n+  case visualization_msgs::Marker::TRIANGLE_LIST:\n+     return new rviz::TriangleListMarker(owner, context, parent_node);\n+\n+  default:\n+     ROS_ERROR(\"Unknown marker type: %d\", marker_type);","path":"src/rviz/default_plugin/markers/marker_base.cpp","position":null,"original_position":52,"commit_id":"80b5d06a4611e01256dfd5885768808b8c7d1f2a","original_commit_id":"2d558127a5fed31f17e9ff062f5ac2edcbc3285e","user":{"login":"rhaschke","id":5376030,"avatar_url":"https://avatars2.githubusercontent.com/u/5376030?v=4","gravatar_id":"","url":"https://api.github.com/users/rhaschke","html_url":"https://github.com/rhaschke","followers_url":"https://api.github.com/users/rhaschke/followers","following_url":"https://api.github.com/users/rhaschke/following{/other_user}","gists_url":"https://api.github.com/users/rhaschke/gists{/gist_id}","starred_url":"https://api.github.com/users/rhaschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhaschke/subscriptions","organizations_url":"https://api.github.com/users/rhaschke/orgs","repos_url":"https://api.github.com/users/rhaschke/repos","events_url":"https://api.github.com/users/rhaschke/events{/privacy}","received_events_url":"https://api.github.com/users/rhaschke/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2018-02-15T22:25:56Z","updated_at":"2018-02-15T22:25:57Z","html_url":"https://github.com/ros-visualization/rviz/pull/1183#discussion_r168627690","pull_request_url":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/comments/168627690"},"html":{"href":"https://github.com/ros-visualization/rviz/pull/1183#discussion_r168627690"},"pull_request":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183"}},"in_reply_to_id":168546854},"pull_request":{"url":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183","id":161313629,"html_url":"https://github.com/ros-visualization/rviz/pull/1183","diff_url":"https://github.com/ros-visualization/rviz/pull/1183.diff","patch_url":"https://github.com/ros-visualization/rviz/pull/1183.patch","issue_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1183","number":1183,"state":"open","locked":false,"title":"provide createMarker()","user":{"login":"rhaschke","id":5376030,"avatar_url":"https://avatars2.githubusercontent.com/u/5376030?v=4","gravatar_id":"","url":"https://api.github.com/users/rhaschke","html_url":"https://github.com/rhaschke","followers_url":"https://api.github.com/users/rhaschke/followers","following_url":"https://api.github.com/users/rhaschke/following{/other_user}","gists_url":"https://api.github.com/users/rhaschke/gists{/gist_id}","starred_url":"https://api.github.com/users/rhaschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhaschke/subscriptions","organizations_url":"https://api.github.com/users/rhaschke/orgs","repos_url":"https://api.github.com/users/rhaschke/repos","events_url":"https://api.github.com/users/rhaschke/events{/privacy}","received_events_url":"https://api.github.com/users/rhaschke/received_events","type":"User","site_admin":false},"body":"May I ask for a central `createMarker()` function to create an rviz Marker given a specific marker type?\r\nThis functionality was already coded twice in rviz itself and - as I need it in an external project now - I would go for another copy otherwise.\r\n\r\nThis PR provides the requested functionality to create markers based on the known marker types in `visualization_msgs::Marker` at the core location, which knows about all these types.\r\n","created_at":"2018-01-05T10:41:06Z","updated_at":"2018-02-15T22:25:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b9af37de537038708516d376b27137383a76e5a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183/commits","review_comments_url":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183/comments","review_comment_url":"https://api.github.com/repos/ros-visualization/rviz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros-visualization/rviz/issues/1183/comments","statuses_url":"https://api.github.com/repos/ros-visualization/rviz/statuses/80b5d06a4611e01256dfd5885768808b8c7d1f2a","head":{"label":"rhaschke:kinetic-devel","ref":"kinetic-devel","sha":"80b5d06a4611e01256dfd5885768808b8c7d1f2a","user":{"login":"rhaschke","id":5376030,"avatar_url":"https://avatars2.githubusercontent.com/u/5376030?v=4","gravatar_id":"","url":"https://api.github.com/users/rhaschke","html_url":"https://github.com/rhaschke","followers_url":"https://api.github.com/users/rhaschke/followers","following_url":"https://api.github.com/users/rhaschke/following{/other_user}","gists_url":"https://api.github.com/users/rhaschke/gists{/gist_id}","starred_url":"https://api.github.com/users/rhaschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhaschke/subscriptions","organizations_url":"https://api.github.com/users/rhaschke/orgs","repos_url":"https://api.github.com/users/rhaschke/repos","events_url":"https://api.github.com/users/rhaschke/events{/privacy}","received_events_url":"https://api.github.com/users/rhaschke/received_events","type":"User","site_admin":false},"repo":{"id":46640141,"name":"rviz","full_name":"rhaschke/rviz","owner":{"login":"rhaschke","id":5376030,"avatar_url":"https://avatars2.githubusercontent.com/u/5376030?v=4","gravatar_id":"","url":"https://api.github.com/users/rhaschke","html_url":"https://github.com/rhaschke","followers_url":"https://api.github.com/users/rhaschke/followers","following_url":"https://api.github.com/users/rhaschke/following{/other_user}","gists_url":"https://api.github.com/users/rhaschke/gists{/gist_id}","starred_url":"https://api.github.com/users/rhaschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhaschke/subscriptions","organizations_url":"https://api.github.com/users/rhaschke/orgs","repos_url":"https://api.github.com/users/rhaschke/repos","events_url":"https://api.github.com/users/rhaschke/events{/privacy}","received_events_url":"https://api.github.com/users/rhaschke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhaschke/rviz","description":"ROS 3D Robot Visualizer","fork":true,"url":"https://api.github.com/repos/rhaschke/rviz","forks_url":"https://api.github.com/repos/rhaschke/rviz/forks","keys_url":"https://api.github.com/repos/rhaschke/rviz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhaschke/rviz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhaschke/rviz/teams","hooks_url":"https://api.github.com/repos/rhaschke/rviz/hooks","issue_events_url":"https://api.github.com/repos/rhaschke/rviz/issues/events{/number}","events_url":"https://api.github.com/repos/rhaschke/rviz/events","assignees_url":"https://api.github.com/repos/rhaschke/rviz/assignees{/user}","branches_url":"https://api.github.com/repos/rhaschke/rviz/branches{/branch}","tags_url":"https://api.github.com/repos/rhaschke/rviz/tags","blobs_url":"https://api.github.com/repos/rhaschke/rviz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhaschke/rviz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhaschke/rviz/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhaschke/rviz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhaschke/rviz/statuses/{sha}","languages_url":"https://api.github.com/repos/rhaschke/rviz/languages","stargazers_url":"https://api.github.com/repos/rhaschke/rviz/stargazers","contributors_url":"https://api.github.com/repos/rhaschke/rviz/contributors","subscribers_url":"https://api.github.com/repos/rhaschke/rviz/subscribers","subscription_url":"https://api.github.com/repos/rhaschke/rviz/subscription","commits_url":"https://api.github.com/repos/rhaschke/rviz/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhaschke/rviz/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhaschke/rviz/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhaschke/rviz/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhaschke/rviz/contents/{+path}","compare_url":"https://api.github.com/repos/rhaschke/rviz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhaschke/rviz/merges","archive_url":"https://api.github.com/repos/rhaschke/rviz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhaschke/rviz/downloads","issues_url":"https://api.github.com/repos/rhaschke/rviz/issues{/number}","pulls_url":"https://api.github.com/repos/rhaschke/rviz/pulls{/number}","milestones_url":"https://api.github.com/repos/rhaschke/rviz/milestones{/number}","notifications_url":"https://api.github.com/repos/rhaschke/rviz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhaschke/rviz/labels{/name}","releases_url":"https://api.github.com/repos/rhaschke/rviz/releases{/id}","deployments_url":"https://api.github.com/repos/rhaschke/rviz/deployments","created_at":"2015-11-22T00:34:03Z","updated_at":"2016-01-13T13:24:54Z","pushed_at":"2018-02-15T22:22:41Z","git_url":"git://github.com/rhaschke/rviz.git","ssh_url":"git@github.com:rhaschke/rviz.git","clone_url":"https://github.com/rhaschke/rviz.git","svn_url":"https://github.com/rhaschke/rviz","homepage":null,"size":10824,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"kinetic-devel"}},"base":{"label":"ros-visualization:kinetic-devel","ref":"kinetic-devel","sha":"fe0512e6ce3c7d4ae54d57ec11c8cdd87acca4d5","user":{"login":"ros-visualization","id":2328629,"avatar_url":"https://avatars2.githubusercontent.com/u/2328629?v=4","gravatar_id":"","url":"https://api.github.com/users/ros-visualization","html_url":"https://github.com/ros-visualization","followers_url":"https://api.github.com/users/ros-visualization/followers","following_url":"https://api.github.com/users/ros-visualization/following{/other_user}","gists_url":"https://api.github.com/users/ros-visualization/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-visualization/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-visualization/subscriptions","organizations_url":"https://api.github.com/users/ros-visualization/orgs","repos_url":"https://api.github.com/users/ros-visualization/repos","events_url":"https://api.github.com/users/ros-visualization/events{/privacy}","received_events_url":"https://api.github.com/users/ros-visualization/received_events","type":"Organization","site_admin":false},"repo":{"id":5860736,"name":"rviz","full_name":"ros-visualization/rviz","owner":{"login":"ros-visualization","id":2328629,"avatar_url":"https://avatars2.githubusercontent.com/u/2328629?v=4","gravatar_id":"","url":"https://api.github.com/users/ros-visualization","html_url":"https://github.com/ros-visualization","followers_url":"https://api.github.com/users/ros-visualization/followers","following_url":"https://api.github.com/users/ros-visualization/following{/other_user}","gists_url":"https://api.github.com/users/ros-visualization/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-visualization/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-visualization/subscriptions","organizations_url":"https://api.github.com/users/ros-visualization/orgs","repos_url":"https://api.github.com/users/ros-visualization/repos","events_url":"https://api.github.com/users/ros-visualization/events{/privacy}","received_events_url":"https://api.github.com/users/ros-visualization/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-visualization/rviz","description":"ROS 3D Robot Visualizer","fork":false,"url":"https://api.github.com/repos/ros-visualization/rviz","forks_url":"https://api.github.com/repos/ros-visualization/rviz/forks","keys_url":"https://api.github.com/repos/ros-visualization/rviz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-visualization/rviz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-visualization/rviz/teams","hooks_url":"https://api.github.com/repos/ros-visualization/rviz/hooks","issue_events_url":"https://api.github.com/repos/ros-visualization/rviz/issues/events{/number}","events_url":"https://api.github.com/repos/ros-visualization/rviz/events","assignees_url":"https://api.github.com/repos/ros-visualization/rviz/assignees{/user}","branches_url":"https://api.github.com/repos/ros-visualization/rviz/branches{/branch}","tags_url":"https://api.github.com/repos/ros-visualization/rviz/tags","blobs_url":"https://api.github.com/repos/ros-visualization/rviz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-visualization/rviz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-visualization/rviz/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-visualization/rviz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-visualization/rviz/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-visualization/rviz/languages","stargazers_url":"https://api.github.com/repos/ros-visualization/rviz/stargazers","contributors_url":"https://api.github.com/repos/ros-visualization/rviz/contributors","subscribers_url":"https://api.github.com/repos/ros-visualization/rviz/subscribers","subscription_url":"https://api.github.com/repos/ros-visualization/rviz/subscription","commits_url":"https://api.github.com/repos/ros-visualization/rviz/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-visualization/rviz/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-visualization/rviz/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-visualization/rviz/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros-visualization/rviz/contents/{+path}","compare_url":"https://api.github.com/repos/ros-visualization/rviz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-visualization/rviz/merges","archive_url":"https://api.github.com/repos/ros-visualization/rviz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-visualization/rviz/downloads","issues_url":"https://api.github.com/repos/ros-visualization/rviz/issues{/number}","pulls_url":"https://api.github.com/repos/ros-visualization/rviz/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-visualization/rviz/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-visualization/rviz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-visualization/rviz/labels{/name}","releases_url":"https://api.github.com/repos/ros-visualization/rviz/releases{/id}","deployments_url":"https://api.github.com/repos/ros-visualization/rviz/deployments","created_at":"2012-09-18T18:15:03Z","updated_at":"2018-02-15T19:29:06Z","pushed_at":"2018-02-15T22:22:43Z","git_url":"git://github.com/ros-visualization/rviz.git","ssh_url":"git@github.com:ros-visualization/rviz.git","clone_url":"https://github.com/ros-visualization/rviz.git","svn_url":"https://github.com/ros-visualization/rviz","homepage":null,"size":10863,"stargazers_count":162,"watchers_count":162,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":215,"mirror_url":null,"archived":false,"open_issues_count":140,"license":null,"forks":215,"open_issues":140,"watchers":162,"default_branch":"kinetic-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183"},"html":{"href":"https://github.com/ros-visualization/rviz/pull/1183"},"issue":{"href":"https://api.github.com/repos/ros-visualization/rviz/issues/1183"},"comments":{"href":"https://api.github.com/repos/ros-visualization/rviz/issues/1183/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros-visualization/rviz/pulls/1183/commits"},"statuses":{"href":"https://api.github.com/repos/ros-visualization/rviz/statuses/80b5d06a4611e01256dfd5885768808b8c7d1f2a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rhaschke"}}