sensor_msgs::SetCameraInfo::Response& rsp) { \
ROS_INFO("New camera info received"); \
sensor_msgs::CameraInfo &info = req.camera_info; \
\
std::string cam_name = serial_id_+view_name; \
std::string ini_name = cam_name+".ini"; \
rospack::Rospack rp; \
try { \
std::vector<std::string> search_path; \
rp.getSearchPathFromEnv(search_path); \
rp.crawl(search_path, 1); \
std::string path; \
if(rp.find("opt_camera", path)==true) ini_name = path + "/cfg/" + ini_name; \
} catch (std::runtime_error &e) { \
} \
rsp.status_message = "Error writing camera_info to " + cam_name + ".ini"; \
rsp.success = false; \
} \
\
rsp.success = true; \
return true; \
}
#define set_camera_info_method(set_camera_info_method, view_name)
bool writeCalibration(const std::string &file_name, const std::string &camera_name, const sensor_msgs::CameraInfo &cam_info)