This page explains how to pair the ps3 joystick with the computer via bluetooth
$ sudo apt-get install ros-fuerte-joystick-drivers
Open up a terminal, load the MAC address of the bluetooth dongle into the joystick:
$ sudo bash
$ rosrun ps3joy sixpair
$ rosrun ps3joy ps3joy.py
Press the 'Pair' button in the center of the joystick, you should be able to see
`Connection is Activated.'
ps3joy.py exposes the data of the button, axes, three-axis accelerometer, single-axis gyroscope.see the ROS wiki page for ps3joy package
To see the data from the joystick, open a new terminal, type
$ jstest /dev/input/js?
Hold the 'Pair' button for 10 seconds to unpair.