|
playerjoy.cc File Reference
#include <termios.h>
#include <assert.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <playerclient.h>
#include <time.h>
#include <pthread.h>
#include <list>
Define Documentation
#define KEYBOARD_SUPPORT 1
|
|
#define JOYSTICK_SUPPORT 0
|
|
|
Value: "USAGE: playerjoy [options] <host:port> [<host:port>] ... \n" \
" -v : verbose mode; print Player device state on stdout\n" \
" -3d : connect to position3d interface (instead of position)\n" \
" -c : continuously send commands\n" \
" -n : dont send commands or enable motors (debugging)\n" \
" -k : use keyboard control\n" \
" -p : print out speeds on the console\n" \
" -udp : use UDP instead of TCP\n" \
" -speed : maximum linear speed (m/sec)\n" \
" -turnspeed : maximum angular speed (deg/sec)\n" \
" <host:port> : connect to a Player on this host and port\n"
|
#define DEFAULT_HOST "localhost"
|
|
#define DEFAULT_PORT PLAYER_PORTNUM
|
|
#define KEYCODE_COMMA 0x2c
|
|
#define KEYCODE_PERIOD 0x2e
|
|
#define COMMAND_TIMEOUT_SEC 0.2
|
|
#define PERCENT |
( |
X |
|
) |
((X) * 100.0 / AXIS_MAX)
|
|
#define PERCENT_POSITIVE |
( |
X |
|
) |
(((PERCENT(X)) + 100.0) / 2.0)
|
|
#define KNORMALIZE |
( |
X |
|
) |
((((X) * 1024.0 / AXIS_MAX)+1024.0) / 2.0)
|
|
#define NORMALIZE_SPEED |
( |
X |
|
) |
( (X) * max_speed / AXIS_MAX )
|
|
#define NORMALIZE_TURN |
( |
X |
|
) |
( (X) * max_turn / AXIS_MAX )
|
|
Typedef Documentation
Function Documentation
void* keyboard_handler |
( |
void * |
arg |
) |
|
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
|
|
Variable Documentation
Generated on Tue May 3 14:15:42 2005 for Player by 1.3.6
|