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

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
+ (text/html)
このメッセージを削除
このメッセージに返信
著者: User discussions
日付:  
To: ros-users
題目: [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>