EOL distros:

Melodic

Interface for using ROS with the Gazebo simulator.

RFID System Gazebo Plugin

RFID System Gazebo Plugin is a set of ROS packages that provide the necessary interfaces to simulate the functionality of an RFID antenna and an RFID tag in the Gazebo 3D rigid body simulator for robots. It integrates with ROS using ROS messages, services and transforms.

These plugins are designed to be able to adapt and be used with any robot simulated in gazebo by including the models and plugins adequately in the robot sdf file.

a tutorial here explains the use of these plugins with an autonomous areal robot using the RFID system which is basically composed of both RFID antenna & RFID tags plugins.

IMPORTANT: Please install dependencies required for gazebo 9 and iris drone for the simulation to be able to work.

RFID Antenna Sensor Gazebo Plugin

Overview

The first plugin would be the RFID Antenna plugin which basically consists of the model folder diptera_antenna_direction file and the plugin that simulates the behavior of an RFID reader/antenna, the plugin is a ros package that can be simply compiled using catkin_make. in real life RFID antennas perform two very important functions. First, they transmit power to the RFID tags by activating them, and second, they receive data back from the activated tags. A single antenna can activate and receive data from multiple tags simultaneously.

similarly in simulation, the antenna/reader diptera_antenna plugin will be able to detect tags using a probability density function simulating the environment effect upon the detection, The telecommunication parameters that govern the probability of detection are:

Params

NOTE: These parameters could be changed in the sdf file in diptera_antenna's gazebo models folder.

  • <Antenna-id>: A parameter that gives the antenna a unique id ,this parameter able the reuse of the same plugin by adding multiple antennas in the simulation, each antenna will function independently then the others.

  • <Topic>: A parameter that specifies the pose topic of the robot, this parameter able the adaptation of different types of robots.

  • <ΨBW>: Beamwidth is the angle from which the majority of the antenna's power, as illustrated on the radiation pattern's main lobe, radiates. It may be measured in the horizontal or vertical planes and is the distance between two points where the power is less than half of the maximum.

https://raw.githubusercontent.com/abdu-bot/AdvanDiptera_VIO/master/rfid-antennas-beamwidth-directivity-1.png

  • This parameter represents the the azimuth beam-width of the antenna.
  • <φBW>: This parameter represents the elevation beam-width of the antenna.

  • <rzero>: R0 is a parameter that represents the distance at where the probability distribution function = 0.5.

  • <phizero>: A parameter that represents the normalized antenna pattern at 0deg.

TF

  • in order for the plugin to work the antenna frame and relative pose in ros must be set correctly in the gazebo_to_ros_tf package launch file.

   1 <launch>
   2 
   3         <node pkg="gazebo_to_ros_tf"
   4               name="world_to_ros"
   5               type="world_to_ros.py" output="screen">
   6         </node>
   7         <node pkg="tf"
   8                 type="static_transform_publisher"
   9                 name="map1_to_odom_publisher"
  10                 args="0 0 0 0 0 0 map odom_sim 100" />
  11         <node pkg="tf"
  12                 type="static_transform_publisher"
  13                 name="base_link_to_antenna_publisher2"
  14                 args="0.12 0 -0.11 0 0 0 base_link_sim diptera_antenna 100" />

However, if you would like to use more then one RFID antenna/reader attached to the same robot an example would be like this:

   1 <launch>
   2 
   3         <node pkg="gazebo_to_ros_tf"
   4               name="world_to_ros"
   5               type="world_to_ros.py" output="screen">
   6         </node>
   7         <node pkg="tf"
   8                 type="static_transform_publisher"
   9                 name="map1_to_odom_publisher"
  10                 args="0 0 0 0 0 0 map odom_sim 100" />
  11         <node pkg="tf"
  12                 type="static_transform_publisher"
  13                 name="base_link_to_antenna_publisher2"
  14                 args="0.12 0 -0.11 0 0 0 base_link_sim diptera_antenna_front 100" />
  15         <node pkg="tf"
  16                 type="static_transform_publisher"
  17                 name="base_link_to_antenna_publisher1"
  18                 args="-0.12 0 -0.11 3.14 0 0 base_link_sim diptera_antenna_back 100" />
  19         <node pkg="tf"
  20                 type="static_transform_publisher"
  21                 name="base_link_to_antenna_publisher3"
  22                 args="0 0.12 -0.11 1.57 0 0 base_link_sim diptera_antenna_left 100" />
  23         <node pkg="tf"
  24                 type="static_transform_publisher"
  25                 name="base_link_to_antenna_publisher4"
  26                 args="0 -0.12 -0.11 -1.57 0 0 base_link_sim diptera_antenna_right 100" />

