Hello everyone,
I am using the Robotic System Toolbox of Matlab 2015a and most of the time reading a single rosbag produces an error with the following message:
java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.zip.ZipCoder.getBytes(Unknown Source) at java.util.zip.ZipFile.getEntry(Unknown Source) at java.util.jar.JarFile.getEntry(Unknown Source) at java.util.jar.JarFile.getJarEntry(Unknown Source) at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) at sun.misc.URLClassPath.getResource(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.mathworks.jmi.OpaqueJavaInterface.getExceptionMessage(OpaqueJavaInterface.java:1016)Error using org.ros.internal.message.DefaultMessageDeserializer/deserializeFailed to retrieve Exception MessageError in robotics.ros.BagSelection/deserializeMessages (line 444) msg{i,1} = robotics.ros.msg.internal.MessageFactory.newFromJava(msgType, des.deserialize(cbuffer));Error in robotics.ros.BagSelection/readMessages (line 194) msgs = obj.deserializeMessages(obj.MessageList, rows);Error in LoadMeasurements (line 47) msgs = readMessages(bag);
The bag I am reading with
msgs = readMessages(bag);
contains some nested custom messages I compiled with Robotics System Toolbox Support Package and has a size of 44267 kB. Sometimes the error does not appear, but then Matlab gets REALLY slow after reading the bag, so no further computation is possible.
Whats wrong here?
Thank you for your help in advance!
Best Answer