org.ros.internal.message.$Proxy2 cannot be cast to std_msgs.Int16MultiArray

asked 2014-04-28 10:53:45 -0600

wenjia gravatar image

When sending audio message from my android device to the ros in pc, I got this error. My code is like:

final Publisher<int16multiarray> publisher_audio = connectedNode.newPublisher("chatter", Int16MultiArray._TYPE); Int16MultiArray audio_str = publisher_audio.newMessage(); audio_str.setData(audioData); publisher_audio.publish(audio_str);

And the audioData is "short[]", which I captured by AudioRecord.

So what is the problem? How can I send the audio message to the ros?

edit retag flag offensive close merge delete