Classes | Defines | Functions
nm33_node.cpp File Reference
#include <ros/ros.h>
#include <rospack/rospack.h>
#include <sensor_msgs/fill_image.h>
#include <sensor_msgs/SetCameraInfo.h>
#include <image_transport/image_transport.h>
#include <camera_calibration_parsers/parse.h>
#include <opencv/cv.h>
#include <cv_bridge/cv_bridge.h>
#include <dynamic_reconfigure/server.h>
#include <opt_camera/OptNM33CameraConfig.h>
#include "opt_nm33_uvc/opt_nm33_camera.h"
Include dependency graph for nm33_node.cpp:

Go to the source code of this file.

Classes

class  OptCamNode

Defines

#define SET_CAMERA(methodname, paramname)
#define set_camera_info_method(set_camera_info_method, view_name)

Functions

int main (int argc, char **argv)

Define Documentation

#define SET_CAMERA (   methodname,
  paramname 
)
Value:
if (config_.paramname != config.paramname ) { \
      camera_->methodname(config.paramname);      \
    }
#define set_camera_info_method (   set_camera_info_method,
  view_name 
)
Value:
bool set_camera_info_method(sensor_msgs::SetCameraInfo::Request& req, \
                              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) {                                   \
    }                                                                   \
    if (!camera_calibration_parsers::writeCalibration(ini_name, cam_name.c_str(), info)) { \
      rsp.status_message = "Error writing camera_info to " + cam_name + ".ini"; \
      rsp.success = false;                                              \
    }                                                                   \
                                                                        \
    rsp.success = true;                                                 \
    return true;                                                        \
  }

Definition at line 330 of file nm33_node.cpp.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 389 of file nm33_node.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


opt_camera
Author(s): Kei Okada
autogenerated on Sat Mar 23 2013 21:00:15