#include <ArServerModeDrive.h>
Inheritance diagram for ArServerModeDrive:

Public Member Functions | |
| virtual void | activate (void) |
| The function called when the mode is activated. | |
| void | addControlCommands (ArServerHandlerCommands *handlerCommands) |
| This adds commands that'll let you disable and enable safe driving. | |
| ArServerModeDrive (ArServerBase *server, ArRobot *robot, bool takeControlOnJoystick=false) | |
| virtual void | deactivate (void) |
| The function called when the mode is deactivated. | |
| void | driveJoystick (double vel, double rotVel, bool isActivating=true) |
| virtual ArActionGroup * | getActionGroup (void) |
| This function should return the action group this mode uses. | |
| bool | getSafeDriving (void) |
| void | serverDriveJoystick (ArServerClient *client, ArNetPacket *packet) |
| void | setExtraUnsafeAction (ArAction *action) |
| this action will be activated in unsafe mode | |
| void | setSafeDriving (bool safe) |
| void | setThrottleParams (int lowSpeed, int highSpeed) |
| virtual void | userTask (void) |
| The ArMode's user task, don't need one, subclass must provide if needed. | |
| virtual | ~ArServerModeDrive () |
Protected Member Functions | |
| void | joyUserTask (void) |
| void | serverSafeDrivingDisable (void) |
| void | serverSafeDrivingEnable (void) |
Protected Attributes | |
| ArActionGroupInput | myDriveGroup |
| bool | myDriveSafely |
| ArAction * | myExtraUnsafeAction |
| ArServerHandlerCommands * | myHandlerCommands |
| ArActionInput * | myInputAction |
| ArActionJoydrive | myJoydriveAction |
| ArJoyHandler * | myJoyHandler |
| ArFunctorC< ArServerModeDrive > | myJoyUserTaskCB |
| bool | myNewDriveSafely |
| double | myRotVel |
| ArFunctor2C< ArServerModeDrive, ArServerClient *, ArNetPacket * > | myServerDriveJoystickCB |
| ArFunctorC< ArServerModeDrive > | myServerSafeDrivingDisableCB |
| ArFunctorC< ArServerModeDrive > | myServerSafeDrivingEnableCB |
| ArActionStop | myStopAction |
| bool | myTakeControlOnJoystick |
| double | myVel |
| ArServerModeDrive::ArServerModeDrive | ( | ArServerBase * | server, | |
| ArRobot * | robot, | |||
| bool | takeControlOnJoystick = false | |||
| ) |
| ArServerModeDrive::~ArServerModeDrive | ( | ) | [virtual] |
| void ArServerModeDrive::activate | ( | void | ) | [virtual] |
The function called when the mode is activated.
Subclasses must implement this, but also call baseActivate().-
Implements ArServerMode.
| void ArServerModeDrive::addControlCommands | ( | ArServerHandlerCommands * | handlerCommands | ) |
This adds commands that'll let you disable and enable safe driving.
| void ArServerModeDrive::deactivate | ( | void | ) | [virtual] |
The function called when the mode is deactivated.
Subclasses must implement this, and also call baseDeactivate().
Implements ArServerMode.
| void ArServerModeDrive::driveJoystick | ( | double | vel, | |
| double | rotVel, | |||
| bool | isActivating = true | |||
| ) |
| vel | Forward velocity | |
| rotVel | Rotational velocity | |
| isActivating | a bool set to true only if this method is called from the activate() method, otherwise false |
| virtual ArActionGroup* ArServerModeDrive::getActionGroup | ( | void | ) | [inline, virtual] |
| bool ArServerModeDrive::getSafeDriving | ( | void | ) |
| void ArServerModeDrive::joyUserTask | ( | void | ) | [protected] |
| void ArServerModeDrive::serverDriveJoystick | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
| void ArServerModeDrive::serverSafeDrivingDisable | ( | void | ) | [protected] |
| void ArServerModeDrive::serverSafeDrivingEnable | ( | void | ) | [protected] |
| void ArServerModeDrive::setExtraUnsafeAction | ( | ArAction * | action | ) | [inline] |
this action will be activated in unsafe mode
| void ArServerModeDrive::setSafeDriving | ( | bool | safe | ) |
| void ArServerModeDrive::setThrottleParams | ( | int | lowSpeed, | |
| int | highSpeed | |||
| ) |
| void ArServerModeDrive::userTask | ( | void | ) | [virtual] |
The ArMode's user task, don't need one, subclass must provide if needed.
Reimplemented from ArServerMode.
ArActionGroupInput ArServerModeDrive::myDriveGroup [protected] |
bool ArServerModeDrive::myDriveSafely [protected] |
ArAction* ArServerModeDrive::myExtraUnsafeAction [protected] |
ArActionInput* ArServerModeDrive::myInputAction [protected] |
ArActionJoydrive ArServerModeDrive::myJoydriveAction [protected] |
ArJoyHandler* ArServerModeDrive::myJoyHandler [protected] |
bool ArServerModeDrive::myNewDriveSafely [protected] |
double ArServerModeDrive::myRotVel [protected] |
ArFunctor2C<ArServerModeDrive, ArServerClient *, ArNetPacket *> ArServerModeDrive::myServerDriveJoystickCB [protected] |
ArActionStop ArServerModeDrive::myStopAction [protected] |
bool ArServerModeDrive::myTakeControlOnJoystick [protected] |
double ArServerModeDrive::myVel [protected] |
1.4.7