obstacle_avoidance.h
Go to the documentation of this file.
00001 /******************************************************************************
00002    STDR Simulator - Simple Two DImensional Robot Simulator
00003    Copyright (C) 2013 STDR Simulator
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 3 of the License, or
00007    (at your option) any later version.
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011    GNU General Public License for more details.
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software Foundation,
00014    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015    
00016    Authors : 
00017    * Manos Tsardoulias, etsardou@gmail.com
00018    * Aris Thallas, aris.thallas@gmail.com
00019    * Chris Zalidis, zalidis@gmail.com 
00020 ******************************************************************************/
00021 #ifndef STDR_OBSTACLE_AVOIDANCE_SAMPLE
00022 #define STDR_OBSTACLE_AVOIDANCE_SAMPLE
00023 
00024 #include <iostream>
00025 #include <cstdlib>
00026 #include <cmath>
00027 
00028 #include <ros/package.h>
00029 #include "ros/ros.h"
00030 
00031 #include <stdr_msgs/RobotIndexedVectorMsg.h>
00032 
00033 #include <geometry_msgs/Pose2D.h>
00034 #include <geometry_msgs/Point.h>
00035 #include <geometry_msgs/Twist.h>
00036 #include <sensor_msgs/LaserScan.h>
00037 #include <sensor_msgs/Range.h>
00038 
00043 namespace stdr_samples
00044 {
00049   class ObstacleAvoidance
00050   {
00051     private:
00052       
00054       sensor_msgs::LaserScan scan_;
00055       
00057       ros::Subscriber subscriber_;
00058       
00060       ros::NodeHandle n_;
00061       
00063       std::string laser_topic_;
00064       
00066       std::string speeds_topic_;
00067       
00069       ros::Publisher cmd_vel_pub_;
00070       
00071     public:
00072     
00079       ObstacleAvoidance(int argc,char **argv);
00080       
00085       ~ObstacleAvoidance(void);
00086       
00092       void callback(const sensor_msgs::LaserScan& msg);
00093       
00094   };
00095 }
00096 
00097 #endif


stdr_samples
Author(s): Manos Tsardoulias, Chris Zalidis, Aris Thallas
autogenerated on Wed Sep 2 2015 03:36:41