Rosanswers logo

Currently, I'm running Indigo on Ubuntu 14.04 on my Nvidia Jetson TK1.

I'm trying to stream rgb from my Asus Xtion Pro Live rgb to a web browser using openni2 and mjpeg_server. I used openni v1 previously, and how i did it was simply by running roslaunch openni_launch openni.launch, and rosrun mjpeg_server mjpeg_server _port:=8181. I put the url (in my case, in an img tag on a webserver, and I could see the rgb stream perfectly.

But with openni2, I tried to do the same, running roslaunch openni2_launch openni2.launch and rosrun mjpeg_server mjpeg_server, but I can't view any rgb stream on my web browser. When I connect though, I can see that mjpeg_server recognises it and says Client connected. 1 subscribers for /camera/rgb/image_color.

$ roslaunch openni2_launch openni2.launch
... logging to /home/ubuntu/.ros/log/bc719cc2-5fdc-11e4-8705-00044b25c9e6/roslaunch-tegra-ubuntu-21571.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:42313/


 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/driver/auto_exposure: True
 * /camera/driver/auto_white_balance: True
 * /camera/driver/color_depth_synchronization: False
 * /camera/driver/depth_camera_info_url: 
 * /camera/driver/depth_frame_id: /camera_depth_opt...
 * /camera/driver/depth_registration: False
 * /camera/driver/device_id: #1
 * /camera/driver/rgb_camera_info_url: 
 * /camera/driver/rgb_frame_id: /camera_rgb_optic...
 * /rosdistro: indigo
 * /rosversion: 1.11.9

    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    rectify_color (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [21582]

setting /run_id to bc719cc2-5fdc-11e4-8705-00044b25c9e6
process[rosout-1]: started with pid [21595]
started core service [/rosout]
process[camera/camera_nodelet_manager-2]: started with pid [21612]
process[camera/driver-3]: started with pid [21613]
[ INFO] [1414636240.011987344]: Initializing nodelet with 4 worker threads.
process[camera/rectify_color-4]: started with pid [21632]
process[camera/depth_rectify_depth-5]: started with pid [21660]
process[camera/depth_metric_rect-6]: started with pid [21671]
Warning: USB events thread - failed to set priority. This might cause loss of data...
process[camera/depth_metric-7]: started with pid [21688]
process[camera/depth_points-8]: started with pid [21707]
process[camera/register_depth_rgb-9]: started with pid [21717]
process[camera/points_xyzrgb_sw_registered-10]: started with pid [21735]
process[camera_base_link-11]: started with pid [21749]
process[camera_base_link1-12]: started with pid [21763]
process[camera_base_link2-13]: started with pid [21774]
process[camera_base_link3-14]: started with pid [21785]
[ INFO] [1414636240.516221719]: Device "1d27/0601@3/3" with serial number "1306010085" connected

Warning: USB events thread - failed to set priority. This might cause loss of data...

$ rosrun mjpeg_server mjpeg_server _port:=8181
[ INFO] [1414636245.969765456]: Starting mjpeg server
[ INFO] [1414636245.972252946]: Bind(8181) succeeded
[ INFO] [1414636245.972826527]: waiting for clients to connect
[ INFO] [1414636249.914464389]: Client connected
[ INFO] [1414636250.113366284]: 1 subscribers for /camera/rgb/image_color/
[ INFO] [1414636250.492810561]: Subscribing to topic /camera/rgb/image_color/

Can anyone tell me if I did anything wrong?

Originally posted by Andrew.A on ROS Answers with karma: 324 on 2014-10-29

Post score: 0


1 Answer 1


Rosanswers logo

The topic /camera/rgb/image_color/ didn't exist! I checked available topics by doing a rostopic list, and the topic I was interested turned out to be /camera/rgb/image_raw. After changing image_color to image_raw, it worked!

Originally posted by Andrew.A with karma: 324 on 2014-10-29

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.