Open mfe7 opened 6 years ago
I was able to get it to publish some messages to my PC, but there is significant lag which grows and grows until the process crashes, seemingly running out of memory. It seems to crash more quickly when Color and Depth are both toggled on, as opposed to just when Color is on. I am not running the loomo_vision_proc
launch file - just viewing images in a fresh RViz window. The loomo and PC are communicating over a decent wifi network without much other traffic.
The log says this over and over:
07-10 20:25:57.965 17548-17598/org.ros.android.android_tutorial_camera D/LoomoRosBridgeNode: onNewFrame@mRsColorListener: dropped frame diff is: 68.0ms
And occasionally:
07-10 20:25:57.928 17548-18678/org.ros.android.android_tutorial_camera D/libskiaimagehw: turboImageEncoder took 30.30ms to encode 640x480
And when it crashes, it says:
07-10 20:26:00.116 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc sticky concurrent mark sweep GC freed 202(9KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 1.876ms total 5.586ms
07-10 20:26:00.124 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.124 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc partial concurrent mark sweep GC freed 83(2992B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 565us total 7.110ms
07-10 20:26:00.135 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.135 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 623us total 10.110ms
07-10 20:26:00.135 17548-17598/org.ros.android.android_tutorial_camera I/art: Forcing collection of SoftReferences for 512KB allocation
07-10 20:26:00.146 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.146 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 7(224B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 512us total 10.565ms
07-10 20:26:00.147 17548-17598/org.ros.android.android_tutorial_camera E/art: Throwing OutOfMemoryError "Failed to allocate a 524300 byte allocation with 260716 free bytes and 254KB until OOM"
07-10 20:26:00.159 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.159 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc partial concurrent mark sweep GC freed 6(192B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 413us total 7.136ms
07-10 20:26:00.173 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.173 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 9(288B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 616us total 13.696ms
07-10 20:26:00.175 17548-17598/org.ros.android.android_tutorial_camera I/art: Forcing collection of SoftReferences for 512KB allocation
07-10 20:26:00.187 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.187 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 5(160B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 747us total 12.359ms
07-10 20:26:00.188 17548-17598/org.ros.android.android_tutorial_camera E/art: Throwing OutOfMemoryError "Failed to allocate a 524300 byte allocation with 258716 free bytes and 252KB until OOM"
07-10 20:26:00.188 17548-17598/org.ros.android.android_tutorial_camera W/System.err: java.lang.OutOfMemoryError: Failed to allocate a 524300 byte allocation with 258716 free bytes and 252KB until OOM
07-10 20:26:00.188 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.HeapChannelBuffer.<init>(HeapChannelBuffer.java:42)
07-10 20:26:00.188 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.LittleEndianHeapChannelBuffer.<init>(LittleEndianHeapChannelBuffer.java:34)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.ChannelBuffers.buffer(ChannelBuffers.java:139)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.HeapChannelBufferFactory.getBuffer(HeapChannelBufferFactory.java:69)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.DynamicChannelBuffer.ensureWritableBytes(DynamicChannelBuffer.java:86)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes(DynamicChannelBuffer.java:235)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.jboss.netty.buffer.ChannelBufferOutputStream.write(ChannelBufferOutputStream.java:67)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at android.graphics.Bitmap.nativeCompress(Native Method)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at android.graphics.Bitmap.compress(Bitmap.java:1008)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at org.ros.android.android_tutorial_camera.LoomoRosBridgeNode$2.onNewFrame(LoomoRosBridgeNode.java:184)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at com.segway.robot.sdk.vision.Vision$1.onNewImage(Vision.java:163)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at com.segway.robot.sdk.vision.VisionServiceManager$5.onNewImage(VisionServiceManager.java:808)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at com.segway.robot.sdk.vision.internal.ipc.MemoryFileBufferCallback$Stub.onTransact(MemoryFileBufferCallback.java:55)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera W/System.err: at android.os.Binder.execTransact(Binder.java:446)
07-10 20:26:00.189 17548-17598/org.ros.android.android_tutorial_camera D/skia: ------- write threw an exception
07-10 20:26:00.200 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.200 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc partial concurrent mark sweep GC freed 8(8KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 548us total 6.804ms
07-10 20:26:00.211 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.211 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc partial concurrent mark sweep GC freed 6(192B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 428us total 6.785ms
07-10 20:26:00.218 17548-17598/org.ros.android.android_tutorial_camera I/art: WaitForGcToComplete blocked for 6.628ms for cause Alloc
07-10 20:26:00.227 17548-17561/org.ros.android.android_tutorial_camera W/art: Suspending all threads took: 8.282ms
07-10 20:26:00.230 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.230 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 2.395ms total 10.982ms
07-10 20:26:00.230 17548-17598/org.ros.android.android_tutorial_camera I/art: Forcing collection of SoftReferences for 255KB allocation
07-10 20:26:00.240 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.240 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 7(224B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 909us total 9.598ms
07-10 20:26:00.241 17548-17598/org.ros.android.android_tutorial_camera E/art: Throwing OutOfMemoryError "Failed to allocate a 261412 byte allocation with 7304 free bytes and 7KB until OOM"
07-10 20:26:00.253 17548-17561/org.ros.android.android_tutorial_camera W/art: Suspending all threads took: 8.395ms
07-10 20:26:00.253 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.254 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc partial concurrent mark sweep GC freed 6(192B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 527us total 8.538ms
07-10 20:26:00.267 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.267 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 8(256B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 664us total 9.211ms
07-10 20:26:00.267 17548-17561/org.ros.android.android_tutorial_camera I/art: WaitForGcToComplete blocked for 9.325ms for cause Background
07-10 20:26:00.268 17548-17598/org.ros.android.android_tutorial_camera I/art: Forcing collection of SoftReferences for 255KB allocation
07-10 20:26:00.279 17548-17598/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.279 17548-17598/org.ros.android.android_tutorial_camera I/art: Alloc concurrent mark sweep GC freed 7(224B) AllocSpace objects, 0(0B) LOS objects, 0% free, 99MB/100MB, paused 485us total 11.714ms
07-10 20:26:00.284 17548-17598/org.ros.android.android_tutorial_camera E/art: Throwing OutOfMemoryError "Failed to allocate a 261412 byte allocation with 5928 free bytes and 5KB until OOM"
07-10 20:26:00.294 17548-17561/org.ros.android.android_tutorial_camera I/art: Clamp target GC heap from 115MB to 100MB
07-10 20:26:00.294 17548-17598/org.ros.android.android_tutorial_camera I/art: WaitForGcToComplete blocked for 8.407ms for cause Alloc
07-10 20:26:00.295 17548-17598/org.ros.android.android_tutorial_camera E/Binder: Caught an OutOfMemoryError from the binder stub implementation.
java.lang.OutOfMemoryError: Failed to allocate a 261412 byte allocation with 5928 free bytes and 5KB until OOM
at org.jboss.netty.buffer.LittleEndianHeapChannelBuffer.copy(LittleEndianHeapChannelBuffer.java:125)
at org.jboss.netty.buffer.DynamicChannelBuffer.copy(DynamicChannelBuffer.java:276)
at org.jboss.netty.buffer.AbstractChannelBuffer.copy(AbstractChannelBuffer.java:522)
at org.ros.android.android_tutorial_camera.LoomoRosBridgeNode$2.onNewFrame(LoomoRosBridgeNode.java:185)
at com.segway.robot.sdk.vision.Vision$1.onNewImage(Vision.java:163)
at com.segway.robot.sdk.vision.VisionServiceManager$5.onNewImage(VisionServiceManager.java:808)
at com.segway.robot.sdk.vision.internal.ipc.MemoryFileBufferCallback$Stub.onTransact(MemoryFileBufferCallback.java:55)
at android.os.Binder.execTransact(Binder.java:446)
07-10 20:26:00.296 17548-17598/org.ros.android.android_tutorial_camera E/JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
java.lang.RuntimeException: Out of memory
at android.os.Binder.execTransact(Binder.java:466)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 261412 byte allocation with 5928 free bytes and 5KB until OOM
at org.jboss.netty.buffer.LittleEndianHeapChannelBuffer.copy(LittleEndianHeapChannelBuffer.java:125)
at org.jboss.netty.buffer.DynamicChannelBuffer.copy(DynamicChannelBuffer.java:276)
at org.jboss.netty.buffer.AbstractChannelBuffer.copy(AbstractChannelBuffer.java:522)
at org.ros.android.android_tutorial_camera.LoomoRosBridgeNode$2.onNewFrame(LoomoRosBridgeNode.java:185)
at com.segway.robot.sdk.vision.Vision$1.onNewImage(Vision.java:163)
at com.segway.robot.sdk.vision.VisionServiceManager$5.onNewImage(VisionServiceManager.java:808)
at com.segway.robot.sdk.vision.internal.ipc.MemoryFileBufferCallback$Stub.onTransact(MemoryFileBufferCallback.java:55)
at android.os.Binder.execTransact(Binder.java:446)
07-10 20:26:00.846 17548-17653/org.ros.android.android_tutorial_camera E/nnectionTrackingHandler: Channel exception: java.nio.channels.ClosedChannelException
07-10 20:26:00.851 17548-17653/org.ros.android.android_tutorial_camera W/DefaultChannelPipeline: An exception was thrown by a user handler while handling an exception event ([id: 0x13946624, /192.168.0.170:45608 :> /192.168.0.122:46725] EXCEPTION: java.lang.NullPointerException: Attempt to invoke interface method 'long org.jboss.netty.channel.socket.nio.SocketSendBufferPool$SendBuffer.transferTo(java.nio.channels.WritableByteChannel)' on a null object reference)
org.ros.exception.RosRuntimeException: java.lang.NullPointerException: Attempt to invoke interface method 'long org.jboss.netty.channel.socket.nio.SocketSendBufferPool$SendBuffer.transferTo(java.nio.channels.WritableByteChannel)' on a null object reference
at org.ros.internal.transport.ConnectionTrackingHandler.exceptionCaught(ConnectionTrackingHandler.java:81)
at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:533)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:520)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromSelectorLoop(AbstractNioWorker.java:439)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:379)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'long org.jboss.netty.channel.socket.nio.SocketSendBufferPool$SendBuffer.transferTo(java.nio.channels.WritableByteChannel)' on a null object reference
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:477)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromSelectorLoop(AbstractNioWorker.java:439)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:379)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
I successfully built and installed the android_tutorial_camera onto the Loomo (in developer mode). I am able to connect to my PC's ROS master, and the expected topics show up in
rostopic list
:However, there isn't any data when trying
rostopic echo
.In Android Studio I installed via adb connect (over wifi, not USB), which seemed to be successful. Then, I was able to look at the Andoird Monitor and saw that there were a lot of errors/warnings in the
com.segway.robot.host.coreservice.vision
process. The log is linked here. The log for theorg.ros.android.android_tutorial_camera
process is here. I'm happy to share other debugging info but am unsure what else is useful.Any idea what's going on?