After a deeply debugging session I found out that the get method from the Message Classes costs the most time:
classdef TransformStamped < robotics.ros.Message
[...]
if isempty(obj.Cache.Header)
obj.Cache.Header = feval(obj.StdMsgsHeaderClass, obj.JavaMessage.getHeader);
end
header = obj.Cache.Header;
[...]
end
unfortunalety i don't dont have acces to these classes and I'm running out of options.
In HERE is briefly explained how to increase speed with slow java classes but nothing is giving me any boost.
Is there another way to read rosbag data without using java?