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.
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.
- 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
You can access Project Live Technical Presentation, Project Demo Video and Project Slides from these tags, respectively
- ROS Melodic
- Ubuntu 18.04 LTS
- TURTLEBOT3
- catkin: Comes default with ROS-melodic installation
- Gazebo: Comes default with ROS-melodic installation
- OpenCV 3.2.0: Comes default with Ubuntu-18.04 and ROS Melodic.
- cv_bridge
- geometry_msgs
- image_transport
- move_base_msgs
- roscpp
- sensor_msgs
- std_msgs
Install ROS melodic and setup catkin workspace by following this tutrial:
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
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
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.
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
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
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
In our succeeding versions, we intend to do the following:
- Robust navigation algorithm for the
mover
node: Treat this problem as a reactive planning problem to make it robust for any uncertain environment. - Intelligent detection for the
detector
node: Employ a Deep Neural Network to detect known anomaly classes. - Randomize Environment: Randomize spawning of the anomalies randomly in the environment
- 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.
- 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