image_transport between ROS node and ROSJava node
Hi, am getting a picture with kinect and I want to tranfer it a Rosjava node to use it there. I have managed to exchange messages between those two nodes, but the image_transport is unclear on the Rosjava side. I cannot find documentation on which imports to make and what libraries to refer to. I am trying to edit a normal message listener rosjava node to make it able to receive images. This is my base code that I try to change:
public class Javacvtransfer implements NodeMain {
private Node node;
@Override
public void main(Node node)
{
Preconditions.checkState(this.node == null);
this.node = node;
try {
final Log log = node.getLog();
node.newSubscriber("camera/image", "std_msgs/String",
new MessageListener<org.ros.message.std_msgs.String>()
{
@Override
public void onNewMessage(org.ros.message.std_msgs.String message) {
log.info("I heard: \"" + message.data + "\"");
}
});
} catch (Exception e) {
if (node != null) {
node.getLog().fatal(e);
} else {
e.printStackTrace();
}
}
}
@Override
public void shutdown() {
node.shutdown();
node = null;
} }
I dont know what imports to make also for the image_transport in rosjava. Any help would be appreciated.