ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

fpgamcu's profile - activity

2023-02-23 01:50:02 -0500 received badge  Nice Question (source)
2019-06-05 10:23:40 -0500 received badge  Student (source)
2018-09-14 17:29:18 -0500 marked best answer ByteMultiArray publish fails if data > 10 bytes

I have next code:

data = file.read()  
arr = ByteMultiArray()  
arr.data = list(bytearray(data))  
arr.layout.dim.append(MultiArrayDimension())  
arr.layout.dim[0].label = "soundfile"  
arr.layout.dim[0].size = len(arr.data)  
arr.layout.dim[0].stride = len(arr.data)  
arr.layout.data_offset = 0  
pub.publish(arr)

When data 10 and less publish succeed When data > 10 I have

rospy.exceptions.ROSSerializationException: field data[] exceeds specified width [byte]
2018-09-14 17:27:32 -0500 received badge  Famous Question (source)
2017-11-29 06:22:30 -0500 commented answer ByteMultiArray publish fails if data > 10 bytes

With stride = 1 still same error.

2017-11-28 05:00:31 -0500 received badge  Notable Question (source)
2017-11-27 16:00:11 -0500 received badge  Popular Question (source)
2017-11-27 13:00:55 -0500 asked a question ByteMultiArray publish fails if data > 10 bytes

ByteMultiArray publish fails if data > 10 bytes I have next code: data = file.read() arr = ByteMultiArray() arr.