rosjava / android_core

Android libraries for rosjava
145 stars 166 forks source link

problem with android_tutorial_image_transport #271

Closed hungbui-io closed 7 years ago

hungbui-io commented 7 years ago

Hey guys,

I'm playing with the android_tutorial_image_transport. I want to show the images from rosbag file on an android device by changing the topic name: image.setTopicName("/tango/camera/color_1/image_rect/compressed"); but it did not show anything. Why is that? Am I missing something? Any helps would be much appreciated!

adamantivm commented 7 years ago

@hungbv11 as far as I know it should work. Some ideas to orient debugging:

hungbui-io commented 7 years ago

@adamantivm Thanks a lot for your reply

adamantivm commented 7 years ago

@hungbv11 I am sorry I can't tell what could be wrong with that information. One other suggestion that comes to mind is to try display the image from a live topic instead of a bag file to see if that makes any difference.

hungbui-io commented 7 years ago

I wrote a simple node publishing images from laptop webcam but the android app did not subscribe anything :(

jubeira commented 7 years ago

Hi @hungbv11, I'd start by adding more logs to see what's happening exactly. I would try to avoid simulated clock times at the beginning to discard sources of error (see https://github.com/rosjava/rosjava_core/issues/148).

Perhaps as you say this is not the problem, but just for a reference about networking: http://wiki.ros.org/ROS/Technical%20Overview. It is explained there that all the nodes should be able to resolve each other's address/ name, and setting the variable ROS_IP in the linux side fixes that in some cases.

hungbui-io commented 7 years ago

Hey @adamantivm, I fixed the bug. I forgot to add "export ROS_IP" to the .bashrc file. Here is the the solution for my problem Anyway, I really appreciate your help! Cheers