0
$\begingroup$

Rosanswers logo

Is it at all possible to construct a message containing fields with an arbitrary type?

For instance, I would like to create a message containing an array of type pcl::Correspondence. Is this possible or would I have to convert this to a group of primitive objects first?

Bidski


Originally posted by Bidski on ROS Answers with karma: 96 on 2015-01-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Since ROS messages generate code for many languages, it isn't possible to use language-specific types within message.

You'll have to convert your types into ROS types.

You can also adapt C++ types for serialization (see: http://wiki.ros.org/roscpp/Overview/MessagesSerializationAndAdaptingTypes ), but this still doesn't allow them to be used within other messages.


Originally posted by ahendrix with karma: 47576 on 2015-01-19

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

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