force_navigation_learning_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 _force_navigation_learning_alg_node_h_
00026 #define _force_navigation_learning_alg_node_h_
00027 
00028 #include <iri_base_algorithm/iri_base_algorithm.h>
00029 #include "force_navigation_learning_alg.h"
00030 #include "force_navigation_learning.h" //people prediction library
00031 #include <tf/transform_listener.h>
00032 #include <geometry_msgs/PointStamped.h>
00033 
00034 // [publisher subscriber headers]
00035 #include <std_msgs/Float64MultiArray.h>
00036 #include <geometry_msgs/PoseStamped.h>
00037 #include <iri_perception_msgs/peopleTrackingArray.h>
00038 #include <visualization_msgs/MarkerArray.h>
00039 
00040 // [service client headers]
00041 
00042 // [action server client headers]
00043 
00048 class ForceNavigationLearningAlgNode : public algorithm_base::IriBaseAlgorithm<ForceNavigationLearningAlgorithm>
00049 {
00050   private:
00051     // [publisher attributes]
00052     ros::Publisher learning_data_publisher_;
00053     std_msgs::Float64MultiArray Float64_msg_;
00054     ros::Publisher robot_simulated_pose_publisher_;
00055     geometry_msgs::PoseStamped PoseStamped_msg_;
00056     ros::Publisher trajectories_publisher_;
00057     visualization_msgs::MarkerArray MarkerArray_trajectories_msg_;
00058     ros::Publisher forces_publisher_;
00059     visualization_msgs::MarkerArray MarkerArray_forces_msg_;
00060         ros::Publisher destinations_publisher_;
00061     visualization_msgs::MarkerArray MarkerArray_destinations_msg_;
00062         visualization_msgs::Marker traj_marker_, traj_robot_marker_, robot_marker_;
00063         visualization_msgs::Marker target_marker_;
00064         visualization_msgs::Marker dest_marker_;
00065         visualization_msgs::Marker text_marker_;
00066         visualization_msgs::Marker force_marker_, force_goal_marker_, force_goal2_marker_, force_int_person_marker_,
00067                         force_int_robot_marker_, force_obstacle_map_marker_, force_obstacle_laser_marker_;
00068 
00069     // [subscriber attributes]
00070     ros::Subscriber tracks_subscriber_;
00071     void tracks_callback(const iri_perception_msgs::peopleTrackingArray::ConstPtr& msg);
00072     CMutex tracks_mutex_;
00073 
00074     // [service attributes]
00075 
00076     // [client attributes]
00077 
00078     // [action server attributes]
00079 
00080     // [action client attributes]
00081 
00082         // class atributes
00083         Cforce_navigation_learning force_navigation_;
00084         void init_node();
00085         void vis_trajectories();
00086         void clear_force_markers();
00087         void vis_destinations();
00088         std::string target_frame_, robot_frame_;
00089         tf::TransformListener tf_listener_;
00090         double robot_x_ini_,robot_y_ini_;
00091     Spose robot_desired_position_;
00092         string force_map_path_, destination_map_path_;
00093 
00094   public:
00101     ForceNavigationLearningAlgNode(void);
00102 
00109     ~ForceNavigationLearningAlgNode(void);
00110 
00111   protected:
00124     void mainNodeThread(void);
00125 
00138     void node_config_update(Config &config, uint32_t level);
00139 
00146     void addNodeDiagnostics(void);
00147 
00148     // [diagnostic functions]
00149     
00150     // [test functions]
00151 };
00152 
00153 #endif


iri_force_navigation_learning
Author(s): gferrer
autogenerated on Fri Dec 6 2013 23:51:29