#include <ArLaserLogger.h>
This class has a pointer to a robot and a laser... every time the robot has EITHER moved the distDiff, or turned the degDiff, it will take the current readings from the laser and log them into the log file given as the fileName to the constructor. Readings can also be taken by calling takeReading which explicitly tells the logger to take a reading.
The class can also add goals, see the constructor arg addGoals for information about that... you can also explicitly have it add a goal by calling addGoal.
Public Member Functions | |
void | addGoal (void) |
Adds a goal where the robot is at the moment. | |
void | addInfoToLog (const char *str,...) |
Adds a string to the log file without a tag for where or when we are. | |
void | addInfoToLogPlain (const char *str) |
Same as addToInfo, but does it without marking robot position. | |
void | addTagToLog (const char *str,...) |
Adds a string to the log file with a tag at the given moment. | |
void | addTagToLogPlain (const char *str) |
Same ass addToLog, but no varargs, wrapper for java. | |
ArLaserLogger (ArRobot *robot, ArLaser *laser, double distDiff, double degDiff, const char *fileName, bool addGoals=false, ArJoyHandler *joyHandler=NULL, const char *baseDirectory=NULL, bool useReflectorValues=false, ArRobotJoyHandler *robotJoyHandler=NULL, const std::map< std::string, ArRetFunctor2< int, ArTime, ArPose * > *, ArStrCaseCmpOp > *extraLocationData=NULL) | |
Constructor. | |
double | getDegDiff (void) |
Gets the degrees to turn at which the robot will take a new reading. | |
double | getDistDiff (void) |
Gets the distance at which the robot will take a new reading. | |
void | setDegDiff (double degDiff) |
Sets the degrees to turn at which the robot will take a new reading. | |
void | setDistDiff (double distDiff) |
Sets the distance at which the robot will take a new reading. | |
void | takeNewReadings (bool takeNew) |
Sets if we're taking old (scan1:) readings. | |
void | takeOldReadings (bool takeOld) |
Sets if we're taking old (sick1:) readings. | |
void | takeReading (void) |
Explicitly tells the robot to take a reading. | |
bool | takingNewReadings (void) |
Gets if we're taking new (scan1:) readings. | |
bool | takingOldReadings (void) |
Gets if we're taking old (sick1:) readings. | |
bool | wasFileOpenedSuccessfully (void) |
Sees if the file was opened successfully. | |
virtual | ~ArLaserLogger () |
Destructor. | |
Protected Member Functions | |
void | goalKeyCallback (void) |
void | internalAddGoal (void) |
void | internalPrintPos (ArPose encoderPoseTaken, ArPose goalPoseTaken, ArTime timeTaken) |
void | internalTakeReading (void) |
void | internalWriteTags (void) |
bool | loopPacketHandler (ArRobotPacket *packet) |
void | robotTask (void) |
The task which gets attached to the robot. | |
Protected Attributes | |
bool | myAddGoalExplicit |
bool | myAddGoalKeyboard |
bool | myAddGoals |
std::string | myBaseDirectory |
double | myDegDiff |
double | myDistDiff |
std::map< std::string, ArRetFunctor2< int, ArTime, ArPose * > *, ArStrCaseCmpOp > | myExtraLocationData |
FILE * | myFile |
std::string | myFileName |
bool | myFirstGoalTaken |
bool | myFirstTaken |
bool | myFlipped |
ArFunctorC< ArLaserLogger > | myGoalKeyCB |
bool | myIncludeRawEncoderPose |
std::list< std::string > | myInfos |
ArJoyHandler * | myJoyHandler |
ArLaser * | myLaser |
ArPose | myLast |
bool | myLastAddGoalKeyboard |
ArPose | myLastGoalTakenPose |
ArTime | myLastGoalTakenTime |
bool | myLastJoyButton |
unsigned char | myLastLoops |
bool | myLastRobotJoyButton |
double | myLastVel |
ArRetFunctor1C< bool, ArLaserLogger, ArRobotPacket * > | myLoopPacketHandlerCB |
bool | myNewReadings |
int | myNumGoal |
bool | myOldReadings |
ArRobot * | myRobot |
ArRobotJoyHandler * | myRobotJoyHandler |
int | myScanNumber |
ArSectors | mySectors |
ArTime | myStartTime |
std::list< std::string > | myTags |
bool | myTakeReadingExplicit |
ArFunctorC< ArLaserLogger > | myTaskCB |
bool | myUseReflectorValues |
bool | myWrote |
void ArLaserLogger::addInfoToLog | ( | const char * | str, | |
... | ||||
) |
Adds a string to the log file without a tag for where or when we are.
Java and Python Wrappers: Not available in Java or Python wrapper libraries.
void ArLaserLogger::addTagToLog | ( | const char * | str, | |
... | ||||
) |
Adds a string to the log file with a tag at the given moment.
Java and Python Wrappers: Not available in Java or Python wrapper libraries.