[ros-users] Can not send kinect recorded bag to image_view

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] Can not send kinect recorded bag to image_view
I have image_view running but I cant seem to send a recorded bag file I got
from kinect
I just get a lot of crap dumped to the screen

#!/usr/bin/env python
import roslib; roslib.load_manifest('beginner_tutorials')
import rospy
import rosbag
from sensor_msgs.msg import Image

def bagread():
        pub = rospy.Publisher('image', Image)
        rospy.init_node('kinectsender')
        bag = rosbag.Bag('/home/chris/bagfiles/kinectDepthVideo.bag')
        for topic, msg, t in
bag.read_messages(topics=['/kinect/depth/image_raw']):
                pub.publish(Image(msg))
        bag.close()


if __name__ == '__main__':
        bagread()



--
Chris
Aluminium Replacement Parts <http://arp.chrisb.id.au/>
@arpartsau <http://twitter.com/arpartsau>