Skip to content

varunasthana92/object_anomaly_detection

 
 

Repository files navigation

Vision Based Object Anomoly Detection System (V-OADRS)

License Build Status Coverage Status

Overview

V-OADRS stands for Vision-based Object Anomaly Detection Robotic System, a special purpose robotic system designed for Acme Robotics, for their future product line. With the changing trend in manufacturing industries for theadoption of autonomous processes, the V-OADRS system can fill the gaps for autonomous inspection toachieve desired quality standards. This robotic system is mainly designed for plastic product manufacturing industries. V-OADRS will scan and inspect the object placed in the defined workspace of the robot, on an assumedwell-defined inspection location or fixture, for proper relative orientation of an object with respect to thearm manipulator (having a scanner mounted on it).

The system can be programmed to detect any user-defined anomaly (based on the quality needs). For demonstration, we will detect the presence of a definednumber of holes and their diameters as a quality checkpoint on an object.V-OADRS will generate an output highlighting the number of holes detected and the diameter of each.It will also tell if the diameter of the holes is in the (predefined) acceptable range or not.

Dependencies

To install and use this package successfully, you need to have all the following dependencies installed on your machine.

  • Ubuntu 16.04 LTS
  • Ros kinetic
  • Gazebo 7.0
  • OpenCV 3.3.0
  • ROS-Industrial Universal Robot package

You can follow official ubuntu guidelines provided here to install Ubuntu 16.04 on your local machine. Though virtual machine can be used, but we highly recommend local installation for better performance with gazebo simulation

Follow official ROS installation guidelines provided here to install ROS kinetic.

To install gazebo 7.0 follow this instructions.

Install OpenCV 3.3.0 refer this page.

Development Process

Agile iterative process is being followed for project. The roles were divided into driver and navigator, which were shuffled as per tasks. You can find all iteration and products logs here. Sprint planning and review notes are here.

How to build

Create catkin_ws

You should have a catkin workspace before you can build this project. You can create a catkin workspace with following commands.

mkdir catkin_ws && cd catkin_ws
mkdir src && cd src

Now if you are present in src directory, you need to clone the official ROS-Industrial Universal Robot package to this workspace and it's dependencies and then clone this repository.

sudo apt-get install ros-kinetic-universal-robots
git clone https://github.com/ros-industrial/universal_robot
git clone https://github.com/varunasthana92/object_anomaly_detection.git

Official Universal Robot package does not have a camera mounted on it. We have uploaded a modified URDF file with USB camera to this repository and you need to replace official file with the one provided here or you can manually replace those files.

cp object_anomaly_detection/urdf/ur5.urdf.xacro universal_robot/ur_description/urdf/
cp object_anomaly_detection/urdf/common.gazebo.xacro universal_robot/ur_description/urdf/
cp object_anomaly_detection/urdf/ur5_joint_limited_robot.urdf.xacro universal_robot/ur_description/urdf/

Now you are ready to build this package. Use following command to build. Make sure you are in your workspace

cd ..
catkin_make

How to launch

You can use following command to launch a demo. This will start a gazebo with robot and environment with inspection parts in it.

cd catkin_ws
source devel/setup.bash
roslaunch object_anomaly_detection voadrs.launch

In second terminal

cd catkin_ws
source devel/setup.bash
roslaunch object_anomaly_detection measure.launch

The second launch file will ask you which job you want to measure and it will move the robot to that position to measure the dimention of hole.

Demo Links

Click here to watch the complete instruction video on how to run this project.

https://www.youtube.com/watch?v=xiTwMtg6cR0&feature=youtu.be

Doxygen Documentation

The doxygen generated documents have been added to the docs folder of the repository. A config file named 'Doxyfile' has been added to generate the documentation. To generate the doxygen documentation, follow the steps below:

cd ~/catkin_ws/
source devel/setup.bash
cd src/object_anomaly_detection/
doxygen Doxyfile

Presentation

You can find the presentation of of this project at the link below.

https://docs.google.com/presentation/d/1tPtoF0agk6jwrUVay_7XkGaMXW4imztTqSEKlOgopKw/edit?usp=sharing

Tests

After you have build the project you can write following commands to run tests

cd catkin_ws
source devel/setup.bash
catkin_make run_tests_object_anomaly_detection

Cpplint and Cppcheck

You can use the following command to check cpplint and cppcheck errors

cpplint $( find . -name \.hpp -or -name \.cpp | grep -vE -e "^./results" -e "^./test" -e "^./docs" )
cppcheck $( find . -name \.hpp -or -name \.cpp | grep -vE -e "^./results" -e "^./test" -e "^./docs" )

Code Coverage

cd ~/catkin_ws/build
lcov --directory . --capture --output-file coverage.info
lcov --list coverage.info

This will output the coverage of each file in the terminal. To create an html file for the same, run the following command:

genhtml coverage.info --output-directory covout

This will store the index.html file in the folder covout.

Project Contributors

  1. Varun Asthana Mechanical Engineer, Robotics Graduate Student at UMD.

  2. Saumil Shah Mechanical Engineer, Robotics Graduate Student at UMD.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 96.5%
  • CMake 3.5%