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

drawingsExampleWithRobot.cpp, serverDemo.cpp, and simpleServerExample.cpp.
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. | |
| void | addDrivingBackwardsCallback (ArFunctor *functor, int position=50) |
| Adds a callback mode for when trying to back up. | |
| void | addSafeDrivingCallback (ArFunctor *functor, int position=50) |
| Adds a callback mode for when safe driving is activated. | |
| void | addToConfig (ArConfig *config, const char *section) |
| Adds to a config in a section. | |
| void | addUnsafeDrivingCallback (ArFunctor *functor, int position=50) |
| Adds a callback mode for when unsafe driving is activated. | |
| ArServerModeRatioDrive (ArServerBase *server, ArRobot *robot, bool takeControlOnJoystick=true, bool useComputerJoystick=true, bool useRobotJoystick=true, bool useServerCommands=true, const char *name="ratioDrive", bool robotJoystickOverridesLocks=true) | |
| Constructor. | |
| virtual void | deactivate (void) |
| The function called when the mode is deactivated. | |
| virtual ArActionGroup * | getActionGroup (void) |
| This function should return the action group this mode uses. | |
| ArActionRatioInput * | getActionRatioInput (void) |
| bool | getSafeDriving (void) |
| Gets whether we're driving safely or not. | |
| bool | getUseLocationDependentDevices (void) |
| Gets whether we're using the range devices that depend on location. | |
| void | ratioDrive (double transRatio, double rotRatio, double throttleRatio, bool isActivating=false, double latRatio=0) |
| Sets the ratio drive action. | |
| void | remDrivingBackwardsCallback (ArFunctor *functor) |
| Removes a callback mode for when trying to back up. | |
| void | remSafeDrivingCallback (ArFunctor *functor) |
| Removes a callback mode for when safe driving is activated. | |
| void | remUnsafeDrivingCallback (ArFunctor *functor) |
| Removes a callback mode for when unsafe driving is activated. | |
| void | setSafeDriving (bool safe, bool internal=false) |
| Sets whether we're safe driving or not. | |
| void | setUseLocationDependentDevices (bool useLocationDependentDevices, bool internal=false) |
| Sets whether we're using the range devices that depend on location. | |
| virtual void | userTask (void) |
| The ArMode's user task, don't need one, subclass must provide if needed. | |
| virtual | ~ArServerModeRatioDrive () |
| Destructor. | |
Protected Member Functions | |
| void | joyUserTask (void) |
| void | ratioFireCallback (void) |
| void | serverGetSafeDrive (ArServerClient *client, ArNetPacket *packet) |
| void | serverRatioDrive (ArServerClient *client, ArNetPacket *packet) |
| void | serverSafeDrivingDisable (void) |
| void | serverSafeDrivingEnable (void) |
| void | serverSetSafeDrive (ArServerClient *client, ArNetPacket *packet) |
Protected Attributes | |
| bool | myDriveSafely |
| ArCallbackList | myDrivingBackwardsCallbacks |
| bool | myGotServerCommand |
| ArServerHandlerCommands * | myHandlerCommands |
| ArRatioInputJoydrive * | myJoydrive |
| ArJoyHandler * | myJoyHandler |
| ArFunctorC< ArServerModeRatioDrive > | myJoyUserTaskCB |
| bool | myLastRobotSafeDrive |
| bool | myLastTimedOut |
| double | myLatRatio |
| ArActionDeceleratingLimiter * | myLimiterBackward |
| ArActionDeceleratingLimiter * | myLimiterForward |
| ArActionDeceleratingLimiter * | myLimiterLateralLeft |
| ArActionDeceleratingLimiter * | myLimiterLateralRight |
| ArActionMovementParameters * | myMovementParameters |
| bool | myNewDriveSafely |
| bool | myPrinting |
| ArActionRatioInput * | myRatioAction |
| ArActionGroup | myRatioDriveGroup |
| ArFunctorC< ArServerModeRatioDrive > | myRatioFireCB |
| ArRatioInputRobotJoydrive * | myRobotJoydrive |
| ArRobotJoyHandler * | myRobotJoyHandler |
| bool | myRobotJoystickOverridesLock |
| double | myRotRatio |
| ArCallbackList | mySafeDrivingCallbacks |
| bool | mySentRecenter |
| ArFunctor2C< ArServerModeRatioDrive, ArServerClient *, ArNetPacket * > | myServerGetSafeDriveCB |
| ArFunctor2C< ArServerModeRatioDrive, ArServerClient *, ArNetPacket * > | myServerRatioDriveCB |
| ArFunctorC< ArServerModeRatioDrive > | myServerSafeDrivingDisableCB |
| ArFunctorC< ArServerModeRatioDrive > | myServerSafeDrivingEnableCB |
| ArFunctor2C< ArServerModeRatioDrive, ArServerClient *, ArNetPacket * > | myServerSetSafeDriveCB |
| bool | myTakeControlOnJoystick |
| double | myThrottleRatio |
| double | myTimeout |
| double | myTransRatio |
| ArCallbackList | myUnsafeDrivingCallbacks |
| bool | myUseComputerJoystick |
| bool | myUseLocationDependentDevices |
| bool | myUseRobotJoystick |
| bool | myUseServerCommands |
| ArServerModeRatioDrive::ArServerModeRatioDrive | ( | ArServerBase * | server, | |
| ArRobot * | robot, | |||
| bool | takeControlOnJoystick = true, |
|||
| bool | useComputerJoystick = true, |
|||
| bool | useRobotJoystick = true, |
|||
| bool | useServerCommands = true, |
|||
| const char * | name = "ratioDrive", |
|||
| bool | robotJoystickOverridesLocks = true | |||
| ) |
Constructor.
| ArServerModeRatioDrive::~ArServerModeRatioDrive | ( | ) | [virtual] |
Destructor.
| void ArServerModeRatioDrive::activate | ( | void | ) | [virtual] |
The function called when the mode is activated.
Subclasses must implement this, but also call baseActivate().-
Implements ArServerMode.
| void ArServerModeRatioDrive::addControlCommands | ( | ArServerHandlerCommands * | handlerCommands | ) |
This adds commands that'll let you disable and enable safe driving.
| void ArServerModeRatioDrive::addDrivingBackwardsCallback | ( | ArFunctor * | functor, | |
| int | position = 50 | |||
| ) | [inline] |
Adds a callback mode for when trying to back up.
| void ArServerModeRatioDrive::addSafeDrivingCallback | ( | ArFunctor * | functor, | |
| int | position = 50 | |||
| ) | [inline] |
Adds a callback mode for when safe driving is activated.
| void ArServerModeRatioDrive::addToConfig | ( | ArConfig * | config, | |
| const char * | section | |||
| ) |
Adds to a config in a section.
| void ArServerModeRatioDrive::addUnsafeDrivingCallback | ( | ArFunctor * | functor, | |
| int | position = 50 | |||
| ) | [inline] |
Adds a callback mode for when unsafe driving is activated.
| void ArServerModeRatioDrive::deactivate | ( | void | ) | [virtual] |
The function called when the mode is deactivated.
Subclasses must implement this, and also call baseDeactivate().
Implements ArServerMode.
| virtual ArActionGroup* ArServerModeRatioDrive::getActionGroup | ( | void | ) | [inline, virtual] |
| ArActionRatioInput* ArServerModeRatioDrive::getActionRatioInput | ( | void | ) | [inline] |
| bool ArServerModeRatioDrive::getSafeDriving | ( | void | ) |
Gets whether we're driving safely or not.
| bool ArServerModeRatioDrive::getUseLocationDependentDevices | ( | void | ) |
Gets whether we're using the range devices that depend on location.
| void ArServerModeRatioDrive::joyUserTask | ( | void | ) | [protected] |
| void ArServerModeRatioDrive::ratioDrive | ( | double | transRatio, | |
| double | rotRatio, | |||
| double | throttleRatio, | |||
| bool | isActivating = false, |
|||
| double | latRatio = 0 | |||
| ) |
Sets the ratio drive action.
| isActivating | a bool set to true only if this method is called from the activate() method, otherwise false | |
| transRatio | Amount of forward velocity to request | |
| rotRatio | Amount of rotational velocity to request | |
| throttleRatio | Amount of speed to request | |
| latRatio | amount of lateral velocity to request (if robot supports it) |
| void ArServerModeRatioDrive::ratioFireCallback | ( | void | ) | [protected] |
| void ArServerModeRatioDrive::remDrivingBackwardsCallback | ( | ArFunctor * | functor | ) | [inline] |
Removes a callback mode for when trying to back up.
| void ArServerModeRatioDrive::remSafeDrivingCallback | ( | ArFunctor * | functor | ) | [inline] |
Removes a callback mode for when safe driving is activated.
| void ArServerModeRatioDrive::remUnsafeDrivingCallback | ( | ArFunctor * | functor | ) | [inline] |
Removes a callback mode for when unsafe driving is activated.
| void ArServerModeRatioDrive::serverGetSafeDrive | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) | [protected] |
| void ArServerModeRatioDrive::serverRatioDrive | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) | [protected] |
| void ArServerModeRatioDrive::serverSafeDrivingDisable | ( | void | ) | [protected] |
| void ArServerModeRatioDrive::serverSafeDrivingEnable | ( | void | ) | [protected] |
| void ArServerModeRatioDrive::serverSetSafeDrive | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) | [protected] |
| void ArServerModeRatioDrive::setSafeDriving | ( | bool | safe, | |
| bool | internal = false | |||
| ) |
Sets whether we're safe driving or not.
| void ArServerModeRatioDrive::setUseLocationDependentDevices | ( | bool | useLocationDependentDevices, | |
| bool | internal = false | |||
| ) |
Sets whether we're using the range devices that depend on location.
| void ArServerModeRatioDrive::userTask | ( | void | ) | [virtual] |
The ArMode's user task, don't need one, subclass must provide if needed.
Reimplemented from ArServerMode.
bool ArServerModeRatioDrive::myDriveSafely [protected] |
bool ArServerModeRatioDrive::myGotServerCommand [protected] |
ArRatioInputJoydrive* ArServerModeRatioDrive::myJoydrive [protected] |
ArJoyHandler* ArServerModeRatioDrive::myJoyHandler [protected] |
bool ArServerModeRatioDrive::myLastRobotSafeDrive [protected] |
bool ArServerModeRatioDrive::myLastTimedOut [protected] |
double ArServerModeRatioDrive::myLatRatio [protected] |
bool ArServerModeRatioDrive::myNewDriveSafely [protected] |
bool ArServerModeRatioDrive::myPrinting [protected] |
ArActionRatioInput* ArServerModeRatioDrive::myRatioAction [protected] |
bool ArServerModeRatioDrive::myRobotJoystickOverridesLock [protected] |
double ArServerModeRatioDrive::myRotRatio [protected] |
bool ArServerModeRatioDrive::mySentRecenter [protected] |
ArFunctor2C<ArServerModeRatioDrive, ArServerClient *, ArNetPacket *> ArServerModeRatioDrive::myServerGetSafeDriveCB [protected] |
ArFunctor2C<ArServerModeRatioDrive, ArServerClient *, ArNetPacket *> ArServerModeRatioDrive::myServerRatioDriveCB [protected] |
ArFunctor2C<ArServerModeRatioDrive, ArServerClient *, ArNetPacket *> ArServerModeRatioDrive::myServerSetSafeDriveCB [protected] |
bool ArServerModeRatioDrive::myTakeControlOnJoystick [protected] |
double ArServerModeRatioDrive::myThrottleRatio [protected] |
double ArServerModeRatioDrive::myTimeout [protected] |
double ArServerModeRatioDrive::myTransRatio [protected] |
bool ArServerModeRatioDrive::myUseComputerJoystick [protected] |
bool ArServerModeRatioDrive::myUseLocationDependentDevices [protected] |
bool ArServerModeRatioDrive::myUseRobotJoystick [protected] |
bool ArServerModeRatioDrive::myUseServerCommands [protected] |
1.4.7