rosjava image_transport example failing
I am planning to write a simple app to view the image my robot it will subscribe to the image via a wireless connection to my android phone (not a wifi tether). I started by running the image_transport example on my phone using the eclipse debugger. I run a bag file on my Ubuntu laptop which publishes the camera/image_raw message and am able to view on another ubuntu pc by setting the ROS_MASTER_URI, however I am unable to view this on my android device connected to the same network running the image_transport example.
The test is using the latest version of the image_transport found at https://rosjava.googlecode.com/hg/and... . I changed the following lines in the MainActivity.java example file:
@SuppressWarnings("unchecked")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
RosImageView<CompressedImage> image = (RosImageView<CompressedImage>) findViewById(R.id.image);
image.setTopicName("/camera/image_raw");
image.setMessageClass(org.ros.message.sensor_msgs.CompressedImage.class);
image.setMessageToBitmapCallable(new BitmapFromCompressedImage());
try {
// TODO(damonkohler): The master needs to be set via some sort of
// NodeConfiguration builder.
nodeRunner.run(image,
Lists.newArrayList("Compressed", "__ip:=192.168.1.100", "__master:=http://192.168.1.123:11311/"));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
No errors are reported, and the app pops up on the phone, but no image is displayed. The image in the message (sensor_msgs/Image) is black and white and 320x260.
I filtered logcat for image_transport during one of the attempts:
I/ActivityManager( 173): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.ros.tutorials.image_transport/.MainActivity } from pid 270 I/ActivityManager( 173): Displayed org.ros.tutorials.image_transport/.MainActivity: +289ms (total +1s717ms)
Is there anything that I could be doing wrong?
Tested on:
Motorola Droid OS: Android 2.3 (cyanogen mod 7.0.3)
HTC Incredible OS: Android 2.3 (cyanogen mod 7.0.3)
Laptops running ubuntu 10.4 and 10.10 with diamondback installed
:: UPDATE In a second attempt I changed the message to /camera/image_raw/compressed and the image still would not show up, which seem to be unrelated to the change to the message.
in logcat there is an error: the E/UpdatePublisherRunnable( 2697): java.lang.RuntimeException: java.net.UnknownHostException: ubuntu-laptop
roswtf shows that the imagetransport node created by the phone should be connected but isn't.
Are there any specific network settings that are needed? I added the laptop I was connecting to the host file of the android device.