Ask Your Question

Monica's profile - activity

2012-08-16 00:07:21 -0500 received badge  Famous Question (source)
2012-02-03 00:46:32 -0500 received badge  Taxonomist
2011-12-15 03:17:32 -0500 received badge  Notable Question (source)
2011-07-07 03:34:35 -0500 received badge  Student (source)
2011-04-01 04:37:49 -0500 received badge  Popular Question (source)
2011-03-10 17:59:38 -0500 marked best answer how to publish a topic from kinect in a node?

Hi, you didn't leave very many details, so I'm going to do my best to parse your request one step at a time:

  • Publish 3 topics from pr2

Well, this one is the hardest. I'm not sure if you have an actual PR2 or you would like to run one in simulation. Please clarify, and I'll do my best to update this answer accordingly. For now, I'm going to assume you have your PR2 running and you can rostopic list/rostopic echo the 3 topics you'd like just fine.

  • One from kinect and one from point_cloud kinect

So when you run the openni_camera driver, it will publish the RGB image data from the kinect, as well as the depth data in PointCloud2. These should be published as /camera/rgb/image_color and /camera/depth/points2 respectively.

  • Then save the data to disk

Okay, so the final step to saving all of your topics to disk would be to use rosbag to record a bag of these 5 topics you'd like. The command line information for rosbag record will show you how to record your topics, but it should go something like this:

rosbag record /camera/rgb/image_color /camera/depth/points [YOUR PR2 TOPICS HERE]

This will record those 5 topics (and those 5 topics only, use rosbag record -a to record ALL topics currently published) to a .bag file in your current directory. Warning, since this has a camera recording, these bag files will easily reach multi-gig size if you leave it running. To playback this bagfile as topics later, just use rosbag play /home/monica/my_recorded_bag_directory/my_pr2_kinect_logs.bag. You may also want to check out rosbag compress if your bag file grows too large.

If I misinterpreted any of your requests please let me know; and please try to give a more detailed request in the future.

2011-02-22 22:58:36 -0500 asked a question how to publish a topic from kinect in a node?

I want to publish 3 topics from pr2, one from kinect and one from point_cloud (kinect) in a single node and then save the data to disk