Code Monkey home page Code Monkey logo

robud-pi's Introduction

RoBud - Lovable, Accessible, Autonomous Companion

Ro-bud

Table of Contents

Summary

The RoBud project seeks to create a companion bot that is lovable, accessible to all, and autonomous.

Return to Table of Contents

Description

Challenge: Despite decades of fictional depiction through popular culture, as of 2021, robotic companion bots that even come close to those of popular imagination are not available at scale.

While there have been impressive private for-profit attempts at releasing relatively advanced consumer companion bots, specifically Jibo and Anki Vector, these endeavors ultimately proved commercially unviable, forcing the companies to fold, and effectively removing these wonderfully engineered robots from either availability or full operability (as they were dependent on proprietary services provided by their now-defunct companies).

The RoBud project is an attempt to pick up where Jibo and Ankni left off, and fulfil the dream of providing a consumer robot that is:

  1. LOVEABLE - Feels just like a family pet
  2. ACCESSIBLE - Can be built by anyone following project instructions with readily available parts with a cost at or under $500
  3. AUTONOMOUS - Has it's own goals.

Return to Table of Contents

Set-up Steps (draft outline)

  • TODO:

    • Add steps for updating configuration files. (maybe consolidate into one configruaton file)
  • Install 64bit RaspberryPi OS (for tensorflow)

    • hostname: robud.local
    • username: robud
    • password: your choice
  • Clone repo - git clone https://github.com/ScottMonaghan/robud-pi.git

    • Rename folder - mv robud-pi robud
    • PYTHONPATH to robud source
      • Add line to /home/robud/.bashrc - export PYTHONPATH="${PYTHONPATH}:/home/robud"
      • log out and log back in
  • [] Update pip3 install update pip

  • Install VSCODE - sudo apt install code

  • Install Mosquitto - sudo apt install mosquitto mosquitto-clients

  • Configure mosquitto

    • sudo nano /etc/mosquitto/mosquitto.conf
    • Add these lines and save
      • allow_anonymous true
      • listener 1883 0.0.0.0
    • sudo systemctl restart moquitto.service
  • Install paho.mqtt pip install paho-mqtt

  • Install OpenCV - sudo apt install python3-opencv -y

  • Install TensorFlow 2.10 - https://github.com/PINTO0309/Tensorflow-bin

    • Follow Example of Python 3.x + Tensorflow v2 series
    • use PYVER=39 (Python 3.9)
  • Install eSpeak-ng - sudo apt-get install espeak-ng

  • Install Librosa - pip install librosa

  • Install Vosk

  • Install Blinka - pip3 install Adafruit-Blinka

  • Install adafruit_motorkit - pip3 install adafruit-circuitpython-motorkit

  • Install adafruit_servokit - pip3 install adafruit-circuitpython-servokit

  • Install portaudio19-dev library sudo apt install portaudio19-dev

  • Install pyaudio - pip3 install pyaudio

  • Install pytweening - pip install pytweening

  • Install bno055 - pip3 install adafruit-circuitpython-bno055

  • Update /boot/config.txt with following for bno0##: dtparam=i2c_arm_baudrate=400000

  • Install adafruit-circuitpython-vl53l0x (time-of-flight) - pip3 install adafruit-circuitpython-vl53l0x

  • [x] Install HC S404 Ultrasonic driver - pip3 install adafruit-circuitpython-hcsr04 (ultrasonic sensors not integrated yet)

  • Install VNC Server - sudo apt-get install realvnc-vnc-server

  • Configure VNC Server

    • sudo raspi-config
    • enable VNC
    • set VNC resolution
  • Blink Test 1 - hook up to a monitor and see you get robud blinking if you run robud_face.py

    • python3 /home/robud/robud/robud_face/robud_face.py
    • ctrl-F to exit fullscreen
  • Install Adafruit Platform Detect - pip3 install Adafruit-PlatformDetect

  • Disable Hardware Accelleration on VSCODE - https://ratticon.com/how-to-fix-slow-visual-studio-code-on-raspberry-pi-4/

  • Set up UDEV rules so python can access respeaker through USB

    • sudo nano /etc/udev/rules.d/60-respeaker.rules
    • add line
      • SUBSYSTEM=="usb", ATTR{idProduct}=="0018", ATTR{idVendor}=="2886", MODE:="0666"
    • sudo systemctl restart udev
    • reconnect respeaker
  • Set up Services

    • sudo cp /home/robud/robud/services/robud.motors.motors.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_audio.robud_audio.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_face.robud_face_animator.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_head.robud_head_animator.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_logging.robud_logger.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_questions.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_voice_text_input.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.sensors.orientation.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.sensors.tof.service /etc/systemd/system

    • sudo cp /home/robud/robud/services/robud.robud_state.robud_state_manager.service /etc/systemd/system

    • Additional services added 23-May-2023

      • sudo cp /home/robud/robud/services/robud.ai.stt.service /etc/systemd/system
      • sudo cp /home/robud/robud/services/robud.ai.wakeword_detection.service /etc/systemd/system
      • sudo cp /home/robud/robud/services/robud.sensors.camera.service /etc/systemd/system
      • sudo cp /home/robud/robud/services/robud.robud_chatbot.chatgpt.robud_chatgpt.service /etc/systemd/system
    • sudo systemctl daemon-reload

    • sudo systemctl enable [each service]

    • The following services need changes still to work RPi 23-May-2023

      • pulseaudio.service
      • robud.ai.object_detection.service
      • robud.sensors.light_level.service
      • robud.sensors.odometry.service
      • robud.sensors.ultrasonics.service
    • set up graphical autostart

      • mkdir /home/robud/.config/autostart
      • sudo nano /home/robud/.config/autostart/robud.desktop

        [Desktop Entry]
        Name=robud
        Exec=/home/robud/robud/robud_startup.sh
        Terminal=false
        Type=Application
        
    • Blink Test 2 (start up test)

      • Hook up pi to monitor, keyboard & mouse, and restart. After a few min, RoBud's eyes should be looking around. CTRL-F to exit full scren.
    • Blink Test 3 (VNC test)

      • Disconnect all HDMI cables from pi
      • Restart Pi and VNC to robud.local (or direct pi IP) RoBud's eyes should be looking around.
      • Resolution should be your configured CTRL-F to exit full scren.

