0
$\begingroup$

Rosanswers logo

hi guys, i am new to kinect. I need point cloud data from the depth camera in kinect. Any of you have any idea how to go about doing it? i am using ROS diamondback and Ubuntu.


Originally posted by lakshmen on ROS Answers with karma: 101 on 2011-05-23

Post score: -6

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

here and Here are the description how to install the driver and its ros-wrapper and how to run them. Then listen to one of the .../points topics as described in 10. or 11. here.

The driver publishes:

* /camera/depth/camera_info : Camera parameters for the IR (depth) camera
* /camera/depth/image : single channel floating point (float32) depth image, containing the depth in meters.
* /camera/depth/points : point cloud without color information
* /camera/rgb/camera_info : Camera parameters for the RGB camera
* /camera/rgb/image_color : RGB image
* /camera/rgb/image_mono : Grayscale image
* /camera/rgb/points : point cloud containing RGB value for each point

Originally posted by Felix Endres with karma: 6468 on 2011-05-23

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by Felix Endres on 2011-05-25:
Yes all. You could omit those with service/client, but it won't do no harm. Also you can omit either python or c++. If you want to process the point clouds, I'd use c++, though. What kind of 3d model do you want to convert to?

Comment by lakshmen on 2011-05-24:
what would be a good choice to convert the point cloud into the 3d model? Will using Meshlab be a good choice?

Comment by lakshmen on 2011-05-24:
go thru all the tutorials?

Comment by Felix Endres on 2011-05-24:
I think you should go through the tutorials i linked to, to get a foundation of how ROS works

Comment by lakshmen on 2011-05-24:
how only to get the /camera/depth/image from the picture??

$\endgroup$
0
$\begingroup$

Rosanswers logo

A good start how to use ROS can be found here. When you reach step 11 then you learn how to publish and subscribe in ROS. For point clouds using the Kinect camera, then you need to setup you subscriber to retrieve point clouds, which is found under the sensor_msgs documentation. Down below you can find the simple schematic for a class that reads the point cloud data from the kinect.

#include <ros/ros.h>
#include <pcl_ros/point_cloud.h>
#include <sensor_msgs/PointCloud2.h>

using namespace ros;
using namespace sensor_msgs;

class processPoint {
    NodeHandle nh;
    Subscriber sub;

public:
    processPoint() {
        sub = nh.subscribe<sensor_msgs::PointCloud2>("/camera/rgb/points", 1, &processPoint::processCloud, this);
    }

    ~processPoint() {   
     }

    void processCloud( const sensor_msgs::PointCloud2ConstPtr& cloud );
};

#include "processPoint.hpp"

void processPoint::processCloud( const sensor_msgs::PointCloud2ConstPtr& cloud ) {

}

int main(int argc, char **argv) {

    init(argc, argv, "processPoint");

    processPoint processPoint;

    Rate spin_rate(1);

    while( ok() ) {
        spinOnce();

        spin_rate.sleep();
    }
}

Originally posted by Aslund with karma: 289 on 2011-05-24

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

I have been working on the depth pointer( the pointer that stores the depth data for the Kinect). If you are using the Openkinect driver and not using the ROS and writing the code yourself, the function you should be looking for is

void depth_cb(freenect_device *dev, void *v_depth, uint32_t timestamp)

and the data is stored in the v_depth pointer. You can take the data from the v_depth pointer. Hope this is useful for those start out finding the depth data.Thanks to those who helped, appreciate their help.


Originally posted by lakshmen with karma: 101 on 2011-06-19

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.