GT RoboCup SSL
Soccer software, robot firmware
Joystick Class Referenceabstract

Used for manually controlling robots. More...

Public Member Functions

virtual bool valid () const =0
 Whether or not this Joystick is connected to a real device.
 
virtual void reset ()=0
 Resets any stored values. More...
 
virtual void update ()=0
 Instructs the joystick to updates its values.
 
virtual JoystickControlValues getJoystickControlValues ()=0
 Returns the control values from this joystick. More...
 
int getRobotId ()
 
void setRobotId (int rId)
 

Static Public Member Functions

static void createConfiguration (Configuration *cfg)
 

Static Public Attributes

static ConfigDoubleJoystickRotationMaxSpeed
 
static ConfigDoubleJoystickRotationMaxDampedSpeed
 
static ConfigDoubleJoystickTranslationMaxSpeed
 
static ConfigDoubleJoystickTranslationMaxDampedSpeed
 

Protected Member Functions

QMutex & mutex ()
 

Protected Attributes

int robotId
 

Detailed Description

Used for manually controlling robots.

The joystick's main jobs are to report its status (valid or not) and to return a JoystickControlValues object indicating the desired driving

+ Inheritance diagram for Joystick:
+ Collaboration diagram for Joystick:

Member Function Documentation

◆ getJoystickControlValues()

virtual JoystickControlValues Joystick::getJoystickControlValues ( )
pure virtual

Returns the control values from this joystick.

Note: The controls should be scaled between 0 and 1. The processor handles scaling to real world values.

Returns
The control values for this joystick

Implemented in SpaceNavJoystick, GamepadJoystick, and GamepadController.

◆ reset()

virtual void Joystick::reset ( )
pure virtual

Resets any stored values.

Joysticks are reset whenever the robot they're controlling is switched

Implemented in SpaceNavJoystick, GamepadJoystick, and GamepadController.


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