[ros-users] Can not send kinect recorded bag to image_view
Eric Perko
wisesage5001 at gmail.com
Sat Dec 4 01:20:42 UTC 2010
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
<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 at 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 at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101203/ffb8693b/attachment-0003.html>
More information about the ros-users
mailing list