{"action":"created","issue":{"url":"https://api.github.com/repos/ros/ros_comm/issues/606","labels_url":"https://api.github.com/repos/ros/ros_comm/issues/606/labels{/name}","comments_url":"https://api.github.com/repos/ros/ros_comm/issues/606/comments","events_url":"https://api.github.com/repos/ros/ros_comm/issues/606/events","html_url":"https://github.com/ros/ros_comm/pull/606","id":69602813,"number":606,"title":"rostopic: handling multiple array index specifications","user":{"login":"rhaschke","id":5376030,"avatar_url":"https://avatars.githubusercontent.com/u/5376030?v=3","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},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-04-20T14:42:06Z","updated_at":"2015-06-09T17:52:37Z","closed_at":"2015-06-09T17:52:35Z","pull_request":{"url":"https://api.github.com/repos/ros/ros_comm/pulls/606","html_url":"https://github.com/ros/ros_comm/pull/606","diff_url":"https://github.com/ros/ros_comm/pull/606.diff","patch_url":"https://github.com/ros/ros_comm/pull/606.patch"},"body":"Please consider this patch that fixes an issue with multiple array index specifications for subfields in rostopic echo. E.g.\r\n- `rostopic echo /tactile_mid_prox/sensors[1]/proximal[1]` failed with\r\n\r\n> Topic name 'sensors[1]/proximal' contains '[' but does not end with ']'\r\n\r\n- `rostopic echo /tactile_mid_prox/sensors[1]/proximal[1]` failed with\r\n\r\n> Topic name 'sensors[1]/proximal[1]' contains invalid slice argument '1]/proximal[1': non-integer array index step '1]/proximal[1'\r\n\r\nThe reason were two issues:\r\n- First, in function `msgevalgen`, it was assumed that there will be only a single index specification. I fixed, that by a) looking for the matching closing bracket (instead of using the whole rest of the string) and b) calling `msgevalgen` recursively on trailing sub fields.\r\n- Second, in function `_rostopic_echo` when extracting the `type_information` for the to-be-displayed values, a second index specification was not expected too, resulting in an attempt to extract the type for `subtype[]` instead of `subtype`. This was easily fixed, dropping the brackets."},"comment":{"url":"https://api.github.com/repos/ros/ros_comm/issues/comments/110445494","html_url":"https://github.com/ros/ros_comm/pull/606#issuecomment-110445494","issue_url":"https://api.github.com/repos/ros/ros_comm/issues/606","id":110445494,"user":{"login":"ros-pull-request-builder","id":7094544,"avatar_url":"https://avatars.githubusercontent.com/u/7094544?v=3","gravatar_id":"","url":"https://api.github.com/users/ros-pull-request-builder","html_url":"https://github.com/ros-pull-request-builder","followers_url":"https://api.github.com/users/ros-pull-request-builder/followers","following_url":"https://api.github.com/users/ros-pull-request-builder/following{/other_user}","gists_url":"https://api.github.com/users/ros-pull-request-builder/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-pull-request-builder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-pull-request-builder/subscriptions","organizations_url":"https://api.github.com/users/ros-pull-request-builder/orgs","repos_url":"https://api.github.com/users/ros-pull-request-builder/repos","events_url":"https://api.github.com/users/ros-pull-request-builder/events{/privacy}","received_events_url":"https://api.github.com/users/ros-pull-request-builder/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T17:52:37Z","updated_at":"2015-06-09T17:52:37Z","body":"Can one of the admins verify this patch?"}}