which shows that 4 antenna frames are connected to the base_link_sim frame which represents the robot frame. an example of 4 antennas connected to an aerial robot is shown below:

assign the relative position/pose of the antenna carefully with the robot, it should be set the same way the antenna model is positioned in gazebo

Admonitions should be used with care. A page riddled with admonitions will look restless and will be harder to follow then a page where admonitions are used sparingly.

RFID Tag Sensor Gazebo Plugin

Overview

The second plugin would be the RFID tags plugin which consists of two model folders small_fixture & RFID_tag folders and the plugin that simulates the behavior of the RFID tags that are usually attached to a product/box "fixture", this plugin is also a ros package that can be simply compiled using catkin_make. in real life RFID Tags are small objects that contain a chip and an antenna for wireless identification of the objects they are attached to (or embedded in).

similarly in simulation, the antenna tags "RFID_tag" plugin does two magor tasks, first, it spawns transparent boxes that will contain the tags inside called "fixtures", secondly, it will spawn a number of tags in each box in gazebo, The parameters that could be changed of this plugin are:

Params of the plugin

NOTE: These parameters could be changed in the sdf file in RFID_tag gazebo models folder.

  • <num_tags>: which sets the number of tags spawned in each box.

  • <num_fixtures>: A parameter which sets the number of boxes/fixtures spawned in each row and layer in the world.

  • <isotropic>: A parameter which governs the radiation pattern of the tag.

  • <fixture_map_limit>: A parameter that sets the range limit of how far to spawn the boxes/fixture in the map.

  • <fixture_height>: A parameter that sets the height of each box that contains the tags above the ground.

  • <fixture_rows>: A parameter that sets the number of rows of the boxes/fixtures that will be spawned in the world.

  • <fixture_layers>: A parameter that sets the number of layers or columns of the boxes/fixtures that will be spawned in the world.

TF

unlike the antenna plugin where the antenna model needs to be attached to the robot model and also the antenna frame needs to be attached to the robot frame "base_link_sim", no further adjustment are needed as the RFID_tags plugin will generate a frame for each tag with a relative pose. This frame tree shown :

will be providing important information for the RFID_antenna plugin along side with the other teleco. parameters for calculating the probability density function that outputs the detection of a tag.

HOW TO USE?

First Step

Setting up your Ros source folder: copy the packages gazebo_to_ros_tf gazebo & gazebo_plugin_rfid_antenna & gazebo_plugin_rfid_tags to your source folder catkin_ws/src

   1 git clone https://github....com

Second Step

compiling your workspace: at the location of your workspace folder catkin_ws

   1 catkin_make

Third Step

copying the content inside the folder RFID_System_models to the /gazebo/models folder of your computer.

Fourth Step

add the RFID_antenna & RFID_tags plugins to your robot model sdf file or any other as you like as so: for RFID_tag model

   1 !--for the RFID_tags plugin:-->
   2       <include>
   3       <uri>model://RFID_tag</uri>
   4       <pose>0 0 6 0 0 0</pose>
   5     </include>
   6    <joint name="RFID_1_joint" type="fixed">
   7       <child>RFID_tag::link</child>
   8       <parent>world</parent>
   9       <axis>
  10         <xyz>0 0 1</xyz>
  11         <limit>
  12           <upper>0</upper>
  13           <lower>0</lower>
  14         </limit>
  15       </axis>
  16     </joint>
  17 
  18 !--for the RFID_antenna plugin:-->
  19 <!--______________Antenna_front_______________-->
  20 
  21       <include>
  22       <uri>model://diptera_antenna_front</uri>
  23       <pose>0 0 0 0 0 0</pose>
  24     </include>
  25    <joint name="diptera_antenna_front_joint" type="fixed">
  26       <child>diptera_antenna_front::link</child>
  27       <parent>base_link</parent>
  28       <axis>
  29         <xyz>0 0 1</xyz>
  30         <limit>
  31           <upper>0</upper>
  32           <lower>0</lower>
  33         </limit>
  34       </axis>
  35     </joint>

Finaly

run your gazebo simulation, then run the tf tree node:

   1 roslaunch gazebo_to_ros_tf gazebo_to_ros_tf.launch


CategoryCategory

Wiki: RFIDsensor_Gazebo_plugin (last edited 2021-09-09 14:38:00 by UBICALab)