ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You have to allocate the arrays, when you're trying to access dim[] and data[] you haven't yet allocated it to have any size or inserted something into it.
E.i.
thing = std_msgs/MultiArrayDimension()
thing.label = "x"
thing.size = 1
thing.stride = 1
arg.layout.dim.append(thing)
2 | No.2 Revision |
You have to allocate the arrays, when you're trying to access dim[] and data[] you haven't yet allocated it to have any size or inserted something into it.
E.i.
thing = std_msgs/MultiArrayDimension()
MultiArrayDimension()
thing.label = "x"
thing.size = 1
thing.stride = 1
arg.layout.dim.append(thing)