Hi Chris, On Fri, Dec 3, 2010 at 6:45 PM, Chris Brown wrote: > Eric, > But I dont have a kinect > I was told I could get PCL data from the raw images What you probably need to do is to look at how this is done in the kinect driver. Take a look at the depthCb method in kinect_driver.cpp in that package. It's not a perfect fit, as it uses the buffer straight from the kinect rather than the depth image which is itself derived from that buffer (see depthBufferTo8BitImage for how that's done--basically you'd want to invert that function). For best results, you'll also want a calibration file for the kinect that was used to capture the data. HTH, Pat > > On Sat, Dec 4, 2010 at 1:08 PM, Eric Perko wrote: >> >> On Fri, Dec 3, 2010 at 8:40 PM, Chris Brown >> wrote: >>> >>> Eric, >>> I'm republishing because I want process the data into a point cloud data, >>> which I have no idea how to do, where should I start? >>> I dont have a kinect to play with. To fix it I had to make this change >>> -pub.publish(Image(msg)) >>> +pub.publish(msg) >>> works now >> >> What I was getting at was that you don't have to do the republishing of >> the depth image from the bag file yourself - rosbag play already does it for >> you. Doesn't the kinect driver already output a point cloud? Seems to >> according to http://www.ros.org/wiki/kinect_camera . You may want to see >> about finding a different bag file that includes that information. >> - Eric >> >>> >>> On Sat, Dec 4, 2010 at 12:20 PM, Eric Perko >>> wrote: >>>> >>>> Chris, >>>> To just playback a bagfile to a rosnode such as image_view, there is no >>>> need to write a script that uses the rosbag API. Take a look at this >>>> tutorial: http://www.ros.org/wiki/rosbag/Tutorials/Recording%20and%20playing%20back%20data >>>> For your specific case, you would want to use the following two commands >>>> (or something very close to them) after starting a roscore: >>>> 1. rosbag play /home/chris/bagfiles/kinectDepthVideo.bag >>>> 2. rosrun image_view image_view image:=/kinect/depth/image_raw >>>> That should be about all you need to do, no need to read from the >>>> bagfile using Python and then republish messages yourself. >>>> - Eric >>>> >>>> On Fri, Dec 3, 2010 at 7:00 PM, Chris Brown >>>> wrote: >>>>> >>>>> I get this error >>>>>   File "/home/chris/ros/ros/core/roslib/src/roslib/message.py", line >>>>> 301, in __init__ >>>>>     raise TypeError, "Invalid number of arguments, args should be >>>>> %s"%str(self.__slots__)+" args are"+str(args) >>>>> TypeError: Invalid number of arguments, args should be ['header', >>>>> 'height', 'width', 'encoding', 'is_bigendian', 'step', 'data'] args >>>>> are(header: >>>>>   seq: 0 >>>>>   stamp: >>>>>     secs: 1290467094 >>>>>     nsecs: 328996057 >>>>>   frame_id: /kinect_depth >>>>> height: 480 >>>>> width: 640 >>>>> encoding: mono8 >>>>> is_bigendian: 0 >>>>> step: 640 >>>>> data: >>>>> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿùùÿÿùõýõÿÿýýÿÿÿÿÿýùùõùùùùùùùùÿÿÿÿýÿýýùùùùýÿÿÿÿÿýýùùùùùùùýýýýýùõõõõõùõùùùùõõõõõùùõõõõõõõõõõõõõõõõõõññõññññññññññññññññññõñññññññíññññññññññõõõõÿÿÿÿÿÿÿÿÿõõñññíííééééñññññññññññññíññññññññííííí >>>>> I'm sure I'm trying to publish send_msg/Image data to image_view which >>>>> accepts the data >>>>> rosbag info ~/bagfiles/kinectDepthVideo.bag >>>>> path:        /home/chris/bagfiles/kinectDepthVideo.bag >>>>> version:     2.0 >>>>> duration:    25.1s >>>>> start:       Nov 23 2010 10:04:54.33 (1290467094.33) >>>>> end:         Nov 23 2010 10:05:19.43 (1290467119.43) >>>>> size:        220.7 MB >>>>> messages:    753 >>>>> compression: none [251/251 chunks] >>>>> types:       sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743] >>>>> topics:      /kinect/depth/image_raw   753 msgs @ 29.8 Hz : >>>>> sensor_msgs/Image >>>>> >>>>> _______________________________________________ >>>>> ros-users mailing list >>>>> ros-users@code.ros.org >>>>> https://code.ros.org/mailman/listinfo/ros-users >>>>> >>>> >>>> >>>> _______________________________________________ >>>> ros-users mailing list >>>> ros-users@code.ros.org >>>> https://code.ros.org/mailman/listinfo/ros-users >>>> >>> >>> >>> >>> -- >>> Chris >>> Aluminium Replacement Parts >>> @arpartsau >>> >>> >>> >>> _______________________________________________ >>> ros-users mailing list >>> ros-users@code.ros.org >>> https://code.ros.org/mailman/listinfo/ros-users >>> >> >> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> > > > > -- > Chris > Aluminium Replacement Parts > @arpartsau > > > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > >