ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

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.