how to save the content of MultiArrayDimension?

asked 2021-11-26 09:00:28 -0600

v.leto gravatar image

Hi! I would like to save the content of a MultiArrayDimension in different variables but I get different kinds of mistakes. Any suggestions? My message is this:

std_msgs/UInt8MultiArray right_beam
 std_msgs/MultiArrayLayout layout
     std_msgs/MultiArrayDimension[]  dim
          string label
          uint32 size
         uint32 stride
     uint32 data_offset 
 uint8[] data
edit retag flag offensive close merge delete

Comments

Hi @v.leto, please take a look at this prior answer: https://answers.ros.org/question/3718...

osilva gravatar image osilva  ( 2021-11-26 13:28:16 -0600 )edit

hi @osilva I have already read it but his question was on how to inizializate the fileds. I would like to read them.

v.leto gravatar image v.leto  ( 2021-11-27 04:36:11 -0600 )edit

My bad. Take a look at this similar example: https://alexsleat.co.uk/2011/07/02/ro...

Is that what you are looking for?

osilva gravatar image osilva  ( 2021-11-27 05:44:13 -0600 )edit

it works for the data field but I have problems with the dim one

v.leto gravatar image v.leto  ( 2021-11-28 06:40:00 -0600 )edit

I think is better to share your code. Otherwise to help is just guessing

osilva gravatar image osilva  ( 2021-11-28 06:51:56 -0600 )edit

yes, you are right, but it is too big. Thanks anyway

v.leto gravatar image v.leto  ( 2021-11-28 13:40:19 -0600 )edit