ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Where are you trying to publish it to?

One option that will help with reducing the copies and serialization is if you use intraprocess communication by means of Nodelets vs nodes. http://wiki.ros.org/nodelet Its a slightly different API but everything should be pretty straight forward. When you load multiple nodelets into a nodelet manager, they will communicate over intraprocess communication (ei shared ptr) and not serialize and deserialize the messages.

I'd also recommend making use of the type masquerading to reduce even further the number of copies you make from conversions.

Side note: ROS2 will do this faster and better in concept. I might recommend if you're throwing around that much information, you may want to consider moving to Eloquent.