rosjava / android_remocons

Android based remote controllers for 1-1 robot pairing and multi-robot concerts.
21 stars 28 forks source link

Teleop not showing camera feed #61

Open syazfraser opened 10 years ago

syazfraser commented 10 years ago

Im using an Asus Xtion Pro Live. After pairing successfully pairing it with my Nexus 10, it's unable to show the camera feed.

However, I'm able to see image view on rviz.

Any guides? Thanks.

stonier commented 10 years ago
syazfraser commented 10 years ago

@stonier , thank you for replying. ROS_IP is correctly set.

"rostopic info" shows:

Usage: rostopic info/topic rostopic error: error: you must specify a topic name

It doesn't show the image feed topic.

stonier commented 10 years ago

Usage: rostopic info/topic rostopic error: error: you must specify a topic name

You need to feed it with the image topic. I can't remember exactly what it is, but something like rostopic info /camera/rgb/image_color/compressed.

syazfraser commented 10 years ago

@stonier , thanks for the guide. okay, ive fed it with the image topic: "rostopic info /camera/rgb/image_raw" and it displays:

/camera/rgb/image_raw /camera/rgb/image_raw/compressed /camera/rgb/image_raw/compressed/parameter_descriptions /camera/rgb/image_raw/compressed/parameter_updates /camera/rgb/image_raw/compressedDepth /camera/rgb/image_raw/compressedDepth/parameter_descriptions /camera/rgb/image_raw/compressedDepth/parameter_updates /camera/rgb/image_raw/theora /camera/rgb/image_raw/theora/parameter_descriptions /camera/rgb/image_raw/theora/parameter_updates

any further steps i need to make, @stonier ?

about my nexus exposing network interfaces.. nope. it is not. i switched to airplane mode and use solely on wifi. and there is not even an ip address on the rostopic list..

stonier commented 10 years ago

That looks like a rostopic list not a rostopic info. You need to check the actual topic that you are trying to connect to from the nexus. Start up rviz and try and get it to connect to a particular compressed topic (maybe /camera/rgb/image_raw/compressed). Then run rostopic info /camera/rgb/image_raw/compressed on that. This should show you some details like:

Type: sensor_msgs/ImageCompressed

Publishers: 
 * /camera/rgb/image_raw/compressed (http://localhost:33488/)

Subscribers:
 * /camera/rgb/image_raw/compressed (http://_nexus_ip_here_:33488/)
stonier commented 10 years ago

Doesn't matter if you are in wifi mode or 3g mode. Many modern phones expose both interfaces to java at the code level whether they are being used or not. My new phone does this, my old phone didn't.

Anyway, first thing to check is to see what's coming up above.

syazfraser commented 10 years ago

@stonier , can't be more grateful to have you replying. thank you so much.

okay, i started up, "rosrun rviz rviz" and under Image..

Transport Hint, instead of "raw", i selected "compressed", Image Topic: "/camera/rgb/image_raw" ( i can't seem to find "/camera/rgb/image_raw/compressed".. even if i manually type it in.. it gives me a warning status and image will not be displayed..)

however, i continued to run "rostopic info /camera/rgb/image_raw/compressed" and it gives me:

Type: sensor_msgs/CompressedImage

Publishers:

Subscribers:

my nexus ip is 192.168.1.29

What am i missing here @stonier ? What i received totally differs from you.

Note that I'm already running: roscore roslaunch openni2_launch openni2.launch rocon_launch turtlebot_bringup bringup.concert

and i've had my nexus 10 paired to it and it's able to control turtlebot via the virtual joystick in teleop app but no image is showing up.

thank you again for the guidance @stonier :)

stonier commented 10 years ago

roslaunch openni2_launch opening.launch

Ah. This is the key. The turtlebot 3dsensor.launch I expect puts down a slightly different layout for camera topics. The problem here is that the hydro android teleop hardcodes the location of this topic. If you connect with your nexus I suspect you'll be able to use rostopic to find a dangling image sensor_msgs/CompressedImage subscriber somewhere.

You can:

  1. Customise opening.launch and ensure the compressed image topic matches what the android app is looking for
  2. Recompile the android app, change the hardcoded topic location to match what you're finding with rviz.
  3. Use indigo sources :neckbeard: (very volatile). We've implemented an interactions server that lets you easily remap for android apps.
syazfraser commented 10 years ago

hi there @stonier :)

the turtlebot I'm working was down and I'm unable to work on it for the past few days. but it's working back now already. sorry for the delay.

anw, I've tried

  1. roscore
  2. rocon_launch turtlebot_bringup bringup.concert
  3. roslaunch turtlebot_bringup 3dsensor.launch
  4. roslaunch turtlebot_rviz_launchers view_robot.launch

i can't seem to find the "/camera/rgb/image_raw/compressed" topic still.

for step 4, i tried "rosrun rviz rviz". was just curious if i could find "/camera/rgb/image_raw/compressed"

i also tried "rostopic find /camera/rgb/image_raw/compressed" but to no avail.

I'm trying to recompile the app now using Eclipse now. wanna change the topic to ""/camera/rgb/image_raw"

hopefully it'll work.

i just wondering if you know where the "/camera/rgb/image_raw/compressed" has gone to and how I'm able to find it?

thanks @stonier :)

syazfraser commented 10 years ago

from the teleop source code itself,

there is:

private static final String cameraTopic = "camera/rgb/image_color/compressed_throttle";

is the teleop app subscribing to this topic?

stonier commented 10 years ago

Do you have ros-xxx-image-transport-plugins installed?

syazfraser commented 10 years ago

@stonier , Yes i have installed it.