Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Teleop not showing camera feed #61

Open
syazfraser opened this issue Jul 10, 2014 · 12 comments
Open

Teleop not showing camera feed #61

syazfraser opened this issue Jul 10, 2014 · 12 comments

Comments

@syazfraser
Copy link

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
Copy link
Contributor

stonier commented Jul 10, 2014

  • ROS_IP correctly set on the PC?
  • Is rostopic info showing the nexus at the correct image feed topic?
  • Does your nexus have expose network interfaces (wireless and 3g at the same time)?
    • quick check, is there a strange ip showing at rostopic info of the camera topic

@syazfraser
Copy link
Author

@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
Copy link
Contributor

stonier commented Jul 10, 2014

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
Copy link
Author

@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
Copy link
Contributor

stonier commented Jul 10, 2014

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
Copy link
Contributor

stonier commented Jul 10, 2014

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
Copy link
Author

@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
Copy link
Contributor

stonier commented Jul 11, 2014

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

stonier commented Jul 18, 2014

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

@syazfraser syazfraser reopened this Aug 13, 2014
@syazfraser
Copy link
Author

@stonier , Yes i have installed it.

@syazfraser syazfraser reopened this Aug 13, 2014
stonier added a commit to rosjava/android_core that referenced this issue Feb 24, 2015
The singleTask launch mode now causes startActivityForResult to immediately cancel
and return. Even though the master chooser would continue, any subsequent calls to finish
would not return any meaningful activity result because it had already returned a cancelled
result as it started.

http://stackoverflow.com/questions/8960072/onactivityresult-with-launchmode-singletask

This fixes #231. It may also have something to do with rosjava/android_remocons#61.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants