uncalibvs_sim_alg_node.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC.
00002 // Author 
00003 // All rights reserved.
00004 //
00005 // This file is part of iri-ros-pkg
00006 // iri-ros-pkg is free software: you can redistribute it and/or modify
00007 // it under the terms of the GNU Lesser General Public License as published by
00008 // the Free Software Foundation, either version 3 of the License, or
00009 // at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public License
00017 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 // 
00019 // IMPORTANT NOTE: This code has been generated through a script from the 
00020 // iri_ros_scripts. Please do NOT delete any comments to guarantee the correctness
00021 // of the scripts. ROS topics can be easly add by using those scripts. Please
00022 // refer to the IRI wiki page for more information:
00023 // http://wikiri.upc.es/index.php/Robotics_Lab
00024 
00025 #ifndef _uncalibvs_sim_alg_node_h_
00026 #define _uncalibvs_sim_alg_node_h_
00027 
00028 #include <iri_base_algorithm/iri_base_algorithm.h>
00029 #include "uncalibvs_sim_alg.h"
00030 
00031 // [publisher subscriber headers]
00032 #include <sensor_msgs/JointState.h>
00033 #include <gazebo_msgs/ModelStates.h>
00034 #include <geometry_msgs/Twist.h>
00035 #include <ar_pose/ARMarkers.h>
00036 
00037 // [service client headers]
00038 
00039 // [action server client headers]
00040 #include <actionlib/client/simple_action_client.h>
00041 #include <actionlib/client/terminal_state.h>
00042 
00043 #include <tf/transform_listener.h>
00044 #include <kdl_parser/kdl_parser.hpp>
00045 
00046 
00047 
00052 class Uncalibvs_simAlgNode : public algorithm_base::IriBaseAlgorithm<Uncalibvs_simAlgorithm>
00053 {
00054   private:
00055     // [publisher attributes]
00056     ros::Publisher joints_pub_publisher_;
00057     sensor_msgs::JointState JointState_msg_;
00058     ros::Publisher output_publisher_,output_publisher_pose_;
00059     geometry_msgs::Twist Twist_msg_;
00060 
00061     // [subscriber attributes]
00062     ros::Subscriber model_state_subscriber_;
00063     void model_state_callback(const gazebo_msgs::ModelStates::ConstPtr& msg);
00064     CMutex model_state_mutex_;
00065     void input_tag_callback(const ar_pose::ARMarkers::ConstPtr& msg);
00066     CMutex input_tag_mutex_;
00067     ros::Subscriber input_tag_subscriber_;
00068  
00069     
00070     Uncalibvs_simAlgorithm uncalib_vs_sim_alg;
00071 
00072     bool mutex, init_, ini_vars_;
00073     geometry_msgs::Pose pose_;
00074     geometry_msgs::Twist twist_quad_;
00075     
00076     ros::Time t_,t_old_;
00077 
00078     //Dynamic reconfigure vars
00079     bool activate_,traditional_,random_points_,quadrotor_,output_files_,arm_unina_,arm_catec_;
00080     double  lambda_,dist_to_tag_,fixed_to_id_;
00081     int num_joints_;
00082     std::string path_;
00083 
00084     KDL::Chain kdl_chain_;
00085     Eigen::MatrixXf q_,lambda_robot_;
00086     Eigen::Matrix3f Rquad_inertial_;
00087     
00088     // [service attributes]
00089 
00090     // [client attributes]
00091 
00092     // [action server attributes]
00093 
00094     // [action client attributes]
00095 
00096 
00097 
00098   public:
00105     Uncalibvs_simAlgNode(void);
00106 
00113     ~Uncalibvs_simAlgNode(void);
00114 
00115   protected:
00128     void mainNodeThread(void);
00129 
00142     void node_config_update(Config &config, uint32_t level);
00143 
00150     void addNodeDiagnostics(void);
00151 
00152     // [diagnostic functions]
00153     
00154     // [test functions]
00155 };
00156 
00157 #endif


iri_uncalibvs_sim
Author(s): Àngel Sanatamaria Navarro
autogenerated on Fri Dec 6 2013 21:57:13