Vizzy PC104: Difference between revisions
(New page: ==Computation power== '''Debian Linux installation on the PC104''' Due to the constraints of PCAN bus module, the Debian version must be 4.0 (etch) Linux version 2.6.24-etchnhalf.1-6...) |
No edit summary |
||
Line 108: | Line 108: | ||
player <configFileName> | player <configFileName> | ||
[[Vizzy|<< Back to Vizzy wiki homepage]] | |||
[[Category:Robots]] | |||
[[Category:Vislab]] |
Revision as of 14:00, 23 September 2011
Computation power
Debian Linux installation on the PC104
Due to the constraints of PCAN bus module, the Debian version must be 4.0 (etch)
Linux version 2.6.24-etchnhalf.1-686
The repositories of this version are not online anymore, so in order to install the system, you should:
- Download the netinstaller and the DVDs containing the packages, http://www.debian.org/releases/etch/debian-installer/
- During installation, there will be a problem due to the unavailability of the packages. At this point continue the install procedure and when rebooting the system you will be able to add manually all the packages you need.
Installation of PCAN bus driver
The original installation procedure is on the robotCub wiki, http://eris.liralab.it/wiki/The_Linux_on_the_pc104 and http://eris.liralab.it/wiki/Compilation_on_the_pc104 . We follow the same procedure,
1) In addition to the iCub and YARP environment variables, and depending on the device you use you will also need:
PLXCANAPI_DIR=/usr/local/src/robot/drivers/plxCanApi
It is recommended to add this variable to the /etc/bash.bashrc (as root)
export PLXCANAPI_DIR=/usr/local/src/robot/drivers/plxCanApi
2) Uncompress the file http://eris.liralab.it/iCub/downloads/drivers/linux/pc104etchnhalf-bin-1.2.tgz in the folder /usr/local/src/robot/.
3) Compilation of the iCub repository, which it needs to enable the follwing flags:
ENABLE_icubmod_pcan ENABLE_icubmod_canmotioncontrol ENABLE_icubmod_dragonfly2 ENABLE_icubmod_logpolarclient ENABLE_icubmod_logpolargrabber ENABLE_icubmod_xsensmtx
ToDo: Check the source code provided by IIT in order to compile it against newer or other Linux versions.
Start up script for PCAN bus driver
Add the following lines to /etc/rc.local script:
declare -x PLX_SDK_DIR=/usr/local/src/robot/drivers/plxCanApi bash -c "$PLX_SDK_DIR/Bin/Plx_load 9030"
The lines above allow the PLX module loading during the pc104 boot.
Enviroment variables for running the iCubInterface
Add the following lines to /etc/bash.bashrc (as root)
export ICUB_DIR=/iCub export ICUB_ROOT=/iCub export YARP_DIR=/yarp2/build export YARP_ROOT=/yarp2
We recommend to add the lines above before the following lines on /etc/bash.bashrc
# If not running interactively, don't do anything [ -z "$PS1" ] && return
The proper placing of the environment variables will allow to access their values on a non-interactive login.
Enviroment variables for remote login
For remote access such as ssh (putty on Windows), you should add the following line to /etc/profile (as root), right at the beginning:
/source /etc/bash.bashrc
Dragonfly2
The dragonfly2 requires a libdc1394 library with version >= 2.0.0, which needs to be compiled for this debian version. In addition, we added the following line to the /etc/rc.local script:
chmod a+rw /dev/raw1394
in order to allow all the users to access the firewire devices.
Segway RMP 50
The Player project http://playerstage.sourceforge.net/ includes a driver for all the Segway RMP platforms. The Player version installed is the 3.0.2, which needs the CAN driver from Kvaser http://www.kvaser.com/. After downloading the driver from Kvaser, the CMAKE variable CANLIB_DIR must point to the folder where the Kvaser folder was decompressed.
In order to compile Player properly, you may have to edit /usr/include/canlib.h and comment out the definitions for DWORD, HANDLE, and BOOL.
After installing player, a way to test the installation is to plug an USB joystick for controlling the Segway and define a configuration file for player as follows:
driver ( name "linuxjoystick" provides ["joystick:0" ] requires ["position2d:0"] alwayson 1 timeout 0.0 max_speed [ 3.0 3.0 30 ] port "/dev/input/js0" ) driver ( name "segwayrmp" provides ["position2d:0" "position3d:0" "power:0"] bus "usb" usb_device "/dev/ttyUSB0" max_xspeed 1.5 max_yawspeed 80 )
Then, execute
player <configFileName>