android_tutorial_image_transport crashed in android [closed]

asked 2012-04-19 23:39:22 -0600

ira gravatar image

updated 2012-04-19 23:42:08 -0600

Hi all,

I successfully build and install rosjava and rosjava.android on my computer with ROS electric installed. I also successfully compiled android_tutorial_image_transport in eclipse on the same computer.

Then I tried to run this app on android emulator with master_uri set to the address of another computer which runs roscore of version Diamondback.

According to the catlog, topic and subscriber are registered successfully:

I/Registrar(369): MasterXmlRpcEndpoint URI: http://dfki-robot:11311/

I/Registrar(369): Registering publisher: Publisher<publisherdefinition<publisheridentifier<nodeslaveidentifier< android="" video_view,="" <a="" href="http://10.0.2.15:54945">http://10.0.2.15:54945>, TopicIdentifier</rosout>>, Topic<topicidentifier< rosout="">, TopicDescription<rosgraph_msgs log,acffd30cd6b6de30f120938c17c593fb="">>>>

I/Registrar(369): Registering subscriber: Subscriber<topic<topicidentifier< viz="" ptz="" image="">, TopicDescription<sensor_msgs image,060021388200f6f0f447d0fcd9c64743&gt;&gt;&gt;<="" p="">

I/Registrar(369): Response<success, subscribed="" to="" [="" viz="" ptz="" image],="" [http:="" dfki-robot:36680="" ]&gt;<="" p="">

I/Registrar(369): Response<success, registered="" [="" android="" video_view]="" as="" publisher="" of="" [="" rosout],="" [http:="" dfki-robot:60195="" ]&gt;<="" p="">

I/DefaultPublisher(369): Publisher registered: Publisher<publisherdefinition<publisheridentifier<nodeslaveidentifier< android="" video_view,="" <a="" href="http://10.0.2.15:54945">http://10.0.2.15:54945>, TopicIdentifier</rosout>>, Topic<topicidentifier< rosout="">, TopicDescription<rosgraph_msgs log,acffd30cd6b6de30f120938c17c593fb="">>>>

I/DefaultPublisher(369): Subscriber registered: Subscriber<topic<topicidentifier< viz="" ptz="" image="">, TopicDescription<sensor_msgs image,060021388200f6f0f447d0fcd9c64743&gt;&gt;&gt;<="" p="">

However, errors popped up after that

W/dalvikvm(369): threadid=1: thread exiting with uncaught exception (group=0x40015560) E/AndroidRuntime(369): FATAL EXCEPTION: main E/AndroidRuntime(369): java.lang.ClassCastException: org.ros.internal.message.$Proxy3 E/AndroidRuntime(369): at org.ros.android.BitmapFromCompressedImage.call(BitmapFromCompressedImage.java:1) E/AndroidRuntime(369): at org.ros.android.views.RosImageView$1$1.run(RosImageView.java:80) E/AndroidRuntime(369): at android.os.Handler.handleCallback(Handler.java:587) E/AndroidRuntime(369): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime(369): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime(369): at android.app.ActivityThread.main(ActivityThread.java:3683) E/AndroidRuntime(369): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(369): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime(369): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/AndroidRuntime(369): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/AndroidRuntime(369): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager(61): Force finishing activity org.ros.android.tutorial.image_transport/.MainActivity

I dont know why there could be a ClassCastException there, does anyone have any idea about this.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2014-12-07 01:01:05.409311

Comments

First, have you followed the documentation for installing and building rosjava_core and android_core? http://docs.rosjava.googlecode.com/hg/rosjava_core/html/index.htmlhttp://docs.rosjava.googlecode.com/hg/android_core/html/index.html

damonkohler gravatar imagedamonkohler ( 2012-04-23 02:20:10 -0600 )edit