Aria  2.8.0
ArRatioInputRobotJoydrive Class Reference

Use robot's joystick to control an ArActionRatioInput action and drive the robot. More...

#include <ArRatioInputRobotJoydrive.h>

Public Member Functions

 ArRatioInputRobotJoydrive (ArRobot *robot, ArActionRatioInput *input, int priority=75, bool requireDeadmanPushed=true)
 Constructor. More...
 
virtual ~ArRatioInputRobotJoydrive ()
 Destructor.
 

Protected Member Functions

void fireCallback (void)
 

Protected Attributes

bool myDeadZoneLast
 
ArFunctorC< ArRatioInputRobotJoydrivemyFireCB
 
ArActionRatioInputmyInput
 
bool myRequireDeadmanPushed
 
ArRobotmyRobot
 
ArRobotJoyHandlermyRobotJoyHandler
 

Detailed Description

Use robot's joystick to control an ArActionRatioInput action and drive the robot.

This class connects the joystick data obtained from the robot's built in joystick port (if it has one, not all robots have a joystick port) to an ArActionRatioInput which drives the robot. (See ArRatioInputJoydrive for a similar class that uses a joystick plugged in to the computer.)

A callback is attached to the ArActionRatioInput object which reads joystick information using an ArRobotJoyHandler object, and sets requested drive rations on the ArActionRatioInput object.

See also
ArRatioInputJoydrive
ArActionRatioInput

Constructor & Destructor Documentation

◆ ArRatioInputRobotJoydrive()

ArRatioInputRobotJoydrive::ArRatioInputRobotJoydrive ( ArRobot robot,
ArActionRatioInput input,
int  priority = 75,
bool  requireDeadmanPushed = true 
)

Constructor.

Parameters
robotrobot
inputAction to attach to and use to drive the robot.
priorityPriority of this joystick input handler with respect to other input objects attached to the input action object.
requireDeadmanPushedif this is true the joystick "dead man" button must be pushed for us to drive. If this is false we'll follow the joystick input no matter what

The documentation for this class was generated from the following files: