Computer vision and robotics
This objective of this project is to use CV to find the joint angles of the robot and identify target and then use concepts of robotics to follow the target.
Prerequisite
- Ubuntu 18.04
- Python 2.7
- ROS Melodic
Getting started
Download and Installation
- Create a folder in your home directory, here we named the folder catkin ws, enter the folder and create another folder named src. You can do it via the terminal:
$ mkdir catkin ws
$ cd catkin ws
$ mkdir src
- Download or clone the repo to src folder using the instruction provided in Github.
- Navigate back to catkin_ws in your terminal and enter
catkin_make
andsource devel/setup.bash
- After that enter
nano ~/.bashrc
and add the following two lines:
source /opt/ros/melodic/setup.bash
source ∼/catkin ws/devel/setup.bash
- Navigate to src folder within downloaded folder and convert the python scripts into executable files by entering the following code:
chmod +x image1.py image2.py target move.py
- Run the robot simulator using
roslaunch [folder-name] spawn.launch
Background
- The description of each links are provided below:
- To move the robot, you can use the command
rostopic pub -1 /robot/joint1 position controller/command std msgs/Float64 “data: 1.0”
or bash files calledsingle_joint.sh
orarm_move.sh
in folder tools. - You are required to specify the joint number and the angles in rads in order to move.
- To view the robot from both camera, run the file
two_cam_open.py
in tools.
Objectives
Following are the objectives and the corresponding files:
- Find joint angles - 2_1_joint_estimation.py
- Find the target location - 2_2_target_detection.py
- Print the EE position - 3_1_FK.py
- EE follow the target - 3_2_closed_control_loop.py
- Find joint angles for the black robot (figure below) - 4_3_joint_estimation_black_robot.py
Authors
- Moshen Khadem - created the ROS environment
- Boniface Yogendran
- Sahar Atif
License
This project is licensed under the MIT License - see the LICENSE.md file for details