-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SaumilShah66/sprint_1_dev
All Ok, I am acepting the merge request
- Loading branch information
Showing
6 changed files
with
461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(voadrs) | ||
|
||
## Compile as C++11, supported in ROS Kinetic and newer | ||
# add_compile_options(-std=c++11) | ||
|
||
## Find catkin macros and libraries | ||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) | ||
## is used, also find other catkin packages | ||
find_package(catkin REQUIRED COMPONENTS | ||
geometry_msgs | ||
roscpp | ||
rospy | ||
std_msgs | ||
) | ||
|
||
## System dependencies are found with CMake's conventions | ||
# find_package(Boost REQUIRED COMPONENTS system) | ||
|
||
|
||
## Uncomment this if the package has a setup.py. This macro ensures | ||
## modules and global scripts declared therein get installed | ||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html | ||
# catkin_python_setup() | ||
|
||
################################################ | ||
## Declare ROS messages, services and actions ## | ||
################################################ | ||
|
||
## To declare and build messages, services or actions from within this | ||
## package, follow these steps: | ||
## * Let MSG_DEP_SET be the set of packages whose message types you use in | ||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). | ||
## * In the file package.xml: | ||
## * add a build_depend tag for "message_generation" | ||
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET | ||
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in | ||
## but can be declared for certainty nonetheless: | ||
## * add a exec_depend tag for "message_runtime" | ||
## * In this file (CMakeLists.txt): | ||
## * add "message_generation" and every package in MSG_DEP_SET to | ||
## find_package(catkin REQUIRED COMPONENTS ...) | ||
## * add "message_runtime" and every package in MSG_DEP_SET to | ||
## catkin_package(CATKIN_DEPENDS ...) | ||
## * uncomment the add_*_files sections below as needed | ||
## and list every .msg/.srv/.action file to be processed | ||
## * uncomment the generate_messages entry below | ||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) | ||
|
||
## Generate messages in the 'msg' folder | ||
# add_message_files( | ||
# FILES | ||
# Message1.msg | ||
# Message2.msg | ||
# ) | ||
|
||
## Generate services in the 'srv' folder | ||
# add_service_files( | ||
# FILES | ||
# Service1.srv | ||
# Service2.srv | ||
# ) | ||
|
||
## Generate actions in the 'action' folder | ||
# add_action_files( | ||
# FILES | ||
# Action1.action | ||
# Action2.action | ||
# ) | ||
|
||
## Generate added messages and services with any dependencies listed here | ||
# generate_messages( | ||
# DEPENDENCIES | ||
# geometry_msgs# std_msgs | ||
# ) | ||
|
||
################################################ | ||
## Declare ROS dynamic reconfigure parameters ## | ||
################################################ | ||
|
||
## To declare and build dynamic reconfigure parameters within this | ||
## package, follow these steps: | ||
## * In the file package.xml: | ||
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure" | ||
## * In this file (CMakeLists.txt): | ||
## * add "dynamic_reconfigure" to | ||
## find_package(catkin REQUIRED COMPONENTS ...) | ||
## * uncomment the "generate_dynamic_reconfigure_options" section below | ||
## and list every .cfg file to be processed | ||
|
||
## Generate dynamic reconfigure parameters in the 'cfg' folder | ||
# generate_dynamic_reconfigure_options( | ||
# cfg/DynReconf1.cfg | ||
# cfg/DynReconf2.cfg | ||
# ) | ||
|
||
################################### | ||
## catkin specific configuration ## | ||
################################### | ||
## The catkin_package macro generates cmake config files for your package | ||
## Declare things to be passed to dependent projects | ||
## INCLUDE_DIRS: uncomment this if your package contains header files | ||
## LIBRARIES: libraries you create in this project that dependent projects also need | ||
## CATKIN_DEPENDS: catkin_packages dependent projects also need | ||
## DEPENDS: system dependencies of this project that dependent projects also need | ||
catkin_package( | ||
# INCLUDE_DIRS include | ||
# LIBRARIES voadrs | ||
# CATKIN_DEPENDS geometry_msgs roscpp rospy std_msgs | ||
# DEPENDS system_lib | ||
) | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
## Specify additional locations of header files | ||
## Your package locations should be listed before other locations | ||
include_directories( | ||
# include | ||
${catkin_INCLUDE_DIRS} | ||
) | ||
|
||
## Declare a C++ library | ||
# add_library(${PROJECT_NAME} | ||
# src/${PROJECT_NAME}/voadrs.cpp | ||
# ) | ||
|
||
## Add cmake target dependencies of the library | ||
## as an example, code may need to be generated before libraries | ||
## either from message generation or dynamic reconfigure | ||
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Declare a C++ executable | ||
## With catkin_make all packages are built within a single CMake context | ||
## The recommended prefix ensures that target names across packages don't collide | ||
# add_executable(${PROJECT_NAME}_node src/voadrs_node.cpp) | ||
|
||
## Rename C++ executable without prefix | ||
## The above recommended prefix causes long target names, the following renames the | ||
## target back to the shorter version for ease of user use | ||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" | ||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") | ||
|
||
## Add cmake target dependencies of the executable | ||
## same as for the library above | ||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Specify libraries to link a library or executable target against | ||
# target_link_libraries(${PROJECT_NAME}_node | ||
# ${catkin_LIBRARIES} | ||
# ) | ||
|
||
############# | ||
## Install ## | ||
############# | ||
|
||
# all install targets should use catkin DESTINATION variables | ||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html | ||
|
||
## Mark executable scripts (Python etc.) for installation | ||
## in contrast to setup.py, you can choose the destination | ||
# install(PROGRAMS | ||
# scripts/my_python_script | ||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark executables for installation | ||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html | ||
# install(TARGETS ${PROJECT_NAME}_node | ||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark libraries for installation | ||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html | ||
# install(TARGETS ${PROJECT_NAME} | ||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark cpp header files for installation | ||
# install(DIRECTORY include/${PROJECT_NAME}/ | ||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | ||
# FILES_MATCHING PATTERN "*.h" | ||
# PATTERN ".svn" EXCLUDE | ||
# ) | ||
|
||
## Mark other files for installation (e.g. launch and bag files, etc.) | ||
# install(FILES | ||
# # myfile1 | ||
# # myfile2 | ||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
# ) | ||
|
||
############# | ||
## Testing ## | ||
############# | ||
|
||
## Add gtest based cpp test target and link libraries | ||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_voadrs.cpp) | ||
# if(TARGET ${PROJECT_NAME}-test) | ||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) | ||
# endif() | ||
|
||
## Add folders to be run by python nosetests | ||
# catkin_add_nosetests(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# V-OADRS | ||
|
||
[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg)](https://opensource.org/licenses/BSD-3-Clause) | ||
--- | ||
|
||
## Project Contributors | ||
|
||
1) [Saumil Shah](https://github.com/SaumilShah66) | ||
Mechanical Engineer, Innovator, Robotics Graduate Student at UMD. | ||
|
||
2) [Varun Asthana](https://github.com/varunasthana92) | ||
Mechanical Engineer, Innovator, Robotics Graduate Student at UMD. | ||
|
||
## 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](https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop-1604#0) 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](http://wiki.ros.org/kinetic/Installation) to install ROS kinetic. | ||
|
||
To install gazebo 7.0 follow [this](http://gazebosim.org/tutorials?tut=install_ubuntu&ver=7.0&cat=install) instructions. | ||
|
||
Install OpenCV 3.3.0 refer [this](https://medium.com/@Linh.NG/installing-opencv-3-3-0-on-ubuntu-16-04-lts-7db376f93961) page. | ||
|
||
|
||
## Technology Used | ||
|
||
## 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](https://docs.google.com/spreadsheets/d/1BnU5e_QEPwAU8ns-pFhITGS3_m1YnjaZeSdVSFJj3gg/edit#gid=0). Sprint planning and review notes are [here](https://docs.google.com/document/d/1KpbpapvvFNhO2NKPLEjOYNVf_a-0SManJHOhdiiNfMk/edit?usp=sharing). | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* @file listener.cpp | ||
* @brief subscriber for First Publisher/Subscriber ros package | ||
* @author Varun Asthana | ||
* | ||
* Copyright [2019] Varun Asthana | ||
* All rights reserved. | ||
* | ||
* BSD 3-Clause License | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
#include "ros/ros.h" | ||
#include "ros/console.h" | ||
#include "std_msgs/String.h" | ||
|
||
/** | ||
* This tutorial demonstrates simple receipt of messages over the ROS system. | ||
*/ | ||
void chatterCallback(const std_msgs::String::ConstPtr &msg) { | ||
ROS_INFO_STREAM("I listened to: " << msg->data); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
/** | ||
* The ros::init() function needs to see argc and argv so that it can perform | ||
* any ROS arguments and name remapping that were provided at the command line. | ||
* For programmatic remappings you can use a different version of init() which takes | ||
* remappings directly, but for most command-line programs, passing argc and argv is | ||
* the easiest way to do it. The third argument to init() is the name of the node. | ||
* | ||
* You must call one of the versions of ros::init() before using any other | ||
* part of the ROS system. | ||
*/ | ||
ros::init(argc, argv, "listener"); | ||
|
||
/** | ||
* NodeHandle is the main access point to communications with the ROS system. | ||
* The first NodeHandle constructed will fully initialize this node, and the last | ||
* NodeHandle destructed will close down the node. | ||
*/ | ||
ros::NodeHandle n; | ||
|
||
/** | ||
* The subscribe() call is how you tell ROS that you want to receive messages | ||
* on a given topic. This invokes a call to the ROS | ||
* master node, which keeps a registry of who is publishing and who | ||
* is subscribing. Messages are passed to a callback function, here | ||
* called chatterCallback. subscribe() returns a Subscriber object that you | ||
* must hold on to until you want to unsubscribe. When all copies of the Subscriber | ||
* object go out of scope, this callback will automatically be unsubscribed from | ||
* this topic. | ||
* | ||
* The second parameter to the subscribe() function is the size of the message | ||
* queue. If messages are arriving faster than they are being processed, this | ||
* is the number of messages that will be buffered up before beginning to throw | ||
* away the oldest ones. | ||
*/ | ||
auto sub = n.subscribe("chatter", 1000, chatterCallback); | ||
|
||
/** | ||
* ros::spin() will enter a loop, pumping callbacks. With this version, all | ||
* callbacks will be called from within this thread (the main one). ros::spin() | ||
* will exit when Ctrl-C is pressed, or the node is shutdown by the master. | ||
*/ | ||
ros::spin(); | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* @file listener.cpp | ||
* @brief subscriber for First Publisher/Subscriber ros package | ||
* @author Varun Asthana | ||
* @author Saumil Shah | ||
* | ||
* Copyright [2019] Group 20 | ||
* All rights reserved. | ||
* | ||
* BSD 3-Clause License | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
#include "ros/ros.h" | ||
#include "std_msgs/String.h" | ||
|
||
class Scan { | ||
private: | ||
ros::NodeHandle n; | ||
//auto sub = n.subscribe(TO BE DEFINED); | ||
public: | ||
void subCallback(const std_msgs::float64::ConstPtr &msg); | ||
int getData(int &); | ||
float diaCalc(); | ||
} | ||
|
||
|
Oops, something went wrong.