$search

draw_square.cpp File Reference

#include <ros/ros.h>
#include <turtlesim/Pose.h>
#include <turtlesim/Velocity.h>
#include <std_srvs/Empty.h>
Include dependency graph for draw_square.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 21 of file draw_square.cpp.


Enumeration Type Documentation

enum State
Enumerator:
FORWARD 
STOP_FORWARD 
TURN 
STOP_TURN 

Definition at line 9 of file draw_square.cpp.


Function Documentation

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

Definition at line 43 of file draw_square.cpp.

void forward ( ros::Publisher  vel_pub  ) 

Definition at line 86 of file draw_square.cpp.

bool hasReachedGoal (  ) 

Definition at line 28 of file draw_square.cpp.

bool hasStopped (  ) 

Definition at line 33 of file draw_square.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 147 of file draw_square.cpp.

void poseCallback ( const turtlesim::PoseConstPtr pose  ) 

Definition at line 23 of file draw_square.cpp.

void printGoal (  ) 

Definition at line 38 of file draw_square.cpp.

void stopForward ( ros::Publisher  vel_pub  ) 

Definition at line 51 of file draw_square.cpp.

void stopTurn ( ros::Publisher  vel_pub  ) 

Definition at line 68 of file draw_square.cpp.

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

Definition at line 112 of file draw_square.cpp.

void turn ( ros::Publisher  vel_pub  ) 

Definition at line 99 of file draw_square.cpp.


Variable Documentation

bool g_first_goal_set = false

Definition at line 19 of file draw_square.cpp.

Definition at line 7 of file draw_square.cpp.

State g_last_state = FORWARD

Definition at line 18 of file draw_square.cpp.

Definition at line 6 of file draw_square.cpp.

State g_state = FORWARD

Definition at line 17 of file draw_square.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


turtlesim
Author(s): Josh Faust
autogenerated on Sat Mar 2 13:20:59 2013