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

There are many ways to deal ROS topics published by the ThingMagic USB Pro RFID Reader.  You might have your MATLAB/Simulink program subscribe to the rfid topic and react to the detection events.  Another option is to just record the publications in a ROS bag file and post-process the bag file to read the RFID publications and correlate them with the navigation data as illustrated in this example.

Overview

Since the RFID reader publishes String messages (http://docs.ros.org/kinetic/api/std_msgs/html/msg/String.html) on the rfid topic.  In this example a bag file is recorded with the navigation (Odometry and Geonav) and RFID topics.  The MATLAB post-processing does the following:

  1. Selects a subset of the bag file based on the RFID topic name,
  2. Generates a timeseries MATLAB object so that we know the time of each detection event,
  3. Reads the Data field of the String message to find the ID reported by the reader for each event,
  4. Finds a list of the unique ID's reported in the bag file
  5. Uses interpolation to find the navigation estimate nearest in time to each RFID event and plots the location of each event
  6. Determines the mean location (centroid) for the events for each of the unique ID strings and plots this as the cumulative estimate of the tag location

Example

The MATLAB example script builds upon the code from Assignment 7: Sensor Integration and Outdoor Navigation and is available in the mrc_hw7 git repository at https://gitlab.nps.edu/bsbingha/mrc_hw7/blob/master/matlab/plot_rfid.m.  The additional code that deals with the RFID messages is at the end of the script.

If we run this script with the two_bots.bag file at https://gitlab.nps.edu/smsundey/mrc_project/tree/master/data then we get an image like this...

 

 

The green, red and blue open circles are the locations where messages were received on the rfid topic and the large 'X's are the mean location for the collection of each set of events.

 

  • No labels