Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I haven't used rosjava yet, but probably you just need to use sensor_msgs/Image instead of std_msgs/String. The class should be org.ros.message.sensor_msgs.Image.

I wouldn't worry about image_transport in Java yet. image_transport is a C++ package that basically wraps a normal ROS image topic and provides compressed versions of the image stream, which can be very useful when publishing over a bandwidth-limited network. I believe rosjava has an example of subscribing to a JPEG-compressed image topic directly, but there isn't a nice wrapper for arbitrary compressed transports like in C++.