Open wennycooper opened 9 years ago
The logcat message is as below: 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: An exception was thrown by a user handler while handling an exception event ([id: 0x426382b0, /192.168.25.82:42031 :> /192.168.25.74:48897] EXCEPTION: java.lang.IllegalStateException: No publisher for topic: /MyPublisher/messages) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: org.ros.exception.RosRuntimeException: java.lang.IllegalStateException: No publisher for topic: /MyPublisher/messages 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.ros.internal.transport.ConnectionTrackingHandler.exceptionCaught(ConnectionTrackingHandler.java:81) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:533) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:49) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:458) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:439) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:91) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:373) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at java.lang.Thread.run(Thread.java:841) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: Caused by: java.lang.IllegalStateException: No publisher for topic: /MyPublisher/messages 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at com.google.common.base.Preconditions.checkState(Preconditions.java:149) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.ros.internal.transport.tcp.TcpServerHandshakeHandler.handleSubscriberHandshake(TcpServerHandshakeHandler.java:94) 11-14 12:52:04.598 17226-17552/com.example.kkuei.andbot_speech W/DefaultChannelPipeline: at org.ros.internal.transport.tcp.TcpServerHandshakeHandler.messageReceived
I tried to wrote an Android app to use SpeechRecognition Activity to get a recognized string, and use rosjava/Android_core to publish the recognized string to a topic.
But the problem is, each time when it recognized speech and switch back from SpeechRecognition activity to RosActivity, the RosActivity crash.
The details is in: http://answers.ros.org/question/220817/rosactivity-crashes-when-switching-from-speechrecognition-activity-to-rosactivity/