Main Page | Modules | Class Hierarchy | Class List | Class Members | Examples

ArServerModeGoto Class Reference

#include <ArServerClasses.h>

Inheritance diagram for ArServerModeGoto:

ArServerMode List of all members.

Detailed Description

Handles going to a goal or point.

Handles requests to go to a goal or point, to go to the home point, or to tour all goals. It sets the server Status and Mode strings when active.

This class adds the following data requests to the server:

gotoGoal
Sends the robot to the goal with the given name.
gotoPose
Sends the robot to the given pose. Parameters are 2 4-byte integers for X and Y, and an optional 4-byte integer for heading.
home
Sends the robot to a home point from the map, or 0,0,0 if none.
goalName
Requests a reply packet containing the name of the current goal
tourGoals
Sends the robot to each goal in the map in turn.
getGoals
Requests a reply packet containing the names of all goals in the map (separated by null byte)
Examples:

guiServer.cpp, and justPathPlanningGuiServer.cpp.


Public Member Functions

void tourGoals (void)
void tourGoalsInList (std::deque< std::string > goalList)
void addTourGoalsInListSimpleCommand (ArServerHandlerCommands *commandsServer)

Protected Member Functions

void reset (void)
void goalDone (ArPose pose)
void goalFailed (ArPose pose)
void findNextTourGoal (void)
 Set myGoalName to the name of the next goal in the tour.
size_t numGoalsTouring ()
 number of goals in current tour, or 0 if none
void planToNextTourGoal ()
 Keep trying to plan paths to goals in a tour, until either a plan succeeds or all the goals fail.
void tourGoalsInListCommand (ArArgumentBuilder *args)
 Used as callback from ArServerHandlerCommands (simple/custom commands).

Protected Attributes

std::deque< std::string > myTouringGoalsList


Member Function Documentation

void ArServerModeGoto::addTourGoalsInListSimpleCommand ArServerHandlerCommands commandsServer  ) 
 

Add a "tour" command to the given "simple commands" object. This simple (custom) command accepts a comma-separated list of goals, builds a list of goals, expanding items ending in a wildcard (*) to maching goals, and omitting invalid goals, and then calls tourGoalsInList().

void ArServerModeGoto::goalDone ArPose  pose  )  [protected]
 

Callback from ARNL when a goal is reached. Set myStatus and other state. If touring, plan the next goal in the tour.

void ArServerModeGoto::goalFailed ArPose  pose  )  [protected]
 

Callback from ARNL when a goal fails. Set myStatus and other state. If touring, plan the next goal in the tour.

void ArServerModeGoto::reset void   )  [protected]
 

Reset state

void ArServerModeGoto::tourGoals void   ) 
 

Enter a "tour goals" mode, in which the robot is sent to each goal in the map in turn. This mode can be entered using the tourGoals networking request.

void ArServerModeGoto::tourGoalsInList std::deque< std::string >  goalList  ) 
 

Enter a "tour goals" mode, in which the robot is sent to each goal in the given list in turn.


Member Data Documentation

std::deque<std::string> ArServerModeGoto::myTouringGoalsList [protected]
 


Generated on Tue Feb 20 10:56:29 2007 for Arnl by  doxygen 1.4.0