Skip to content

Step 5: Prepare robot application deployment

Giovanni Bruno edited this page May 30, 2019 · 2 revisions

1. Create UPbot robot in RoboMaker

  1. Go to RoboMaker console and check that you are on right region
  2. Click on Robots and then press on Create robot
  3. Give a name (e.g. upbot-robot), choose X86_64 as architecture.
  4. Choose create new as greengrass group and choose your IAM role (e.g. upbot-robomaker-greengrass)
  5. Press Create
  6. Press on Download to save greengrass configurations and a file will be downloaded (e.g. upbot-robot-setup.zip)
  7. Click on Download referencing x86_64 Amazon Linux, a file called greengrass-linux-x86_64-version.tar.gz is downloaded

2. Setup your hardware

  1. Attach your up squared to a monitor, internet connection, keyboard and mouse, then proceed.
  2. Use a USB pendrive and connect to your UP Squared and copy files in Downloads folder. NOTE: If you made previews steps on UP Squared you would have got files in Downloads folder
  3. Uncompress files on UP Squared
  4. Open a terminal and type:
    $ sudo mv ~/Downloads/greengrass /
  5. Copy files from folder upbot-robot-setup/certs into /greengrass/certs
  6. Using terminal type:
    $ cd /greengrass/certs
    $ sudo wget -O root.ca.pem https://www.amazontrust.com/repository/AmazonRootCA1.pem
    last command download a file called root.ca.pem, you can check if this file is not empty by typing:
    $ cat root.ca.pem
  7. Create a gcc_user on your UP Squared, so open terminal:
    $ sudo adduser --system ggc_user
    $ sudo addgroup --system ggc_group
    $ sudo usermod -a -G dialout ggc_user
    $ sudo usermod -a -G leds ggc_user
    $ sudo usermod -a -G video ggc_user
  8. Create udev rules:
    $ cd /etc/udev/rules.d
    then:
    $ sudo nano 50-myusb.rules
    and write:
    KERNEL=="ttyUSB[0-9]*",MODE="0666"
    KERNEL=="ttyACM[0-9]*",MODE="0666"
    save and close nano (CTRL+X and Y+ENTER)
  9. Change leds permissions:
    $ sudo chmod 666 /sys/class/leds/upboard\:blue\:/brightness
    $ sudo chmod 666 /sys/class/leds/upboard\:yellow\:/brightness
    $ sudo chmod 666 /sys/class/leds/upboard\:green\:/brightness
    $ sudo chmod 666 /sys/class/leds/upboard\:red\:/brightness
  10. Reboot:
    $ sudo reboot

3. Start Greengrass

  1. When your UP Squared is turned on, open terminal:
    $ cd /greengrass/ggc/core
    $ sudo ./greengrassd start
    NOTE: if an error occur you can use greengrass checker
  2. Now you UP Squared is connected to AWS Greengrass.

4. Create a fleet

  1. Go back on AWS RoboMaker also on another device and check if your region is right.
  2. Click on Fleets and press on Create fleet
  3. Give a name (e.g. upbot-fleet) and press Create
  4. Scroll down and press on Register new, check upbot-robot and press Register robot