Skip to content

This project is for Anomaly Detection in an environment using the Turtlebot 3 robot. The software package is built and tested using ROS Melodic and Gazebo simulation environment.

License

Notifications You must be signed in to change notification settings

kartikv97/turtlebot_inspection_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turtlebot Inspection Robot ROS Package

Build Status Coverage Status License


Overview

Anomalies in any workplace is considered unwanted and risky in nature. Such workplaces may include a pharamceutical warehouse, a logistic warehouse or even a packaging warehouse. The anomalies can disrupt the setting of the workplace or may be the cause of something much more risky depending on the nature of these anomalies. For example, an unwanted substance in the pharmaceutical warehouse may result in a severe scare. This could even have damaging ramifications to the industry. This is the basis of our motivation for thi project.

In this project, we developed a real time inspection robot using TurtleBot 3. We have created an executable ROS package (ROS Melodic) which autonomously navigates the turtlebot in the environment while detecting anomalies by detecting the anomaly color. Thus, the project leverages the idea of greedily recognizing the anomaly color (in this case green) in an environment with red colored objects which resemble properly working objects/machines. In this version of the project, the robot can only recognize the color of the workplace objects. We demonstrate our implementation in a Gazebo Simulation environment with RVIZ. The robot when identifies an anomaly, suggests the coordinates of the anomaly with respect to the robot coordinate frame in real-time.

Anomaly Detection Sample Image

Fig1. Anomaly Detection

We followed an Agile development process with TDD approach to develop the project in 3 sprints. This README provides a walk-through for our project with installation steps and execution steps.

Package Demo GIF

Gif. Product Demo

Authors

  • Kartik Venkat : M.Eng Robotics, UMD | B.Eng Electronics and Telecommunication Engineering, University of Mumbai.
  • Kushagra Agrawal : M.Eng Robotics, UMD | B.Tech Mechanical Engineering, Manipal Institute of Technology.
  • Aditya Khopkar : M.Eng Robotics, UMD | B.Eng Electronics Engineering, University of Mumbai

AIP Document

AIP SprintDoc

Project Demonstration and Presentation

Presentation DemoVideo Slides

You can access Project Live Technical Presentation, Project Demo Video and Project Slides from these tags, respectively

Dependencies

Direct Dependencies

  1. ROS Melodic
  2. Ubuntu 18.04 LTS
  3. TURTLEBOT3

Other Dependencies

  1. catkin: Comes default with ROS-melodic installation
  2. Gazebo: Comes default with ROS-melodic installation
  3. OpenCV 3.2.0: Comes default with Ubuntu-18.04 and ROS Melodic.

Package Dependencies

  1. cv_bridge
  2. geometry_msgs
  3. image_transport
  4. move_base_msgs
  5. roscpp
  6. sensor_msgs
  7. std_msgs

Install ROS melodic and setup catkin workspace by following this tutrial:

  1. Link to ROS tutorial!

Step 1 : Standard install via command-line

Follow the following steps for comprehensive installation guide of the package:

$ cd ~/catkin_ws/src
$ git clone --recursive https://github.com/kartikv97/turtlebot_inspection_bot.git
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash

Step 2 : Running Simulation

Gazebo and RVIZ packages are used by this package for visualization. Refer the following figure. After following Step 1, in the same terminal follow the following steps:

$ export TURTLEBOT3_MODEL=waffle_pi
$ roslaunch turtlebot_inspection_bot turtlebot_simulation.launch

Visualization Window

Fig2. Visualization Window

Rosbag

This package is rosbag compliant. The bag file can be accessed from results/turtlebot_inspection_bot.bag. You may inspect the bag file by the command rosbag info results/*.bag. The bag file has a 46 seconds long recorded simulation of the package. You may use the bag file to play the simulation results by operating the following commands in three terminals simultaneously:

Terminal 1:

$ roscore

Terminal 2:

$ cd ~/catkin_ws/src/turtlebot_inspection_bot
$ rosbag play results/*.bag

Terminal 3:

$ rqt_console

The package also come with record functionality for rosbag. i.e., you can record your own rosbag for the package by first building the project and launching it as follows:

$ roslaunch turtlebot_inspection_bot turtlebot_simulation.launch record:=true

The result can be accessed in the results the directory.

Run ROS Test

The package has Level 2 Unit Test compliance. You can run the ROS tests by following the following two options:

Option 1

$ cd ~/catkin_ws
$ source devel/setup.bash
$ catkin_make run_tests_turtlebot_inspection_bot              

Option 2

$ cd ~/catkin_ws
$ source devel/setup.bash
$ rostest turtlebot_inspection_bot test.launch

Doxygen

To install doxygen run the following command:

$ sudo apt-get install doxygen

You can run the doxyfile in the package to generate files by the following command:

$ cd ~/catkin_ws/src/turtlebot_inspection_bot
$ doxygen docs/Doxyfile

You can access the html file by

$ firefox docs/html/index.html

Code Coverage (Locally)

To test the code coverage of the package locally you may follow,

$ cd ~/catkin_ws/build 
$ lcov --directory . --capture --output-file coverage.info
$ lcov --remove coverage.info '/opt/*' '/usr/*' '*/devel/*' '*test_*' '*_test*' --output-file coverage.info 
$ lcov --list coverage.info 
$ genhtml coverage.info --output-directory covout

This creates index.html file in build/covout, which can be accessed

Future Work

In our succeeding versions, we intend to do the following:

  1. Robust navigation algorithm for the mover node: Treat this problem as a reactive planning problem to make it robust for any uncertain environment.
  2. Intelligent detection for the detector node: Employ a Deep Neural Network to detect known anomaly classes.
  3. Randomize Environment: Randomize spawning of the anomalies randomly in the environment
  4. Use transforms: Get the real world coordinates with respect to the world frame than the robot frame.

Note: Press ctrl+c in the terminal to stop the program.

TODO

  • Sprint Week 2
    • Create worlds/anomalies.world
    • Stub implementation
    • Unit tests
  • Sprint Week 3
    • Update worlds/anomalies.world to encode color information
    • Complete both Node Implementation
    • Verify that all Tests pass
    • Verify atleast 80% Code Coverage

About

This project is for Anomaly Detection in an environment using the Turtlebot 3 robot. The software package is built and tested using ROS Melodic and Gazebo simulation environment.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published