# problem with camera info

Hi guys

I tried to load my camera info from one yaml that I created with camera calibrate. I wrote this code:

if (info_manager_->validateURL("$(find camera)/webcam.yaml")) { ROS_INFO("sucsses"); } else { ROS_ERROR("NEGETIVE"); }  but I couldn't access the yaml and I got negetive msg and this is my yaml: image_width: 640 image_height: 480 camera_name: webcam camera_matrix: rows: 3 cols: 3 data: [628.605769204058, 0, 330.525636957696, 0, 626.873332341329, 252.463246920169, 0, 0, 1] distortion_model: plumb_bob distortion_coefficients: rows: 1 cols: 5 data: [-0.0709132085265088, 0.102063002021842, -0.00113116095948083, -3.15823206599607e-05, 0] rectification_matrix: rows: 3 cols: 3 data: [1, 0, 0, 0, 1, 0, 0, 0, 1] projection_matrix: rows: 3 cols: 4 data: [620.937438964844, 0, 329.896849376601, 0, 0, 620.437438964844, 251.769990192599, 0, 0, 0, 1, 0]  edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted I am not sure how this "info_manager_->validateURL" function works but I don't think that "$(find camera)/webcam.yaml" as path will work, you are using C++ and \$(find camera) will not be automatically replaced by the package's path like in CMakeFiles. You could first try to put the full path to your yaml file

depending on where your package is installed. If that works then just put "webcam.yaml" and run your node from the package's folder.

roscd camera  and then rosrun


If you want to be able to run your node from anywhere without having to put the full path to the yaml file check this answer: http://answers.ros.org/question/17397...

more

I tried with this "~/Working_space/camera/calibrate/webcam.yaml" but I got negetive msg :( . I want to do some thing such as cv_camera in this link https://github.com/OTL/cv_camera/blob/master/src/capture.cpp in 54 line.

( 2014-07-05 03:51:42 -0500 )edit