Skip to content

Files

Latest commit

 

History

History
137 lines (113 loc) · 6.63 KB

README.md

File metadata and controls

137 lines (113 loc) · 6.63 KB

Instruction

Space Requirement

  • More than 50cm x 55cm ( recommend 80cmx80cm ) space required.
  • See requirements.md for layouts.

Hardware Components

Step1 : Place hardware components and Marker sheet

  1. Print out the marker sheet in A3 paper and stick it on the center (This sheet will be used during both setup and demo.)
  2. Build the robot arm by following manuals.
  3. Place the robot arm to attach the A3 paper on A-D side.
  4. Plugin the power supply unit of the robot arm to AC outlet.
  5. Place the camera(CDVU-06IP) as shown below. In this case, camera should built with joint extender, CDVU-04IP-A1. Note: Due to unavailability of 'CDVU-04IP-A1' in some regions including japan, a small box of 27-32cm in height can be used instead.

Step2 : Setup Linux box as controller PC.

  1. Build your linux box by following direction of each manufacture.
  • You might need to mount ssd and memory inside the linux box unless they are already built in.
  1. Connect both the robot arm and the camera to linux box.
  • The suction cup should be attached on arm end.
  • In some cases, we experienced the robot's firmware beeing outdated. In such a case, DobotStudio is required to upgrade its firmware(See manuals).
  1. Connect the linux box to the internet using LAN cable.
  2. During setup you need a LCD display, a keyboard and a mouse. please prepare.
  3. Install linux and softwares
  • Ubuntu 16.04.1 Server 64bit (You may also try Desktop 64bit, if your PC is well supported by Ubuntu.)

Getting API credential.

This demo requires API credential for Google Cloud Platform(GCP). If this is your first project to use GCP, you can get an account from cloud.google.com.

  1. Create a new GCP project
  2. Enable the following APIs and services on API Manager
  • Google Cloud Storage and Google Cloud Storage JSON API
  • Vision API
  • Speech API
  • Natural Language API
  • Cloud ML API
  1. Create a service account key file
  2. See this doc to create a service account key
    • Service account: Compute Engine default service account
    • Key type: JSON
      • Save the JSON as /home/brainpad/FindYourCandy/credential.json
      • (* Saving to different path or filename may require editing webapp.ini later)
  3. Set env variable
  • Add the following line (replace the path_to_your_own_credential_file with the actual JSON file path) to the last of ~/.bashrc file.
export GOOGLE_APPLICATION_CREDENTIALS="path_to_your_own_credential_file"
  1. Reopen the shell so that it takes effect

Step3: Camera Calibation

The following instructions illustrates how to adjust the camera position.

  1. Boot up linux box and login to the desktop.
  2. Execute (cd script ; python2 camera_tune.py) that is included in this demo software. And see the camera view in the window.
  3. If you cannot see 'OK' sign in the window, tweak the camera or its extension and have whole image of A3 paper.
    • You may also try to get better focus by switching the AF slide between S and C on the camera.
    • In most cases, keeping the slide to S and pressing [・] (focus) button a few times does good in our environment.
  4. You may click on left mouse button to exit this software.

Step4: Robot Arm Caribration

(* Read the safety manuals of your Robot Arm , befor proceeding this section.)

  1. Start uwsgi-robot
sudo systemctl stop  nginx.service # just make sure
sudo systemctl start uwsgi-robot.service
  1. Execute (cd script ; python2 robot_tune.py) to start tuning the coordinates of arm.
  2. Hit Enter key to initialize the robot arm.
  3. Push the release button (which has symbol of unlock ) while you holding the robot arm by the other hand. Please be aware when the button is pressed, the robot arm looses friction and will start falling instantly. To avoid damaging your robot or desk, you should always assist robot arm when you press the release button.
  4. Slowly land the arm edge to the center of Maker A. (still pressing the button.) Not on the letter 'A' but the target sign printed by the letter
  5. Hit Enter key.
  6. Repeat above 3,4 and 5 for Marker D and E.
  7. The program saves those coordinates and ends automatically.
  8. (You can see there are 3 lines of jsonl in /tmp/robot_tuner.dat.)
  9. Restart to reload /tmp/robot_tuner.dat.
sudo systemctl stop  nginx.service # just make sure
sudo systemctl restart uwsgi-robot.service
sudo systemctl start  nginx.service # finally nginx starts here

Step5: Tablet

  1. Bootup Nexus9 and login with a google account for demo.
  2. Update firmware.
  3. Connect the Ethernet Adapter for Chromecast('GL0402') to Nexus9’s OTG connector. This is a hack to provide power and ether connection through USB cable when wifi is not proper to use.
  4. Follow the “Set up Chromecast” on the google support page (there is instruction for Android 4.1 and higher). (* If you have a trouble with voice recognition of Nexus9, consider for external microphone.)

Step6: Demo Application

Configure and run demo