i use ros-indigo , ubuntu 14.04. used usb_cam frame camera can't same task now.
if run rosbuild_ws/package_dir$ roslaunch camera.launch command , below output :
unable open camera calibration file [/home/user/.ros/camera_info/head_camera.yaml] [ warn] [1436602681.552893640]: camera calibration file /home/user/.ros/camera_info/head_camera.yaml not found. [ info] [1436602681.552918876]: starting 'head_camera' (/dev/video0) @ 640x480 via mmap (yuyv) @ 30 fps [ warn] [1436602681.584193482]: unknown control 'white_balance_temperature_auto' [ warn] [1436602681.587047162]: unknown control 'focus_auto' to handle these errors&warnings, try install usb_cam. run rosdep install usb_cam, terminal says #all required rosdeps installed successfully. go usb_cam folder using roscd usb_cam.
then run below command :
/opt/ros/indigo/share/usb_cam$ rosmake usb_cam no makefile in package usb_cam [ rosmake ] results: [ rosmake ] built 39 packages 0 failures. [ rosmake ] summary output directory finally, run rosbuild_ws/package_dir$ roslaunch camera.launch, same message. can't see frame taken usb camera. how can frame usb cam using usb_cam?
content of camera.launch :
<!-- read camera , show streaming feed in display window. --> <launch> <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" > <param name="video_device" value="/dev/video0" /> <param name="image_width" value="640" /> <param name="image_height" value="480" /> <param name="pixel_format" value="yuyv" /> <param name="camera_frame_id" value="usb_cam" /> <param name="io_method" value="mmap"/> </node> <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen"> <remap from="image" to="/usb_cam/image_raw"/> <param name="autosize" value="true" /> </node> </launch>
i'm not sure warning, i'm sure can access camera already. frame rate, can find inside usb_cam/nodes/usb_cam_node.cpp default frame rate should 30. can find out parameter need:
node_.param("video_device", video_device_name_, std::string("/dev/video0")); node_.param("brightness", brightness_, -1); //0-255, -1 "leave alone" node_.param("contrast", contrast_, -1); //0-255, -1 "leave alone" node_.param("saturation", saturation_, -1); //0-255, -1 "leave alone" node_.param("sharpness", sharpness_, -1); //0-255, -1 "leave alone" // possible values: mmap, read, userptr node_.param("io_method", io_method_name_, std::string("mmap")); node_.param("image_width", image_width_, 640); node_.param("image_height", image_height_, 480); node_.param("framerate", framerate_, 30); // possible values: yuyv, uyvy, mjpeg, yuvmono10, rgb24 node_.param("pixel_format", pixel_format_name_, std::string("mjpeg")); // enable/disable autofocus node_.param("autofocus", autofocus_, false); node_.param("focus", focus_, -1); //0-255, -1 "leave alone" // enable/disable autoexposure node_.param("autoexposure", autoexposure_, true); node_.param("exposure", exposure_, 100); node_.param("gain", gain_, -1); //0-100?, -1 "leave alone" // enable/disable auto white balance temperature node_.param("auto_white_balance", auto_white_balance_, true); node_.param("white_balance", white_balance_, 4000); // load camera info node_.param("camera_frame_id", img_.header.frame_id, std::string("head_camera")); node_.param("camera_name", camera_name_, std::string("head_camera")); node_.param("camera_info_url", camera_info_url_, std::string("")); then may change them in launch file :
<param name="autoexposure" value="false" /> <param name="auto_whitebalance" value="false" /> <param name="auto_focus" value="false" /> <param name="auto_brigthness" value="false" /> i'm new on too, can give help.
Comments
Post a Comment