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

Instantiating rosjava messages faster for PointClouds

asked 2013-03-06 20:24:24 -0600

Kircheis gravatar image

updated 2013-03-14 00:32:50 -0600


Is there a way to generate/instantiate messages faster in rosjava (newest rev)? From my knowledge i have to use a messageFactory.

Point32 p = messageFactory.newFromType(Point32._TYPE);

The problem is that it's too slow if you have to have generate a lot of Points32 for a PointCloud message. I narrowed it down to this bottleneck.

I tested it with my older rosjava builds (December 2011) and there you instantiate messages directly and i don't have any speed problems.

EDIT1: I have seen that PointCloud2 offers an byte array which should solve the problem.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-07 21:04:06 -0600

damonkohler gravatar image

Using PointCloud2 is the correct solution.

edit flag offensive delete link more

Question Tools


Asked: 2013-03-06 20:24:24 -0600

Seen: 266 times

Last updated: May 07 '13