robonomics icon indicating copy to clipboard operation
robonomics copied to clipboard

RIO read ros doesn't work

Open Vourhey opened this issue 4 years ago • 0 comments

Robonomics IO read ros doesn't receive ROS messages

How to reproduce

roscore is launched. In one terminal run:

./robonomics io read ros /test_ros

In another one:

rostopic pub /test_ros std_msgs/String "data: 'Hi'"

Expected result

I expected to see Hi in the first window, but got nothing

rqt

Launch rqt, choose topic monitor and check /test_ros

 rqt
[ERROR] [1597994826.907225]: bad callback: <bound method TopicInfo.message_callback of <rqt_topic.topic_info.TopicInfo object at 0x7fcb94111220>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3.8/site-packages/std_msgs/msg/_String.py", line 57, in serialize
    buff.write(struct.pack('<I%ss'%length, length, _x))
TypeError: string argument expected, got 'bytes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3.8/site-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/opt/ros/noetic/lib/python3.8/site-packages/rqt_topic/topic_info.py", line 99, in message_callback
    message.serialize(buff)
  File "/opt/ros/noetic/lib/python3.8/site-packages/std_msgs/msg/_String.py", line 59, in serialize
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
  File "/opt/ros/noetic/lib/python3.8/site-packages/genpy/message.py", line 364, in _check_types
    raise SerializationError(str(exc))
genpy.message.SerializationError: <class 'TypeError'>: 'string argument expected, got 'bytes'' when writing 'b'Hi''

Vourhey avatar Aug 21 '20 07:08 Vourhey