ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found the fix. "file://" needs to be prefixed before the absolute path for validateURL and loadCameraInfo. here is the updated code

camera_info_->setCameraName("my_cam");

if (access(camera_calibration_file_param_.c_str(), F_OK) != -1)
{
  if (camera_info_->validateURL("file://" + camera_calibration_file_param_))
  {
    camera_info_->loadCameraInfo("file://" + camera_calibration_file_param_);
  }
  else
  {
    ROS_WARN("Current Camera is Uncalibrated");
  }
}
else
{
  ROS_WARN("Camera Calibration file not found");
}