ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Invalid image from android_tutorial_camera?

asked 2011-10-05 04:33:14 -0500

Nathan gravatar image

updated 2011-10-05 05:09:26 -0500

I believe I have the latest code for rosjava and the android rosjava. But my ubuntu laptop will not display an image from the /camera/image_raw topic. I even tried changing the topic to /camera/image_raw/compressed. I have tried various ways of invoking image_view on the laptop but it always displays a blank window. I know the phone is sending images because I can view then using the android_image_transport app on another phone when all of them are tied to the same ubuntu ros master. I cannot rosbag the image topics from the android_tutorial_camera app either. The bag is empty/corrupted. Help please?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-01-27 03:59:51 -0500

damonkohler gravatar image

Copying from the comment:

Looking at the terminal running roscore, I saw I was victim of using my workstations hostname instead of its IP. Similar to another post in answers.ros.org, I did an "export ROS_IP='192.168.1.2'" in both terminals -- the one running roscore AND the one with image_view

edit flag offensive delete link more
1

answered 2011-10-06 03:06:02 -0500

Daniel Canelhas gravatar image

Have you tried the following in your terminal:

To print the contents of one message on screen (ctrl-C to interrupt):

rostopic echo -n 1 /camera/image_raw

To check the bandwidth used by the topic:

rostopic bw /camera/image_raw

To check the frequency of publishing:

rostopic hz /camera/image_raw

Another thing you can do, after starting image_view like this:

rosrun image_view image_view image:=/camera/image_raw

is to open another terminal and typing

rxgraph

This should show if image_view is actually subscribing to the topic. Assuming that the previous rostopic tests revealed that data is in fact being published on the topic. As a last resort:

roswtf

If no data is being sent to the topic, there could be something wrong with the camera driver.

edit flag offensive delete link more

Comments

Thank you for the debug tips. Looking at the terminal running roscore, I saw I was victim of using my workstations hostname instead of its IP. Similar to another post in answers.ros.org, I did an "export ROS_IP='192.168.1.2'" in both terminals -- the one running roscore AND the one with image_view
Nathan gravatar image Nathan  ( 2011-10-06 07:52:57 -0500 )edit
Could you please post your solution as an answer and accept the answer?
damonkohler gravatar image damonkohler  ( 2011-10-08 04:18:53 -0500 )edit

Question Tools

Stats

Asked: 2011-10-05 04:33:14 -0500

Seen: 1,101 times

Last updated: Jan 27 '12