🤖
Documentation | Hackerbot Industries
  • Welcome
  • Getting Started
    • What is Hackerbot?
    • Unboxing Your Robot
    • Install the Raspberry Pi OS + WiFi
    • Updating the Firmware
  • Enabling VNC (Remote Desktop)
  • Send Commands to Hackerbot
  • SOFTWARE
    • Software Install & Overview
    • Python Package
    • Flask APIs & Command Center
  • Tutorials
    • Hello World!
    • Deploy an AI Agent
    • Teleoperation
    • Utilizing AI Kit
  • Firmware
    • Serial Commands
  • Downloads
    • URDF Files
    • CAD Files
    • Schematics
  • Resources
    • Contributing
    • Software Release Notes
Powered by GitBook
On this page
  • 👟 Movement
  • 🗣️ Voice
  • 👁️ Vision
  • 🤖 Head Movement
  • 🦾 Arm & Gripper Manipulation
  • 🛠️ Troubleshooting
  • 👣 References
  1. Tutorials

Hello World!

PreviousFlask APIs & Command CenterNextDeploy an AI Agent

Last updated 4 days ago

Prerequisites: Ensure both Hackerbot software and firmware are before running the following examples.


👟 Movement

Model supports: All versions

  • Moving the base with command velocity

from hackerbot import Hackerbot

bot = Hackerbot()

bot.base.drive(0, 65) # Turn around
bot.base.drive(200, 0) # Move forward

bot.base.destroy(auto_dock=True) # Destroy instance and dock to charger
  • Navigation with SLAM

from hackerbot import Hackerbot

bot = Hackerbot()

bot.base.maps.goto(1.0, 1.0, 0.0, 0.1)

bot.base.destroy(auto_dock=True) # Destroy instance and dock to charger

The robot will first try to localize itself in the map then navigate to the destination.


🗣️ Voice

Model supports: AI, AI PRO, AI ELITE versions

  • Text to speech (TTS)

# Sample model that we think it's a good fit for Hackerbot!
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_GB/semaine/medium/en_GB-semaine-medium.onnx
wget https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_GB/semaine/medium/en_GB-semaine-medium.onnx.json
  1. Copy the path of your model to your script, and utilize the speak functionality:

bot.head.speak(model_src="/path/to/model.onnx",text="Didi dadodoooo", speaker_id=None)
  • Speech to text (STT)


👁️ Vision

Model supports: AI, AI PRO, AI ELITE versions

Before trying out some of the coolest examples, make sure you have the dependencies:

cd ~/hackerbot/hackerbot-tutorials/vision
pip3 install --no-cache-dir -r requirements.txt  # This install will take a while
  • Image Recognition with YOLO

cd ~/hackerbot/hackerbot-tutorials/vision/image_rec
python3 yolo.py

Tap the "q" key on your keyboard to quit.

  • Image Recognition with the AI Kit

  • Face Recognition

Navigate to the directory:

cd ~/hackerbot/hackerbot-tutorials/vision/face_rec

Take some headshots, it'll take a number of pictures between every delay.

python3 headshots_picam.py --name Bobby --num_photos 10 --delay 2

Then train the model by running:

python3 train_model.py 

Then use it to recognize your face by running:

python3 facial_req.py

🤖 Head Movement

Model supports: AI PRO, AI ELITE versions

Now you can utilize the camera to recognize objects and person, try look around to scan for faces!

cd ~/hackerbot/hackerbot-tutorials/vision/face_rec
python3 look_around.py --name Bobby

🦾 Arm & Gripper Manipulation

Model supports: AI ELITE versions

More cool examples coming soon! At the mean time, just smile and wave!

import time
from hackerbot import Hackerbot

bot = Hackerbot()

bot.arm.move_joints(90, 50, 0, -60, -90, 0, 100) # Move to right
time.sleep(1.5)
bot.arm.move_joints(90, -20, 0, 0, -90, 0, 100) # Move to left
time.sleep(1.5)
bot.arm.move_joints(0, 0, 0, 0, 0, 0, 100) # Center to straight position
time.sleep(1.5)

bot.destroy() # Destroy instance

🛠️ Troubleshooting

Error installing requirements for vision examples

  • Causes: Missing CMake components

  • Fixes: Install the required packages

    sudo apt update
    sudo apt install cmake build-essential python3-dev

Image recognition example not opening opencv window (Qt wayland error)

  • Causes: Our OpenCV is built with Qt5 only and no GTK+

  • Fixes: Install GTK+ development

    sudo apt update
    sudo apt install libgtk-3-dev

👣 References

To understand the map & positions better, check out .

The Hackerbot Python package uses for speech synthesis.

Use the to find the voice you want for your Hackerbot.

Navigate to the and download the model and config files in your folder like the following:

Currently, speech to text isn't officially supported. However, there are many speech to text functions out there you can try, e.g. , , or the most common .

To view the cv window, make sure you're running the following in .

Check out our tutorial on

up to date
command center
Piper TTS
Piper tts tool
🤗
directory
OpenAI
Google Speech to Text
SpeechRecognition
getting started with the AI Kit here
Face recognition with Raspberry Pi
Piper TTS Documentation
VNC
YOLOv11 Recognizing everything on my desk!
Your Hackerbot now recognizes you!