Return to Table of Contents

Remote Server Setup Steps

  • Setup VirtualBox Clean Ubuntu Install
    • Download and install virtualbox for your appropriate host system: https://www.virtualbox.org/wiki/Downloads
    • Download Ubunto 20.04 desktop iso: https://releases.ubuntu.com/focal/ubuntu-20.04.5-desktop-amd64.iso
    • Create a new vm with the following settings:
      • Name: ROBUD-REMOTE
      • Folder: Your choice
      • ISO: iso downloaded above
      • Username: Robud
      • Password: your choice
      • Guest Additions: checked
      • Base Memory: 4096
      • Processors: 4 (if you can spare)
      • Disk Size: 40gb (if you can spare)
    • Complete Ubuntu Installation
    • Enable bidirectional clipboard under Devices/Shared Clipboard (makes this much easier)
    • Upgrade python3 to 3.9:
    • Install Git - sudo apt install git
    • Clone repo - git clone https://github.com/ScottMonaghan/robud-pi.git
    • Rename folder - mv robud-pi robud
    • PYTHONPATH to robud source
      • Add line to /home/robud/.bashrc - export PYTHONPATH="${PYTHONPATH}:/home/robud"
      • log out and log back in
    • install pip - sudo apt install python3-pip
    • install VS code - sudo snap install --classic code
    • Minium for running utils/KeyboardController
      • python3.9 -m pip install numpy
      • python3.9 -m pip install paho-mqtt
      • python3.9 -m pip install pygame
      • python3.9 -m pip install pytweening
    • Try out keyboard controller:
      • Start up robud
      • Ensure robud.local returns a ping
      • cd ~/robud/utils
      • python3.9 keyboard_controller.py
      • use arrow keys to control locomotion
      • use WASD to move head up & down and turn (same as left/right arrows)
    • Additional Minimum for camera-montior
      • python3.9 -m pip install opencv-python

Return to Table of Contents


Original Project Announcement Videos

These videos are the original annoucement and project plan for Ro-Bud uploaded to TikTok on 17-April 2021.

Return to Table of Contents

Part 1

Ro-Bud Project - Part 1

Return to Table of Contents

Part 2

Ro-Bud Project - Part 2

Return to Table of Contents

Part 3

Ro-Bud Project - Part 3

Return to Table of Contents

Part 4

Ro-Bud Project - Part 4

Return to Table of Contents

robud-pi's People

Contributors

scottmonaghan avatar kyleschieffer avatar

Stargazers

Ryan Burnsworth avatar EatonChips avatar Jason Huggins avatar Jacob Ohpea avatar Serge Simard avatar Sampsa Ranta avatar

Watchers

James Cloos avatar  avatar Kostas Georgiou avatar

robud-pi's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.