Defines | Enumerations | Functions | Variables
turtle_stroll.cpp File Reference
#include <boost/bind.hpp>
#include <string>
#include <ros/ros.h>
#include <turtlesim/Pose.h>
#include <geometry_msgs/Twist.h>
#include <turtlesim/Spawn.h>
#include <std_srvs/Empty.h>
#include <gateway_msgs/GatewayInfo.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 twist_pub, float linear, float angular)
void forward (ros::Publisher twist_pub)
bool hasReachedGoal ()
bool hasStopped ()
int main (int argc, char **argv)
void poseCallback (const turtlesim::PoseConstPtr &pose)
void printGoal ()
void stopForward (ros::Publisher twist_pub)
void stopTurn (ros::Publisher twist_pub)
void timerCallback (const ros::TimerEvent &, ros::Publisher twist_pub)
void turn (ros::Publisher twist_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
double square_scale = 1.0
double x_vel = 1.0
double z_vel = 0.4

Define Documentation

#define PI   3.141592

Definition at line 29 of file turtle_stroll.cpp.


Enumeration Type Documentation

enum State
Enumerator:
FORWARD 
STOP_FORWARD 
TURN 
STOP_TURN 

Definition at line 17 of file turtle_stroll.cpp.


Function Documentation

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

Definition at line 51 of file turtle_stroll.cpp.

void forward ( ros::Publisher  twist_pub)

Definition at line 95 of file turtle_stroll.cpp.

bool hasReachedGoal ( )

Definition at line 36 of file turtle_stroll.cpp.

bool hasStopped ( )

Definition at line 41 of file turtle_stroll.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 156 of file turtle_stroll.cpp.

void poseCallback ( const turtlesim::PoseConstPtr &  pose)

Definition at line 31 of file turtle_stroll.cpp.

void printGoal ( )

Definition at line 46 of file turtle_stroll.cpp.

void stopForward ( ros::Publisher  twist_pub)

Definition at line 60 of file turtle_stroll.cpp.

void stopTurn ( ros::Publisher  twist_pub)

Definition at line 77 of file turtle_stroll.cpp.

void timerCallback ( const ros::TimerEvent ,
ros::Publisher  twist_pub 
)

Definition at line 121 of file turtle_stroll.cpp.

void turn ( ros::Publisher  twist_pub)

Definition at line 108 of file turtle_stroll.cpp.


Variable Documentation

bool g_first_goal_set = false

Definition at line 27 of file turtle_stroll.cpp.

turtlesim::Pose g_goal

Definition at line 12 of file turtle_stroll.cpp.

Definition at line 26 of file turtle_stroll.cpp.

turtlesim::PoseConstPtr g_pose

Definition at line 11 of file turtle_stroll.cpp.

Definition at line 25 of file turtle_stroll.cpp.

double square_scale = 1.0

Definition at line 15 of file turtle_stroll.cpp.

double x_vel = 1.0

Definition at line 13 of file turtle_stroll.cpp.

double z_vel = 0.4

Definition at line 14 of file turtle_stroll.cpp.



turtle_concert
Author(s): Daniel Stonier , Jihoon Lee
autogenerated on Fri Feb 12 2016 02:51:42