#include <ArServerHandlerMapping.h>
Public Member Functions | |
| void | addInfoToLog (const char *str) |
| Adds an info to the log (has no robot pose) (make sure the robot's locked). | |
| bool | addLocationData (const char *name, ArRetFunctor2< int, ArTime, ArPose * > *functor) |
| Adds a new type of location data to the logger. | |
| void | addMappingEndCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
| Adds a callback for the end of mapping. | |
| void | addMappingStartCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
| Adds a callback for the start of mapping. | |
| void | addPostMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
| Adds a callback to be called after moving from temp dir to base dir. | |
| void | addPreMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
| Adds a callback to be called before moving from temp dir to base dir. | |
| void | addSimpleCommands (ArServerHandlerCommands *handlerCommands) |
| Adds the simple commands to the simple command handler passed in. | |
| void | addStringForStartOfLogs (const char *str, ArListPos::Pos position=ArListPos::LAST) |
| Adds a string for adding to the log when we start. | |
| void | addStringsForStartOfLogToMap (ArMap *arMap) |
| A method to add the strings for the start of a log just straight to an ArMap. | |
| void | addTagToLog (const char *str) |
| Adds a tag to the logg (has robot pose and stuff) (make sure the robot's locked). | |
| ArServerHandlerMapping (ArServerBase *server, ArRobot *robot, ArLaser *laser, const char *baseDirectory="", const char *tempDirectory="", bool useReflectorValues=false, ArLaser *laser2=NULL, const char *sickSuffix=NULL, const char *sick2Suffix=NULL) | |
| Constructor. | |
| const char * | getFileName (void) |
| Gets the filename we're using (make sure the robot's locked). | |
| const std::map< std::string, ArRetFunctor2< int, ArTime, ArPose * > *, ArStrCaseCmpOp > * | getLocationDataMap (void) |
| Get location data map (mostly for internal things). | |
| const char * | getMapName (void) |
| Gets the mapname we're using (make sure the robot's locked). | |
| bool | isMapping (void) |
| Returns if we're mapping or not. | |
| bool | packetHandler (ArRobotPacket *packet) |
| The packet handler for starting/stopping scans from the lcd. | |
| void | remMappingEndCallback (ArFunctor *functor) |
| Removes a callback for the end of mapping. | |
| void | remMappingStartCallback (ArFunctor *functor) |
| Removes a callback for the start of mapping. | |
| void | remPostMoveCallback (ArFunctor *functor) |
| Removes a callback to be called after moving from temp dir to base dir. | |
| void | remPreMoveCallback (ArFunctor *functor) |
| Removes a callback to be called before moving from temp dir to base dir. | |
| void | remStringForStartOfLogs (const char *str) |
| Removes a string for adding to the log when we start. | |
| void | serverMappingEnd (ArServerClient *client, ArNetPacket *packet) |
| Ends a map. | |
| void | serverMappingStart (ArServerClient *client, ArNetPacket *packet) |
| Starts a new map unless ones already made. | |
| void | serverMappingStatus (ArServerClient *client, ArNetPacket *packet) |
| Gets the mapping status. | |
| void | simpleLoopEnd (ArArgumentBuilder *arg) |
| Adds a loop end to the log. | |
| void | simpleLoopStart (ArArgumentBuilder *arg) |
| Adds a loop start to the log. | |
| virtual | ~ArServerHandlerMapping () |
| Deconstructor. | |
Protected Attributes | |
| std::string | myBaseDirectory |
| std::string | myFileName |
| std::string | myFileName2 |
| ArServerHandlerCommands * | myHandlerCommands |
| ArLaser * | myLaser |
| ArLaser * | myLaser2 |
| ArLaserLogger * | myLaserLogger |
| ArLaserLogger * | myLaserLogger2 |
| std::map< std::string, ArRetFunctor2< int, ArTime, ArPose * > *, ArStrCaseCmpOp > | myLocationDataMap |
| ArFunctor1C< ArServerHandlerMapping, ArArgumentBuilder * > | myLoopEndCB |
| ArFunctor1C< ArServerHandlerMapping, ArArgumentBuilder * > | myLoopStartCB |
| std::string | myMapName |
| std::list< ArFunctor * > | myMappingEndCallbacks |
| ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingEndCB |
| std::list< ArFunctor * > | myMappingStartCallbacks |
| ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingStartCB |
| ArFunctor2C< ArServerHandlerMapping, ArServerClient *, ArNetPacket * > | myMappingStatusCB |
| ArRetFunctor1C< bool, ArServerHandlerMapping, ArRobotPacket * > | myPacketHandlerCB |
| std::list< ArFunctor * > | myPostMoveCallbacks |
| std::list< ArFunctor * > | myPreMoveCallbacks |
| ArRobot * | myRobot |
| ArServerBase * | myServer |
| std::list< std::string > | myStringsForStartOfLog |
| std::string | mySuffix |
| std::string | mySuffix2 |
| std::string | myTempDirectory |
| bool | myUseReflectorValues |
| ArServerHandlerMapping::ArServerHandlerMapping | ( | ArServerBase * | server, | |
| ArRobot * | robot, | |||
| ArLaser * | laser, | |||
| const char * | baseDirectory = "", |
|||
| const char * | tempDirectory = "", |
|||
| bool | useReflectorValues = false, |
|||
| ArLaser * | laser2 = NULL, |
|||
| const char * | suffix = NULL, |
|||
| const char * | suffix2 = NULL | |||
| ) |
Constructor.
| server | the server to add the handlers too | |
| robot | the robot to map from | |
| laser | the laser to map with | |
| baseDirectory | the directory to put the map file into when its done, NULL or an empty string means into the working directory | |
| tempDirectory | the directory to put the map file into while its being created, if this is NULL or empty it'll use the base directory |
| ArServerHandlerMapping::~ArServerHandlerMapping | ( | ) | [virtual] |
Deconstructor.
| void ArServerHandlerMapping::addInfoToLog | ( | const char * | str | ) |
Adds an info to the log (has no robot pose) (make sure the robot's locked).
| bool ArServerHandlerMapping::addLocationData | ( | const char * | name, | |
| ArRetFunctor2< int, ArTime, ArPose * > * | functor | |||
| ) |
Adds a new type of location data to the logger.
| void ArServerHandlerMapping::addMappingEndCallback | ( | ArFunctor * | functor, | |
| ArListPos::Pos | position = ArListPos::LAST | |||
| ) |
Adds a callback for the end of mapping.
| void ArServerHandlerMapping::addMappingStartCallback | ( | ArFunctor * | functor, | |
| ArListPos::Pos | position = ArListPos::LAST | |||
| ) |
Adds a callback for the start of mapping.
| void ArServerHandlerMapping::addPostMoveCallback | ( | ArFunctor * | functor, | |
| ArListPos::Pos | position = ArListPos::LAST | |||
| ) |
Adds a callback to be called after moving from temp dir to base dir.
| void ArServerHandlerMapping::addPreMoveCallback | ( | ArFunctor * | functor, | |
| ArListPos::Pos | position = ArListPos::LAST | |||
| ) |
Adds a callback to be called before moving from temp dir to base dir.
| void ArServerHandlerMapping::addSimpleCommands | ( | ArServerHandlerCommands * | handlerCommands | ) |
Adds the simple commands to the simple command handler passed in.
| void ArServerHandlerMapping::addStringForStartOfLogs | ( | const char * | str, | |
| ArListPos::Pos | position = ArListPos::LAST | |||
| ) |
Adds a string for adding to the log when we start.
| void ArServerHandlerMapping::addStringsForStartOfLogToMap | ( | ArMap * | arMap | ) |
A method to add the strings for the start of a log just straight to an ArMap.
| void ArServerHandlerMapping::addTagToLog | ( | const char * | str | ) |
Adds a tag to the logg (has robot pose and stuff) (make sure the robot's locked).
| const char * ArServerHandlerMapping::getFileName | ( | void | ) |
Gets the filename we're using (make sure the robot's locked).
| const std::map< std::string, ArRetFunctor2< int, ArTime, ArPose * > *, ArStrCaseCmpOp > * ArServerHandlerMapping::getLocationDataMap | ( | void | ) |
Get location data map (mostly for internal things).
| const char * ArServerHandlerMapping::getMapName | ( | void | ) |
Gets the mapname we're using (make sure the robot's locked).
| bool ArServerHandlerMapping::isMapping | ( | void | ) |
Returns if we're mapping or not.
| bool ArServerHandlerMapping::packetHandler | ( | ArRobotPacket * | packet | ) |
The packet handler for starting/stopping scans from the lcd.
| void ArServerHandlerMapping::remMappingEndCallback | ( | ArFunctor * | functor | ) |
Removes a callback for the end of mapping.
| void ArServerHandlerMapping::remMappingStartCallback | ( | ArFunctor * | functor | ) |
Removes a callback for the start of mapping.
| void ArServerHandlerMapping::remPostMoveCallback | ( | ArFunctor * | functor | ) |
Removes a callback to be called after moving from temp dir to base dir.
| void ArServerHandlerMapping::remPreMoveCallback | ( | ArFunctor * | functor | ) |
Removes a callback to be called before moving from temp dir to base dir.
| void ArServerHandlerMapping::remStringForStartOfLogs | ( | const char * | str | ) |
Removes a string for adding to the log when we start.
| void ArServerHandlerMapping::serverMappingEnd | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
Ends a map.
| void ArServerHandlerMapping::serverMappingStart | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
Starts a new map unless ones already made.
| void ArServerHandlerMapping::serverMappingStatus | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
Gets the mapping status.
| void ArServerHandlerMapping::simpleLoopEnd | ( | ArArgumentBuilder * | arg | ) |
Adds a loop end to the log.
| void ArServerHandlerMapping::simpleLoopStart | ( | ArArgumentBuilder * | arg | ) |
Adds a loop start to the log.
std::string ArServerHandlerMapping::myBaseDirectory [protected] |
std::string ArServerHandlerMapping::myFileName [protected] |
std::string ArServerHandlerMapping::myFileName2 [protected] |
ArLaser* ArServerHandlerMapping::myLaser [protected] |
ArLaser* ArServerHandlerMapping::myLaser2 [protected] |
ArLaserLogger* ArServerHandlerMapping::myLaserLogger [protected] |
ArLaserLogger* ArServerHandlerMapping::myLaserLogger2 [protected] |
std::map<std::string, ArRetFunctor2<int, ArTime, ArPose *> *, ArStrCaseCmpOp> ArServerHandlerMapping::myLocationDataMap [protected] |
ArFunctor1C<ArServerHandlerMapping, ArArgumentBuilder *> ArServerHandlerMapping::myLoopEndCB [protected] |
ArFunctor1C<ArServerHandlerMapping, ArArgumentBuilder *> ArServerHandlerMapping::myLoopStartCB [protected] |
std::string ArServerHandlerMapping::myMapName [protected] |
std::list<ArFunctor *> ArServerHandlerMapping::myMappingEndCallbacks [protected] |
ArFunctor2C<ArServerHandlerMapping, ArServerClient *, ArNetPacket *> ArServerHandlerMapping::myMappingEndCB [protected] |
std::list<ArFunctor *> ArServerHandlerMapping::myMappingStartCallbacks [protected] |
ArFunctor2C<ArServerHandlerMapping, ArServerClient *, ArNetPacket *> ArServerHandlerMapping::myMappingStartCB [protected] |
ArFunctor2C<ArServerHandlerMapping, ArServerClient *, ArNetPacket *> ArServerHandlerMapping::myMappingStatusCB [protected] |
ArRetFunctor1C<bool, ArServerHandlerMapping, ArRobotPacket *> ArServerHandlerMapping::myPacketHandlerCB [protected] |
std::list<ArFunctor *> ArServerHandlerMapping::myPostMoveCallbacks [protected] |
std::list<ArFunctor *> ArServerHandlerMapping::myPreMoveCallbacks [protected] |
ArRobot* ArServerHandlerMapping::myRobot [protected] |
ArServerBase* ArServerHandlerMapping::myServer [protected] |
std::list<std::string> ArServerHandlerMapping::myStringsForStartOfLog [protected] |
std::string ArServerHandlerMapping::mySuffix [protected] |
std::string ArServerHandlerMapping::mySuffix2 [protected] |
std::string ArServerHandlerMapping::myTempDirectory [protected] |
bool ArServerHandlerMapping::myUseReflectorValues [protected] |
1.4.7