0
$\begingroup$

Rosanswers logo

When sending an array of unsigned chars over rosserial the data that gets sent over looks the same as when you try to reference arrays right after their memory has been allocated but no data has been initialized. What fixed the problem in the end was using any other multiarray type and making no changes anywhere else. I was wondering if this was a bug with the message type or there is something special you need to do to get the UInt8Multiarray to work?


Originally posted by dupli on ROS Answers with karma: 1 on 2016-12-20

Post score: 0


Original comments

Comment by gvdhoorn on 2016-12-21:
@dupli: it would be nice if you could include a snippet showing how you are initialising and populating your MultiArray. As @ahendrix mentions, rosserial does things slightly different in some cases, so perhaps we can clear that up.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

rosserial stores the array length separately from the data (unlike roscpp), so you may want to make sure that you're initialing the length correctly.


Originally posted by ahendrix with karma: 47576 on 2016-12-20

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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