Defines | Enumerations | Functions | Variables
turtle_stroll.cpp File Reference
#include <boost/bind.hpp>
#include <ros/ros.h>
#include <turtlesim/Pose.h>
#include <turtlesim/Velocity.h>
#include <turtlesim/Spawn.h>
#include <std_srvs/Empty.h>
Include dependency graph for turtle_stroll.cpp:

Go to the source code of this file.

Defines

#define PI   3.141592

Enumerations

enum  State { FORWARD, STOP_FORWARD, TURN, STOP_TURN }

Functions

void commandTurtle (ros::Publisher vel_pub, float linear, float angular)
void forward (ros::Publisher vel_pub)
bool hasReachedGoal ()
bool hasStopped ()
int main (int argc, char **argv)
void poseCallback (const turtlesim::PoseConstPtr &pose)
void printGoal ()
void stopForward (ros::Publisher vel_pub)
void stopTurn (ros::Publisher vel_pub)
void timerCallback (const ros::TimerEvent &, ros::Publisher vel_pub)
void turn (ros::Publisher vel_pub)

Variables

bool g_first_goal_set = false
turtlesim::Pose g_goal
State g_last_state = FORWARD
turtlesim::PoseConstPtr g_pose
State g_state = FORWARD

Define Documentation

#define PI   3.141592

Definition at line 23 of file turtle_stroll.cpp.


Enumeration Type Documentation

enum State
Enumerator:
FORWARD 
STOP_FORWARD 
TURN 
STOP_TURN 

Definition at line 11 of file turtle_stroll.cpp.


Function Documentation

void commandTurtle ( ros::Publisher  vel_pub,
float  linear,
float  angular 
)

Definition at line 45 of file turtle_stroll.cpp.

void forward ( ros::Publisher  vel_pub)

Definition at line 88 of file turtle_stroll.cpp.

bool hasReachedGoal ( )

Definition at line 30 of file turtle_stroll.cpp.

bool hasStopped ( )

Definition at line 35 of file turtle_stroll.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 149 of file turtle_stroll.cpp.

void poseCallback ( const turtlesim::PoseConstPtr &  pose)

Definition at line 25 of file turtle_stroll.cpp.

void printGoal ( )

Definition at line 40 of file turtle_stroll.cpp.

void stopForward ( ros::Publisher  vel_pub)

Definition at line 53 of file turtle_stroll.cpp.

void stopTurn ( ros::Publisher  vel_pub)

Definition at line 70 of file turtle_stroll.cpp.

void timerCallback ( const ros::TimerEvent &  ,
ros::Publisher  vel_pub 
)

Definition at line 114 of file turtle_stroll.cpp.

void turn ( ros::Publisher  vel_pub)

Definition at line 101 of file turtle_stroll.cpp.


Variable Documentation

bool g_first_goal_set = false

Definition at line 21 of file turtle_stroll.cpp.

turtlesim::Pose g_goal

Definition at line 9 of file turtle_stroll.cpp.

Definition at line 20 of file turtle_stroll.cpp.

turtlesim::PoseConstPtr g_pose

Definition at line 8 of file turtle_stroll.cpp.

Definition at line 19 of file turtle_stroll.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


turtle_stroll
Author(s): Daniel Stonier
autogenerated on Sat Jan 5 2013 13:55:06