Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

1) think of ROS as a messaging infrastructure, like a phone company. It lets you listen to (subscribe to) messages that are being sent right now. The messages aren't "saved" anywhere, much like how words spoken on the phone aren't saved in the copper wire that transmits them. If you have a program that collects and saves messages they can be stored in any file format you like though. The ROS messages all have a formats, of course.

If you want to know the details of a particular message you can use the command

rosmsg show <message type>

In particular, for point cloud messages, you might want to look at

rosmsg show sensor_msgs/PointCloud2

If you just want to listen to a topic with this type of message and have the result saved as pcd files you can use the following command (directly in terminal)

rosrun pcl_ros pointcloud_to_pcd input:=/camera/rgb/points _prefix:=kinect_rgb_

use ctrl-c to abort when you have enough messages as they tend to consume a fair bit of disk-space in the long run.

This will save points published on the topic /camera/rgb/points into the present working directory as kinect_rgb_xxxxxxxxxxxxx.xxxxxxxxx.pcd where the x's are time signatures generated by ROS. For more advanced programs, look at pointclouds.org

2) There are several algorithms and methods for what you describe (also known as object segmentation) none of which I could properly fit into a reply here. You'll probably find hundreds of papers on the subject at IEEEXplore or similar databases.

3) Object identification, depending on the application/context can be done with one single frame. It's not so much a matter of how many views you have of the object as what you are extracting from the views and comparing them to. Again, much research is done on this subject.

BTW. live video from a regular camera won't give you point clouds, the message type would most likely be sensor_msgs/Image. see the output of:

rosmsg show sensor_msgs/Image
click to hide/show revision 2
clarification about topics and how to list current topics.

1) think of ROS as a messaging infrastructure, like a phone company. It lets you listen to (subscribe to) messages that are being sent right now. The messages aren't "saved" anywhere, much like how words spoken on the phone aren't saved in the copper wire that transmits them. If you have a program that collects and saves messages they can be stored in any file format you like though. The ROS messages all have a formats, of course.

If you want to know the details of a particular message you can use the command

rosmsg show <message type>

In particular, for point cloud messages, you might want to look at

rosmsg show sensor_msgs/PointCloud2

If you just want to listen to a topic with this type of message and have the result saved as pcd files you can use the following command (directly in terminal)terminal). Supposing that you have the topic /camera/rgb/points where pointclouds are being published:

rosrun pcl_ros pointcloud_to_pcd input:=/camera/rgb/points _prefix:=kinect_rgb_

use ctrl-c to abort when you have enough messages as they tend to consume a fair bit of disk-space in the long run.

This will save points published on the topic /camera/rgb/points into the present working directory as kinect_rgb_xxxxxxxxxxxxx.xxxxxxxxx.pcd where the x's are time signatures generated by ROS. For more advanced programs, look at pointclouds.org

If you're unsure about what topics are currently available, do

rostopic list

2) There are several algorithms and methods for what you describe (also known as object segmentation) none of which I could properly fit into a reply here. You'll probably find hundreds of papers on the subject at IEEEXplore or similar databases.

3) Object identification, depending on the application/context can be done with one single frame. It's not so much a matter of how many views you have of the object as what you are extracting from the views and comparing them to. Again, much research is done on this subject.

BTW. live video from a regular camera won't give you point clouds, the message type would most likely be sensor_msgs/Image. see the output of:

rosmsg show sensor_msgs/Image

1) think of ROS as a messaging infrastructure, like a phone company. It lets you listen to (subscribe to) messages that are being sent right now. The messages aren't "saved" anywhere, much like how words spoken on the phone aren't saved in the copper wire that transmits them. If you have a program that collects and saves messages they can be stored in any file format you like though. The ROS messages all have a formats, of course.

If you want to know the details of a particular message you can use the command

rosmsg show <message type>

In particular, for point cloud messages, you might want to look at

rosmsg show sensor_msgs/PointCloud2

If you just want to listen to a topic with this type of message and have the result saved as pcd files you can use the following command (directly in terminal). Supposing that you have the topic /camera/rgb/points where pointclouds are being published:

rosrun pcl_ros pointcloud_to_pcd input:=/camera/rgb/points _prefix:=kinect_rgb_

use ctrl-c to abort when you have enough messages as they tend to consume a fair bit of disk-space in the long run.

This will save points published on the topic /camera/rgb/points into the present working directory as kinect_rgb_xxxxxxxxxxxxx.xxxxxxxxx.pcd where the x's are time signatures generated by ROS. For more advanced programs, look at pointclouds.org

If you're unsure about what topics are currently available, do

rostopic list

2) There are several algorithms and methods for what you describe (also known as object segmentation) none of which I could properly fit into a reply here. You'll probably find hundreds of papers on the subject at IEEEXplore or similar databases.databases. pointclouds.org describes one way of doing it.

3) Object identification, depending on the application/context can be done with one single frame. It's not so much a matter of how many views you have of the object as what you are extracting from the views and comparing them to. Again, much research is done on this subject.

BTW. live video from a regular camera won't give you point clouds, the message type would most likely be sensor_msgs/Image. see the output of:

rosmsg show sensor_msgs/Image