Quantcast
Viewing all articles
Browse latest Browse all 118

How to get pointcloud2 data from usb_cam or Pointgrey camera?

Hello, experts~ I am a new in ROS. And recently, I am trying to get image and make it detected by the node ar_track_alvar. However, this ar node requires sensor_msgs/PointCloud2 data. Firstly I tried to use usb_cam_node and I got sensor_msgs/Image. The same situation happened using Pointgrey camera with its driver: pointgrey_camera_driver. After searching some files, I find that it might work if I can use openni to get the image, after all it is discribed in wiki: "**Launch files to open an OpenNI device and load all nodelets to convert raw depth/RGB/IR streams to depth images, disparity images, and (registered) point clouds.**"[here](http://wiki.ros.org/openni_launch). And after I run the command: " roslaunch openni2_launch openni2.launch " it says there is no device. I really don't know how to make it out. Can anyone help me answer the following question: 1. Can pointgrey camera be directly used by openni launch file? 2. Can common USB camera be used by openni launch? 3. If the answer of both is negative, how can I get pointcloud2 data with what kind of device and with which driver? P.S. Here is what shell says after I run *roslaunch openni2_launch openni2.launch* [ INFO] [1431337093.836048605]: No matching device found.... waiting for devices. Reason: std::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/buildd/ros-indigo-openni2-camera-0.2.3-0trusty-20150327-0611/src/openni2_driver.cpp @ 623 : Invalid device number 1, there are 0 devices connected.

Viewing all articles
Browse latest Browse all 118

Trending Articles