Download, compile and install JR3 kernel driver.
cd # go home
mkdir -p repos; cd repos # create $HOME/repos if it doesn't exist; then, enter it
git clone https://github.com/roboticslab-uc3m/jr3pci-linux
cd jr3pci-linux
make
cd /lib/modules/$(uname -r)/kernel/drivers
sudo mkdir -p jr3
sudo cp $HOME/repos/jr3pci-linux/jr3pci-driver.ko jr3/
sudo depmod
To load the compiled driver, add the following lines to /etc/rc.local
(lines before the exit) to automatically run the jr3 module in the PC switching on (may require sudo
if run manually):
modprobe jr3pci-driver # Replaces: insmod jr3pci-driver.ko
mknod /dev/jr3 c 39 0 # Equivalent to (in code dir): make node
chmod 777 /dev/jr3
In order to run the acquisition program for all sensors data acquisition:
- Install https://github.com/roboticslab-uc3m/yarp-devices
- Go to manipulation PC:
yarpdev --device Jr3 --period 20 --name /jr3 --ports "(ch0:o ch1:o ch2:o ch3:o)" --channels 24 --ch0:o 0 5 0 5 --ch1:o 6 11 0 5 --ch2:o 12 17 0 5 --ch3:o 18 23 0 5
- Data can be vizualized via classic
yarp read ... /jr3/ch0:o
or like in teoTools.xml.
Green LEDs should be ON after jr3pci_driver
module is loaded (see lsmod | grep jr3
). Check /etc/rc.local
to see if this is the default upon switching on the PC. Possible fixes if not working:
-
Type
lspci
to see PCI devices connected to the computer. The PCI card AdapterPCI bridge: Pericom Semiconductor PI7C9X110 PCI Express to PCI bridge
should be there. -
Shutdown and review connections!! (review: PCI adapter connections, power and PCI slots).
-
If it is due to a kernel upgrade, sometimes cleaning and installing again works:
cd $HOME/repos/jr3pci-linux sudo make clean make cd /lib/modules/$(uname -r)/kernel/drivers sudo mkdir -p jr3 sudo cp $HOME/repos/jr3pci-linux/jr3pci-driver.ko jr3/ sudo depmod
The following repo contains a driver described as suitable for jr3 for Xenomai using RTDM: https://github.com/wdomski/jr3