0
$\begingroup$

Rosanswers logo

Hi!

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.


Originally posted by Kircheis on ROS Answers with karma: 18 on 2013-03-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Using PointCloud2 is the correct solution.


Originally posted by damonkohler with karma: 3838 on 2013-05-07

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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