Page tree
Skip to end of metadata
Go to start of metadata

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

Laptop Prototype

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. 

  1. Add the ROS package to your system
    1. Clone the thingmagic_rfid ROS package source code to your local ROS system.

      cd ~/catkin_ws/src
      git clone
    2. Re-build the ROS packages

      cd ~/catkin_ws
    3. Re-read the ROS local setup so the system is aware of the new package

      source devel/setup.bash 
  2. 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.)
    1. Use the dmesg  command to see what device is associated with the hardware. 

      For example, if the tail end of the output from the dmesg  command looks like this...

      [159390.626429] usb 1-1: new full-speed USB device number 12 using xhci_hcd
      [159390.776431] usb 1-1: New USB device found, idVendor=2008, idProduct=1004
      [159390.776434] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
      [159390.776435] usb 1-1: Product: USBPro271634701197711C
      [159390.776436] usb 1-1: Manufacturer: ThingMagic, Inc.
      [159390.777062] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

      then we would expect the USB reader to be accessible through the port /dev/ttyACM0 .

  3. Launch the think_reader_node

    roslaunch thingmagic_rfid reader.launch port:=/dev/ttyACM0

    Note the use of the optional "port" command line argument to specify the device port location.  The default value for this is "/dev/ttyACM0".

    1. The node runs in debug mode, so output is sent to the screen each time a new tag is read.
  4. In another window, verify that you are receiving messages on the "/rfid" topic

    rostopic echo /rfid
  5. 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...

[ INFO] [1557181795.002511087]: Creating reader object with URI <tmr:///dev/ttyACM1>
Error connecting reader: Permission denied
[FATAL] [1557181795.002885833]: Error ???[?v???v: Error %s: %s

[thing_reader_node-1] process has died [pid 2011, exit code 1, cmd /home/frl/catkin_ws/devel/lib/thingmagic_rfid/thing_reader_node __name:=thing_reader_node __log:=/home/frl/.ros/log/5b03fbc4-704e-11e9-8808-c85b76c7f423/thing_reader_node-1.log].
log file: /home/frl/.ros/log/5b03fbc4-704e-11e9-8808-c85b76c7f423/thing_reader_node-1*.log
all processes on machine have died, roslaunch will exit

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...

  1. add your user to the dialout group so that it has such permissions.

    sudo adduser USERNAME dialout

    changing USERNAME for the specific username you are using.  For the Raspberry Pi, with USERNAME=frl

    sudo adduser frl dialout
  2. Restart the computer

    sudo reboot now

Turtlebot Integration

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.

scp -r ~/catkin_ws/src/thingmagic_rfid frl@TB_IP_ADDRESS:~/catkin_ws/src

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.,

roslaunch thingmagic_rfid reader.launch port:=/dev/ttyACM1

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...

A solution is to set respawn="true" in the reader.launch file so that the node immediately attempts to restart.  Early testing shows that this addresses the problem.


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.

  • No labels