RosJava on Android - Publisher not always working
I have a simple app right now with a RosImageView that shows a video feed from a robot, and a Joystick I developed that publishes a Twist to /cmd_vel. The image view works 100% of the time. However the /cmd_vel will only send properly every once in a while. It typically will work a first time, but then restarting the app it will not work. I believe this is the error that is causing the issue:
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): An exception was thrown by a user handler while handling an exception event ([id: 0x40950368, /192.168.1.140:45958 :> /192.168.1.116:45381] EXCEPTION: java.lang.IllegalStateException: Unexpected message type roslib/Log != rosgraph_msgs/Log)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): org.ros.exception.RosRuntimeException: java.lang.IllegalStateException: Unexpected message type roslib/Log != rosgraph_msgs/Log
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.ros.internal.transport.ConnectionTrackingHandler.exceptionCaught(ConnectionTrackingHandler.java:63)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:432)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:52)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at java.lang.Thread.run(Thread.java:1020)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): Caused by: java.lang.IllegalStateException: Unexpected message type roslib/Log != rosgraph_msgs/Log
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.ros.internal.node.topic.DefaultPublisher.finishHandshake(DefaultPublisher.java:101)
11-21 17:22:02.307: W/DefaultChannelPipeline(4360): at org.ros.internal.transport.tcp.TcpServerHandshakeHandler.messageReceived(TcpServerHandshakeHandler.java:86)
11-21 17:22 ...