ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
To fill the message field you shouldn't convert your numpy
array to a string and then during the assignment convert the string back into an array.array
(which is the type of the data
fields, see http://design.ros2.org/articles/idl_interface_definition.html).
Have you tried to populate the array.array
directly from the (1 dimensional?) numpy
array? (Without having run the following code) something like this:
cloud_msg.data.frombytes(cloud_arr[0])