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

Revision history [back]

ROS passes messages between different nodes using sockets even if they're on the same machine. This serialisation -> socket -> unserialisation appears to be the bottle neck you're hitting. There is no way around this in ROS that I know of.

If you're only interested in visualising this point cloud in RVIZ and nothing else, there is one messy option that completely breaks the design ethos of ROS! You could generate and publish this point cloud using an RVIZ plugin, this would mean that the intra-process method of message passing would be used. This method uses shared pointers so doesn't involve copying any data and is significantly faster for large messages.

Obviously this is horrific from a design point of view, and will break completely if any nodes outside of RVIZ subscribe to the topic. But it is the only thing I can think of that may solve your problem, maybe someone who known more about the inner workings of ROS could suggest a better solution.

The RVIZ plugin tutorials can be found here, if you want to go down this route.