0
$\begingroup$

Rosanswers logo

Recently switched to groovy and rostopic doesn't seem to be able to handle arrays anymore. Does anyone know why?

Example for me, from a simple topic with a list of doubles: rostopic echo /robot/joint_states/position[1]

Results in:

Traceback (most recent call last):   File "/opt/ros/groovy/bin/rostopic", line 35, in <module>
    rostopic.rostopicmain()   File "/opt/ros/groovy/lib/python2.7/dist-packages/rostopic/__init__.py", line 1666, in rostopicmain
    _rostopic_cmd_echo(argv)   File "/opt/ros/groovy/lib/python2.7/dist-packages/rostopic/__init__.py", line 1026, in _rostopic_cmd_echo
    _rostopic_echo(topic, callback_echo, bag_file=options.bag)   File "/opt/ros/groovy/lib/python2.7/dist-packages/rostopic/__init__.py", line 692, in _rostopic_echo
    index = submsg_class.__slots__.index(field) ValueError: 'position[1]' is not in list`

Originally posted by mattadc on ROS Answers with karma: 3 on 2013-08-14

Post score: 0


Original comments

Comment by SL Remy on 2013-08-15:
Are you sure that that topic is correct? Can you update this question with the results of rostopic info /robot/joint_states ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It looks like a regression of https://github.com/ros/ros_comm/issues/242

It is fixed in https://github.com/ros/ros_comm/commit/2af3d693645f084086ef0a5c50f9b666ea0fc1fd and will be available with the next ros_comm release (1.9.48).


Originally posted by Dirk Thomas with karma: 16276 on 2013-08-15

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by mattadc on 2013-08-16:
Yes, this fixed the problem. Thank!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.