[ros-users] Can't access to Firewire camera

Akansel Cosgun akansel.cosgun at gmail.com
Tue May 18 19:04:24 UTC 2010

Hi everyone,

I wrote a node to broadcast the images into the network. I recently
re-installed opencv2 and the samples are working with the firewire camera as
well as the coriander application. However I wasn't able to run with this
simple code up here:

#include <ros/ros.h>
#include <opencv/highgui.h>
#include <cv_bridge/CvBridge.h>
#include "sensor_msgs/Image.h"
int main(int argc, char** argv)
  ros::init(argc, argv, "image_broadcaster");
  ros::NodeHandle nh;
  CvCapture* cam = cvCaptureFromCAM(-1);
  if (!cam)
    ROS_ERROR("cv_image_broadcaster reports: Cannot get the CAM");

The camera isn't recognized as the compiler says: "cv_image_broadcaster
reports: Cannot get the CAM"

  <description brief="image_broadcaster">


  <author>Akansel Cosgun</author>
  <review status="unreviewed" notes=""/>
  <depend package="roscpp"/>
  <depend package="sensor_msgs"/>
  <depend package="cv_bridge"/>
  <depend package="opencv2"/>

What do you think might be the problem?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100518/b5e4ae3c/attachment-0002.html>

More information about the ros-users mailing list