Package-Identification-using-Turtlebot
Robots have been used to improve efficiency in a various tasks in warehouses such as package handling, identification and organization. This project aims to simulate the use of Turtlebot in identifying packages with QR codes, in a warehouse setting.
|
Robots have been used to improve efficiency in a various tasks in warehouses such as package handling, identification and organization. This project aims to simulate the use of Turtlebot in identifying packages with QR codes, in a warehouse setting. The simulation is implemented in Gazebo. ROS packages such as gmapping, and teleop_twist_keyboard are used for mapping the environment in the simulation, while move_base is used for navigation.
Our main focus in this project is QR-code decoding. Image stream from Turtlebot's simulated camera is subscribed and processed to obtain a clear front view of the QR code. The masking and encoding type of the QR code is detected, and it is unmasked to extract a bit stream, which is then coverted to a string. This resultant string is the package ID. Each package ID must have a valid prefix to ensure that appropriate packages have arrived at the warehouse. In our case we use "pack" as a valid prefix. Since there can be errors in odometry in the Turtlebot, it may not always reliably orient itself near the packages which results in a slanted perspective.To ensure that the package identification is robust to such odometry errors, we threshold and isolate the QR code first and then detect Harris corners. These corner points are then used to warp the perspective of the QR code. Only then the decoding is applyed to the image.
The scenario is that some new packages of unknown identities have arrived at the warehouse and are stored in a location allotted to "new arrivals". This location is generally known, along with the floor plan of the warehouse. The Turtlebot starts from another corner of the warehouse and moves towards the packages avoiding all "mapped" obstacles as well as "unmapped" obstacles (the dustbin in front of one of the packages is unmapped.) The Turtlebot then sequentially moves from one package to another identifying and storing the package IDs and locations from which each package can be accessed.
The product backlog, iteration log and time log sheets can be found here.
The sprint planning and review document can be viewed here.
This project is run on top of Ubuntu 16.04 with ROS Kinetic and Gazebo 7.14.
To install ROS Kinetic in Ubuntu 16.04, follow the steps given here. Catkin can be installed from here.
ROS packages such as move_base, actionlib, and gazebo_ros packages should be installed as:
Turtlebot packages that are required can be installed as:
For the vision aspects of the project, we use OpenCV 3.3.1. It can be installed from here
Before building the package, ensure that your catkin workspace is set up properly. In a new terminal, type the following commands:
For more details follow the steps here
Download this repository inside src directory inside your catkin workspace.
After cloning, you should see a package inside src. To build this package, when you're inside the src folder:
To run a fullfledged demo of the Turtlebot in the warehouse setting identifying packages, give:
In Gazebo, the Turtlebot spawns at (-3, -3) and starts navigating towards the packages. Once a goal is reached, ROS info messages will display the state if the identification (whether package is IDed or Turtlebot is waiting for proper identification). When the four packages are detected, the Turtlebot moves to the origin. The package IDs and their locations are then printed and code exits.
Additionally, the navigation, global and local costmaps can be viewed in Rviz.
For additional information see here.
The code related to this demo can be found in the src, launch and include folders.
To run the test cases, run:
All test cases in your catkin workspace can be run while compiling by:
This runs 12 test cases for various methods in the PathPlanner and QReader classes. The code for the tests can be found in the test folder.
Click here to view documentation.
To install Doxygen:
To generate Doxygen documentation, run: