parameter_pa_ros.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 *                                                                             *
00003 * parameter_pa_ros.h                                                          *
00004 * ==================                                                          *
00005 *                                                                             *
00006 *******************************************************************************
00007 *                                                                             *
00008 * github repository                                                           *
00009 *   https://github.com/peterweissig/ros_parameter                             *
00010 *                                                                             *
00011 * Chair of Automation Technology, Technische Universität Chemnitz             *
00012 *   https://www.tu-chemnitz.de/etit/proaut                                    *
00013 *                                                                             *
00014 *******************************************************************************
00015 *                                                                             *
00016 * New BSD License                                                             *
00017 *                                                                             *
00018 * Copyright (c) 2015-2017, Peter Weissig, Technische Universität Chemnitz     *
00019 * All rights reserved.                                                        *
00020 *                                                                             *
00021 * Redistribution and use in source and binary forms, with or without          *
00022 * modification, are permitted provided that the following conditions are met: *
00023 *     * Redistributions of source code must retain the above copyright        *
00024 *       notice, this list of conditions and the following disclaimer.         *
00025 *     * Redistributions in binary form must reproduce the above copyright     *
00026 *       notice, this list of conditions and the following disclaimer in the   *
00027 *       documentation and/or other materials provided with the distribution.  *
00028 *     * Neither the name of the Technische Universität Chemnitz nor the       *
00029 *       names of its contributors may be used to endorse or promote products  *
00030 *       derived from this software without specific prior written permission. *
00031 *                                                                             *
00032 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
00033 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE   *
00034 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE  *
00035 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY      *
00036 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES  *
00037 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR          *
00038 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER  *
00039 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          *
00040 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY   *
00041 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
00042 * DAMAGE.                                                                     *
00043 *                                                                             *
00044 ******************************************************************************/
00045 
00046 #ifndef __PARAMETER_PA_ROS_H
00047 #define __PARAMETER_PA_ROS_H
00048 
00049 // ros headers
00050 #include <ros/ros.h>
00051 
00052 // standard headers
00053 #include <string>
00054 #include <vector>
00055 
00056 #include <eigen3/Eigen/Core>
00057 
00058 //**************************[cParameterPaRos]**********************************
00059 class cParameterPaRos {
00060   public:
00061     bool load(const std::string name, bool        &value,
00062               const bool print_default = true) const;
00063 
00064     bool load(const std::string name, std::string &value,
00065               const bool print_default = true) const;
00066     bool load_topic(const std::string name, std::string &value,
00067                     const bool print_default = true) const;
00068     bool load_path(const std::string name, std::string &value,
00069                    const bool print_default = true) const;
00070 
00071     bool load(const std::string name, int         &value,
00072               const bool print_default = true) const;
00073 
00074     bool load(const std::string name, double      &value,
00075               const bool print_default = true) const;
00076 
00077 
00078     bool load(const std::string name, std::vector<bool       > &value,
00079               const bool print_default = true) const;
00080 
00081     bool load(const std::string name, std::vector<std::string> &value,
00082               const bool print_default = true) const;
00083 
00084     bool load(const std::string name, std::vector<int        > &value,
00085               const bool print_default = true) const;
00086 
00087     bool load(const std::string name, std::vector<double     > &value,
00088               const bool print_default = true) const;
00089 
00090     bool load(const std::string name, Eigen::MatrixXf &value,
00091               const bool print_default = true) const;
00092 
00093     static bool replace_findpack(std::string &path);
00094     static void resolve_ressourcename(std::string &name);
00095     static std::string bool_to_str(const bool value);
00096 
00097   private:
00098     void loadSub(const std::string &n, const std::string &v,
00099                  const bool p, const bool r) const;
00100 
00101     ros::NodeHandle nh_;
00102 };
00103 
00104 #endif // __PARAMETER_PA_ROS_H


parameter_pa
Author(s):
autogenerated on Thu Aug 3 2017 03:01:58