camera_umd "unable to set control: Invalid argument" [closed]
hi,everybody!! I am a college student ,i get an error when i use uvc_camera package.The error tips:
#
opening /dev/video0
pixfmt 0 = 'JPEG' desc = 'JPEG'
discrete: 320x240:
discrete: 640x480:
int (Brightness, 0, id = 980900): 0 to 255 (1)
int (Contrast, 0, id = 980901): 0 to 255 (1)
int (Gamma, 0, id = 980910): 1 to 6 (1)
int (Exposure, 16, id = 980911): 781 to 18750 (1)
bool (Auto Gain, 8, id = 980912): 0 to 1 (1)
menu (Light frequency filter, 0, id = 980918): 0 to 2 (1)
0: NoFliker
1: 50 Hz
2: 60 Hz
int (Sharpness, 0, id = 98091b): 0 to 3 (1)
fd is 10
ioctl(fd, VIDIOC_S_CTRL, &c) return -1
unable to set control: Invalid argument
ERROR: could not set some settings.
unable to set control
select timeout in grab
select timeout in grab
##############################################
uvc_cam.cpp:
void Cam::set_control(uint32_t id, int val)
{
v4l2_control c;
c.id = id;
if (ioctl(fd, VIDIOC_G_CTRL, &c) == 0)
{
printf("current value of %d is %d\n", id, c.value);
//perror("unable to get control");
//throw std::runtime_error("unable to get control");
}
c.value = val;
if (ioctl(fd, VIDIOC_S_CTRL, &c) < 0)
{
printf("fd is %d\n",fd);
printf("ioctl() return %d\n",ioctl(fd, VIDIOC_S_CTRL, &c));
perror("unable to set control");
throw std::runtime_error("unable to set control");
}
}
#####################################################
my system is,ubuntu 12.04 LTS,with ROS fuerte
It pullzed me for a long time ,great thanks!!!!!