From 08ad9149dc8bff323a9ee3b9af423e1d15e962d8 Mon Sep 17 00:00:00 2001 From: asantamaria <asantamaria@iri.upc.edu> Date: Tue, 13 Dec 2016 08:37:32 +0100 Subject: [PATCH] cleaning folder to change node type to driver --- CMakeLists.txt | 112 --------------- cfg/Mvbluefox3Camera.cfg | 43 ------ include/mvbluefox3_camera_alg.h | 197 --------------------------- include/mvbluefox3_camera_alg_node.h | 139 ------------------- package.xml | 60 -------- src/mvbluefox3_camera_alg.cpp | 71 ---------- src/mvbluefox3_camera_alg_node.cpp | 120 ---------------- 7 files changed, 742 deletions(-) delete mode 100644 CMakeLists.txt delete mode 100755 cfg/Mvbluefox3Camera.cfg delete mode 100644 include/mvbluefox3_camera_alg.h delete mode 100644 include/mvbluefox3_camera_alg_node.h delete mode 100644 package.xml delete mode 100644 src/mvbluefox3_camera_alg.cpp delete mode 100644 src/mvbluefox3_camera_alg_node.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 14d4895..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,112 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(iri_mvbluefox3_camera) - -## Find catkin macros and libraries -find_package(catkin REQUIRED) -# ******************************************************************** -# Add catkin additional components here -# ******************************************************************** -find_package(catkin REQUIRED COMPONENTS iri_base_algorithm cv_bridge image_transport camera_info_manager sensor_msgs) - -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) -find_package(mvbluefox3 REQUIRED) -find_package(mvIMPACT REQUIRED) - -ADD_DEFINITIONS(-DHAVE_OPENCV_H) - -# ******************************************************************** -# Add system and labrobotica dependencies here -# ******************************************************************** -# find_package(<dependency> REQUIRED) - -# ******************************************************************** -# Add topic, service and action definition here -# ******************************************************************** -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate actions in the 'action' folder -# add_action_files( -# FILES -# Action1.action -# Action2.action -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs # Or other packages containing msgs -# ) - -# ******************************************************************** -# Add the dynamic reconfigure file -# ******************************************************************** -generate_dynamic_reconfigure_options(cfg/Mvbluefox3Camera.cfg) - -# ******************************************************************** -# Add run time dependencies here -# ******************************************************************** -catkin_package( -# INCLUDE_DIRS -# LIBRARIES -# ******************************************************************** -# Add ROS and IRI ROS run time dependencies -# ******************************************************************** - CATKIN_DEPENDS iri_base_algorithm cv_bridge image_transport camera_info_manager sensor_msgs -# ******************************************************************** -# Add system and labrobotica run time dependencies here -# ******************************************************************** - DEPENDS mvbluefox3 mvIMPACT -) - -########### -## Build ## -########### - -# ******************************************************************** -# Add the include directories -# ******************************************************************** -include_directories(include) -include_directories(${catkin_INCLUDE_DIRS}) -include_directories(${mvbluefox3_INCLUDE_DIR}) -include_directories(${mvIMPACT_INCLUDE_DIR}) -# include_directories(${<dependency>_INCLUDE_DIR}) - -## Declare a cpp library -# add_library(${PROJECT_NAME} <list of source files>) - -## Declare a cpp executable -add_executable(${PROJECT_NAME} src/mvbluefox3_camera_alg.cpp src/mvbluefox3_camera_alg_node.cpp) - -# ******************************************************************** -# Add the libraries -# ******************************************************************** -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) -target_link_libraries(${PROJECT_NAME} ${mvbluefox3_LIBRARY}) -target_link_libraries(${PROJECT_NAME} ${mvIMPACT_LIBRARY}) -# target_link_libraries(${PROJECT_NAME} ${<dependency>_LIBRARY}) - -# ******************************************************************** -# Add message headers dependencies -# ******************************************************************** -# add_dependencies(${PROJECT_NAME} <msg_package_name>_generate_messages_cpp) -add_dependencies(${PROJECT_NAME} cv_bridge_generate_messages_cpp) -add_dependencies(${PROJECT_NAME} image_transport_generate_messages_cpp) -add_dependencies(${PROJECT_NAME} camera_info_manager_generate_messages_cpp) -add_dependencies(${PROJECT_NAME} sensor_msgs_generate_messages_cpp) -# ******************************************************************** -# Add dynamic reconfigure dependencies -# ******************************************************************** -add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS}) diff --git a/cfg/Mvbluefox3Camera.cfg b/cfg/Mvbluefox3Camera.cfg deleted file mode 100755 index 600389f..0000000 --- a/cfg/Mvbluefox3Camera.cfg +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env python -#* All rights reserved. -#* -#* Redistribution and use in source and binary forms, with or without -#* modification, are permitted provided that the following conditions -#* are met: -#* -#* * Redistributions of source code must retain the above copyright -#* notice, this list of conditions and the following disclaimer. -#* * Redistributions in binary form must reproduce the above -#* copyright notice, this list of conditions and the following -#* disclaimer in the documentation and/or other materials provided -#* with the distribution. -#* * Neither the name of the Willow Garage nor the names of its -#* contributors may be used to endorse or promote products derived -#* from this software without specific prior written permission. -#* -#* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -#* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -#* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -#* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -#* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -#* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -#* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -#* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -#* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -#* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -#* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -#* POSSIBILITY OF SUCH DAMAGE. -#*********************************************************** - -# Author: - -PACKAGE='iri_mvbluefox3_camera' - -from dynamic_reconfigure.parameter_generator_catkin import * - -gen = ParameterGenerator() - -# Name Type Reconfiguration level Description Default Min Max -#gen.add("velocity_scale_factor", double_t, 0, "Maximum velocity scale factor", 0.5, 0.0, 1.0) - -exit(gen.generate(PACKAGE, "Mvbluefox3CameraAlgorithm", "Mvbluefox3Camera")) diff --git a/include/mvbluefox3_camera_alg.h b/include/mvbluefox3_camera_alg.h deleted file mode 100644 index 4b872c1..0000000 --- a/include/mvbluefox3_camera_alg.h +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC. -// Author -// All rights reserved. -// -// This file is part of iri-ros-pkg -// iri-ros-pkg is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// -// IMPORTANT NOTE: This code has been generated through a script from the -// iri_ros_scripts. Please do NOT delete any comments to guarantee the correctness -// of the scripts. ROS topics can be easly add by using those scripts. Please -// refer to the IRI wiki page for more information: -// http://wikiri.upc.es/index.php/Robotics_Lab - -#ifndef _mvbluefox3_camera_alg_h_ -#define _mvbluefox3_camera_alg_h_ - -#include <iri_mvbluefox3_camera/Mvbluefox3CameraConfig.h> - -#include "mvbluefox3.h" - -/** - * \brief IRI ROS Specific Driver Class - * - * - */ -class Mvbluefox3CameraAlgorithm -{ - protected: - /** - * \brief define config type - * - * Define a Config type with the Mvbluefox3CameraConfig. All driver implementations - * will then use the same variable type Config. - */ - pthread_mutex_t access_; - - CMvbluefox3::CMvbluefox3* cam_ptr_; // Camera pointer. - - /** - * \brief Delete pointer - * - * Function to delete pointers. - */ - template <typename Ptr_t> - void DelPtr(Ptr_t &ptr) - { - if (ptr != NULL) - { - ptr = NULL; - delete [] ptr; - } - } - - public: - - /** - * \brief define config type - * - * Define a Config type with the Mvbluefox3CameraConfig. All driver implementations - * will then use the same variable type Config. - */ - typedef iri_mvbluefox3_camera::Mvbluefox3CameraConfig Config; - - /** - * \brief config variable - * - * This variable has all the driver parameters defined in the cfg config file. - * Is updated everytime function config_update() is called. - */ - Config config_; - - /** - * \brief constructor - * - * In this constructor parameters related to the specific driver can be - * initalized. Those parameters can be also set in the openDriver() function. - * Attributes from the main node driver class IriBaseDriver such as loop_rate, - * may be also overload here. - */ - Mvbluefox3CameraAlgorithm(void); - - /** - * \brief Lock Algorithm - * - * Locks access to the Algorithm class - */ - void lock(void) { pthread_mutex_lock(&this->access_); }; - - /** - * \brief Unlock Algorithm - * - * Unlocks access to the Algorithm class - */ - void unlock(void) { pthread_mutex_unlock(&this->access_); }; - - /** - * \brief Tries Access to Algorithm - * - * Tries access to Algorithm - * - * \return true if the lock was adquired, false otherwise - */ - bool try_enter(void) - { - if(pthread_mutex_trylock(&this->access_)==0) - return true; - else - return false; - }; - - /** - * \brief config update - * - * In this function the driver parameters must be updated with the input - * config variable. Then the new configuration state will be stored in the - * Config attribute. - * - * \param new_cfg the new driver configuration state - * - * \param level level in which the update is taken place - */ - void config_update(Config& config, uint32_t level=0); - - // here define all mvbluefox3_camera_alg interface methods to retrieve and set - // the driver parameters - - /** - * \brief Start Driver - * - * Start Driver. - */ - void StartDriver(const std::string &serial); - - /** - * \brief Set Configuration - * - * Set Configuration with params_ object (to be filled externally). - */ - void SetConfig(CMvbluefox3::CParams ¶ms); - - /** - * \brief Get Configuration - * - * Get Configuration. - */ - CMvbluefox3::CParams GetConfig(void); - - /** - * \brief Get image channel's depth - * - * Get image channel's depth. - */ - int GetChDepth(void); - - /** - * \brief Get bytes-pixel - * - * Get bytes-pixel. - */ - int GetBytesXPixel(void); - - /** - * \brief Get image - * - * Get image. - */ - void GetImage(char *image); - void GetImageCV(cv::Mat &image); - - /** - * \brief Get real exposure time - * - * Get real exposure time. - */ - int ReqExposeUs(void); - - /** - * \brief Destructor - * - * This destructor is called when the object is about to be destroyed. - * - */ - ~Mvbluefox3CameraAlgorithm(void); -}; - -#endif diff --git a/include/mvbluefox3_camera_alg_node.h b/include/mvbluefox3_camera_alg_node.h deleted file mode 100644 index 3526440..0000000 --- a/include/mvbluefox3_camera_alg_node.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC. -// Author -// All rights reserved. -// -// This file is part of iri-ros-pkg -// iri-ros-pkg is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// -// IMPORTANT NOTE: This code has been generated through a script from the -// iri_ros_scripts. Please do NOT delete any comments to guarantee the correctness -// of the scripts. ROS topics can be easly add by using those scripts. Please -// refer to the IRI wiki page for more information: -// http://wikiri.upc.es/index.php/Robotics_Lab - -#ifndef _mvbluefox3_camera_alg_node_h_ -#define _mvbluefox3_camera_alg_node_h_ - -#include <iri_base_algorithm/iri_base_algorithm.h> -#include "mvbluefox3_camera_alg.h" - -// [publisher subscriber headers] -#include <camera_info_manager/camera_info_manager.h> -#include <image_transport/image_transport.h> -// Uncomment to use the openCV <-> ROS bridge -//#include <cv_bridge/cv_bridge.h> -#include <sensor_msgs/Image.h> - -// [service client headers] - -// [action server client headers] - -/** - * \brief IRI ROS Specific Algorithm Class - * - */ -class Mvbluefox3CameraAlgNode : public algorithm_base::IriBaseAlgorithm<Mvbluefox3CameraAlgorithm> -{ - private: - - CMvbluefox3::CParams params_; // Camera parameters. - - - // [publisher attributes] - // Uncomment to use the openCV <-> ROS bridge - // cv_bridge::CvImagePtr cv_image_; - image_transport::ImageTransport it; - - camera_info_manager::CameraInfoManager image_raw_camera_manager; - image_transport::CameraPublisher image_raw_publisher_; - sensor_msgs::Image Image_msg_; - - - // [subscriber attributes] - - // [service attributes] - - // [client attributes] - - // [action server attributes] - - // [action client attributes] - - /** - * \brief config variable - * - * This variable has all the driver parameters defined in the cfg config file. - * Is updated everytime function config_update() is called. - */ - Config config_; - public: - /** - * \brief Constructor - * - * This constructor initializes specific class attributes and all ROS - * communications variables to enable message exchange. - */ - Mvbluefox3CameraAlgNode(void); - - /** - * \brief Destructor - * - * This destructor frees all necessary dynamic memory allocated within this - * this class. - */ - ~Mvbluefox3CameraAlgNode(void); - - protected: - /** - * \brief main node thread - * - * This is the main thread node function. Code written here will be executed - * in every node loop while the algorithm is on running state. Loop frequency - * can be tuned by modifying loop_rate attribute. - * - * Here data related to the process loop or to ROS topics (mainly data structs - * related to the MSG and SRV files) must be updated. ROS publisher objects - * must publish their data in this process. ROS client servers may also - * request data to the corresponding server topics. - */ - void mainNodeThread(void); - - /** - * \brief dynamic reconfigure server callback - * - * This method is called whenever a new configuration is received through - * the dynamic reconfigure. The derivated generic algorithm class must - * implement it. - * - * \param config an object with new configuration from all algorithm - * parameters defined in the config file. - * \param level integer referring the level in which the configuration - * has been changed. - */ - void node_config_update(Config &config, uint32_t level); - - /** - * \brief node add diagnostics - * - * In this abstract function additional ROS diagnostics applied to the - * specific algorithms may be added. - */ - void addNodeDiagnostics(void); - - // [diagnostic functions] - - // [test functions] -}; - -#endif diff --git a/package.xml b/package.xml deleted file mode 100644 index 6f80655..0000000 --- a/package.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<package> - <name>iri_mvbluefox3_camera</name> - <version>0.0.0</version> - <description>The iri_mvbluefox3_camera package</description> - - <!-- One maintainer tag required, multiple allowed, one person per tag --> - <!-- Example: --> - <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> - <maintainer email="asantamaria@todo.todo">asantamaria</maintainer> - - - <!-- One license tag required, multiple allowed, one license per tag --> - <!-- Commonly used license strings: --> - <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> - <license>LGPL</license> - - - <!-- Url tags are optional, but mutiple are allowed, one per tag --> - <!-- Optional attribute type can be: website, bugtracker, or repository --> - <!-- Example: --> - <!-- <url type="website">http://wiki.ros.org/iri_mvbluefox3_camera</url> --> - - - <!-- Author tags are optional, mutiple are allowed, one per tag --> - <!-- Authors do not have to be maintianers, but could be --> - <!-- Example: --> - <!-- <author email="jane.doe@example.com">Jane Doe</author> --> - - - <!-- The *_depend tags are used to specify dependencies --> - <!-- Dependencies can be catkin packages or system dependencies --> - <!-- Examples: --> - <!-- Use build_depend for packages you need at compile time: --> - <!-- <build_depend>message_generation</build_depend> --> - <!-- Use buildtool_depend for build tool packages: --> - <!-- <buildtool_depend>catkin</buildtool_depend> --> - <!-- Use run_depend for packages you need at runtime: --> - <!-- <run_depend>message_runtime</run_depend> --> - <!-- Use test_depend for packages you need only for testing: --> - <!-- <test_depend>gtest</test_depend> --> - <buildtool_depend>catkin</buildtool_depend> - <build_depend>iri_base_algorithm</build_depend> - <build_depend>cv_bridge</build_depend> - <build_depend>image_transport</build_depend> - <build_depend>camera_info_manager</build_depend> - <build_depend>sensor_msgs</build_depend> - <run_depend>iri_base_algorithm</run_depend> - <run_depend>cv_bridge</run_depend> - <run_depend>image_transport</run_depend> - <run_depend>camera_info_manager</run_depend> - <run_depend>sensor_msgs</run_depend> - - - <!-- The export tag contains other, unspecified, tags --> - <export> - <!-- Other tools can request additional information be placed here --> - - </export> -</package> \ No newline at end of file diff --git a/src/mvbluefox3_camera_alg.cpp b/src/mvbluefox3_camera_alg.cpp deleted file mode 100644 index 66dce97..0000000 --- a/src/mvbluefox3_camera_alg.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "mvbluefox3_camera_alg.h" - -Mvbluefox3CameraAlgorithm::Mvbluefox3CameraAlgorithm(void) -{ - this->cam_ptr_ = NULL; - pthread_mutex_init(&this->access_,NULL); -} - -Mvbluefox3CameraAlgorithm::~Mvbluefox3CameraAlgorithm(void) -{ - DelPtr(this->cam_ptr_); - pthread_mutex_destroy(&this->access_); -} - -void Mvbluefox3CameraAlgorithm::config_update(Config& config, uint32_t level) -{ - this->lock(); - - // save the current configuration - this->config_=config; - - this->unlock(); -} - -// Mvbluefox3CameraAlgorithm Public API - -void Mvbluefox3CameraAlgorithm::StartDriver(const std::string &serial) -{ - try - { - this->cam_ptr_ = new CMvbluefox3::CMvbluefox3(serial); - }catch (CMvbluefox3::CmvBlueFOX3Exception& e) - { - std::cout << e.what() << std::endl; - } -} - -void Mvbluefox3CameraAlgorithm::SetConfig(CMvbluefox3::CParams ¶ms) -{ - this->cam_ptr_->SetConfig(params); -} - -CMvbluefox3::CParams Mvbluefox3CameraAlgorithm::GetConfig(void) -{ - return this->cam_ptr_->GetConfig(); -} - -int Mvbluefox3CameraAlgorithm::GetChDepth(void) -{ - return this->cam_ptr_->GetChDepth(); -} - -int Mvbluefox3CameraAlgorithm::GetBytesXPixel(void) -{ - return this->cam_ptr_->GetBytesXPixel(); -} - -void Mvbluefox3CameraAlgorithm::GetImage(char *image) -{ - this->cam_ptr_->GetImage(&image); -} - -void Mvbluefox3CameraAlgorithm::GetImageCV(cv::Mat &image) -{ - this->cam_ptr_->GetImageCV(image); -} - -int Mvbluefox3CameraAlgorithm::ReqExposeUs(void) -{ - return this->cam_ptr_->ReqExposeUs(); -} diff --git a/src/mvbluefox3_camera_alg_node.cpp b/src/mvbluefox3_camera_alg_node.cpp deleted file mode 100644 index aa49515..0000000 --- a/src/mvbluefox3_camera_alg_node.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "mvbluefox3_camera_alg_node.h" - -#include <iostream> - -Mvbluefox3CameraAlgNode::Mvbluefox3CameraAlgNode(void) : - algorithm_base::IriBaseAlgorithm<Mvbluefox3CameraAlgorithm>(), - image_raw_camera_manager(ros::NodeHandle("~image_raw")), - it(this->public_node_handle_) -{ - //init class attributes if necessary - this->loop_rate_ = 50;//in [Hz] - - // read parameters - std::string serial; - public_node_handle_.param<std::string>("serial",serial,"F0300141"); - - this->alg_.lock(); - this->alg_.StartDriver(serial); - this->alg_.SetConfig(this->params_); - this->alg_.unlock(); - - // [init publishers] - this->image_raw_publisher_ = this->it.advertiseCamera("image_raw", 1); - - // uncomment the following lines to load the calibration file for the camera - // Change <cal_file_param> for the correct parameter name holding the configuration filename - std::string image_raw_cal_file; - public_node_handle_.param<std::string>("calibration_file",image_raw_cal_file,""); - if(this->image_raw_camera_manager.validateURL(image_raw_cal_file)) - { - if(!this->image_raw_camera_manager.loadCameraInfo(image_raw_cal_file)) - ROS_INFO("Invalid calibration file"); - } - else - ROS_INFO("Invalid calibration file"); - - // [init subscribers] - - // [init services] - - // [init clients] - - // [init action servers] - - // [init action clients] -} - -Mvbluefox3CameraAlgNode::~Mvbluefox3CameraAlgNode(void) -{ - // [free dynamic memory] -} - -void Mvbluefox3CameraAlgNode::mainNodeThread(void) -{ - // // [fill msg structures] - std::string frame_id = "mvBlueFOX3"; - ros::Time start_time = ros::Time::now(); - - // // this->alg_.lock(); - // // this->alg_.unlock(); - - this->params_ = this->alg_.GetConfig(); - - double numbytes = (double)(this->alg_.GetChDepth() * this->alg_.GetBytesXPixel()); - - std::string encoding = CMvbluefox3::codings_str[this->params_.pixel_format]; - - this->Image_msg_.width = this->params_.width; - this->Image_msg_.height = this->params_.height; - this->Image_msg_.step = this->params_.width*numbytes/8.0; - this->Image_msg_.data.resize(this->params_.width*this->params_.height*numbytes/8.0); - - this->alg_.lock(); - this->alg_.GetImage((char *)this->Image_msg_.data.data()); - double req_dur_sec = (double)(this->alg_.ReqExposeUs())*1e-6; - this->alg_.unlock(); - this->Image_msg_.encoding = encoding; - this->Image_msg_.header.stamp = start_time + ros::Duration(req_dur_sec/2.0); - this->Image_msg_.header.frame_id = frame_id; - - // Camera info - sensor_msgs::CameraInfo image_raw_camera_info = this->image_raw_camera_manager.getCameraInfo(); - image_raw_camera_info.header.stamp = start_time + ros::Duration(req_dur_sec/2.0); - image_raw_camera_info.header.frame_id = frame_id; - - // // [fill srv structure and make request to the server] - - // // [fill action structure and make request to the action server] - - // // [publish messages] - // // Uncomment the following line to convert an OpenCV image to a ROS image message - // this->Image_msg_=*this->cv_image_->toImageMsg(); - - this->image_raw_publisher_.publish(this->Image_msg_,image_raw_camera_info); -} - -/* [subscriber callbacks] */ - -/* [service callbacks] */ - -/* [action callbacks] */ - -/* [action requests] */ - -void Mvbluefox3CameraAlgNode::node_config_update(Config &config, uint32_t level) -{ - this->alg_.lock(); - this->config_=config; - this->alg_.unlock(); -} - -void Mvbluefox3CameraAlgNode::addNodeDiagnostics(void) -{ -} - -/* main function */ -int main(int argc,char *argv[]) -{ - return algorithm_base::main<Mvbluefox3CameraAlgNode>(argc, argv, "mvbluefox3_camera_alg_node"); -} -- GitLab