On Fri, Dec 3, 2010 at 8:40 PM, Chris Brown <chrisneilbrown@gmail.com> 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 <wisesage5001@gmail.com> 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 <chrisneilbrown@gmail.com> 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





_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users