/a200_y915

Introduction to Vision and Robotics assignment

Primary LanguagePython

GitHub repo size GitHub top language GitHub last commit

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

Getting started

Download and Installation

  1. 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
  1. Download or clone the repo to src folder using the instruction provided in Github.
  2. Navigate back to catkin_ws in your terminal and enter catkin_make and source devel/setup.bash
  3. After that enter nano ~/.bashrc and add the following two lines:
    source /opt/ros/melodic/setup.bash
    source ∼/catkin ws/devel/setup.bash
  1. 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
  1. Run the robot simulator using roslaunch [folder-name] spawn.launch

Robot simulator

Background

  1. The description of each links are provided below:

Description of links

  1. 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 called single_joint.sh or arm_move.sh in folder tools.
  2. You are required to specify the joint number and the angles in rads in order to move.
  3. 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

Black robot

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details