Modules

Normalized-joystick-linux

UJoystick remote UObject (linux)

  • Description

This UObject give access to your Joystick under the urbi environment. The joystick axises' values are noramlized between -1 and 1. There is also a complete example (see joystick.u) allowing to control a Nao-like robot (walk, turn, move head, arms...).

  • What is in this tarball
 - config.mk: configuration file.
 - LICENSE: copyright.
 - Makefile: used by make.
 - normalized-joystick/joystick.cc: define the UObject Joystick which gives the axises' values of the joystick, normalized between -1 and 1, and the buttons' states.
 - normalized-joystick/joystick_information.u: gives the real values of the axises' joystick and buttons' states.
 - normalized-joystick/joystick_profile.u: define a mapping between the real axises' names and buttons' numbers and the ones used in joystick.u.
 - normalized-joystick/joystick_v1.u: gives several examples to show how to move the left shoulder of a robot with the joystick.
 - normalized-joystick/joystick.u: a complete example to manipulate a robot with a joystick.
 - README: help file.
  • Requirements:
 - you need to have the right to access /dev/input/js0 (chmod, chown, chgrp...)
 - Urbi SDK 2.0
 - Libjsw : the joystick library which should be automatically downloaded (available here separately)
 - Common urbiscript files: urbiscript files which should be automatically downloaded (available here separately)
  • Configuration

Set the urbi-sdk location in config.mk

  • Compilation

You only need to run the command "make", then all needed urbiscripts and libraries should appear in the directory "built".

  • How to use this UObject on a computer, for test

Launch an interactive Urbi engine from the built directory:

  cd built
  <urbi-sdk path>/urbi -i

Load an urbiscript file (joystick_information.u to know the real values of your joystick, joystick_v1.u for basic examples, or joystick.u for a complete example):

  load("joystick.u");
  • How to use this UObject on a robot

Copy all urbiscripts file (built/*.u) to the robot in a known path. Plug the joystick on the robot:

  cd built
  <urbi-sdk path>/urbi-launch normalized-joystick.so -H <robot ip address> -P <port>

Connect to the robot and load an urbiscript file:

  nc <robot ip address> <port>
  load("joystick.u");

- Support Force Feedback :-)

Options: