These instructions describe the integration of the ThingMagic Pro RFID reader on the Turtlebot3 robot. The particular context of this project is the class project for ME4823, but this may be helpful for other projects involving this hardware and software.
Prerequisites and Dependencies
- The sensor hardware: https://www.jadaktech.com/products/rfid/usb-rfid-readers/usb-pro/
- The ROS driver software: http://wiki.ros.org/thingmagic_rfid
Before installing the sensor on the TB3, we will test it locally on a laptop computer. This is a very typical first step in integrating a new sensor/actuator.
- Add the ROS package to your system
Clone the thingmagic_rfid ROS package source code to your local ROS system.
Re-build the ROS packages
Re-read the ROS local setup so the system is aware of the new package
- Plugin the ThingMagic reader via USB.
The device shows up as a usb-serial device. (There is some discussion of Serial Ports in Linux that might be helpful.)
dmesgcommand to see what device is associated with the hardware.
For example, if the tail end of the output from the
dmesgcommand looks like this...
then we would expect the USB reader to be accessible through the port
Launch the think_reader_node
Note the use of the optional "port" command line argument to specify the device port location. The default value for this is "/dev/ttyACM0".
- The node runs in debug mode, so output is sent to the screen each time a new tag is read.
In another window, verify that you are receiving messages on the "/rfid" topic
- Now use an RFID tag to generate messages from the reader. The reader simply reports the numerical tag ID to the screen and by publishing a String to the /rfid topic.
Troubleshooting: Permission Denied
When you try to launch the node, you may get an error like this...
The problem is that your user account on the computer (either the laptop or the Raspberry Pi) doesn't have permissions to access the port.
To change this you need to...
add your user to the dialout group so that it has such permissions.
changing USERNAME for the specific username you are using. For the Raspberry Pi, with USERNAME=frl
Restart the computer
Because the TB3 is not on the internet - only on our local wireless network - we need to move the thingmagic_rfid source code from the laptop to the TB3 Raspberry Pi. We can copy the directory and all the files over the network to a robot using
scp command executed from the laptop. Note - you will need change TB3_IP_ADDRESS to the specific Turtlebot3 IP address you are targeting.
Follow the same directions as you did for the local laptop.
Pay special attention to determining the device port message - this will likely be something like
/dev/ttyACM1. If it is different than the default, you will need to provide the port string as a command line input, e.g.,
Note - Intermittent Initialization Error
When running on the Raspberry Pi, there is currently an intermittent problem with the system connecting to the RFID reader through the USB/serial interface. The error looks something like this...
You will want to do some testing with your integration to make sure everything is working properly. Once you have the software working you will want to explore the performance of the RFID reader. The range of the reader is affected by many things, including (but not limited to)
- Antenna design: we will be using the antenna embedded in the USB Pro reader
- Tag design: we have a variety of tags to try
- Orientation between tag and antenna
- Environment - metallic background for the tag or antenna can reduce the effective range
My limited experience is that this reader can pick up most of the tags within ~1 m range. This will change depending on the factors above. Developing a feel for this will help you design tag-finding robot control.