(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Testing a Phidget RFID Reader

Description: This tutorial shows you how to test a Phidget RFID reader and view tag data changes published to a ROS topic.

Keywords: phidgets, rfid

Tutorial Level: BEGINNER

One Time Setup Instructions

The phidgets_ros package calls phidgets_py_api which loads the Phidgets C Api (phidgetspp_c_api). On linux, by default, USB devices are not writeable by anybody but root. This can be solved by following the udev ruleset instructions in the phidgetspp_c_api package. You will need to build this package to get the instructions and the rule file:

$ roscd phidgetspp_c_api
$ rosmake

Following the udev instructions in build/Phidgetlinux/README file.

$ sudo cp build/Phidgetlinux/phidget21/udev/*.rules /etc/udev/rules.d/.

then restart udev:

$ sudo /etc/init.d/udev restart

You will also need to set up one last environment variable so that libusb will look at /dev/bus/usb instead of /proc/bus/usb.

$ export USB_DEVFS_PATH=/dev/bus/usb

After this, you should be able to connect your Phidget.

Compiling

Start by compiling the driver:

$ rosmake phidgets_ros

To Run

Run the rfidscan node. (You might be prompted to start roscore in another shell if it is not already running.)

$ rosrun phidgets_ros rfidscan.py

You should see something like this:

  • Please attach RFID reader now. (waiting 15 seconds)

Connect a Phidget RFID reader using a USB cable to your PC.

Confirming RFID Output

Move the reader over a rfid tag to create data changes. To monitor the changes, echo the rfid ROS topic:

$ rostopic list
$ rostopic echo /rfid

You should see something like this:

  • ---
    gained: True
    tag: 15007ED062
    ---
    gained: False
    tag: 15007ED062
    ---
    gained: True
    tag: 15007EC21A
    ---
    gained: False
    tag: 15007EC21A

Wiki: phidgets_ros/Tutorials/Testing a Phidget RFID Reader (last edited 2010-03-04 22:57:49 by CaraS)