Skip to main content

This module contains the setup for the hackerbot python package.

Project description

HackerBot

Hackerbot Python Package

The hackerbot Python package provides modules for controlling and managing the Hackerbot robotics system.

Installation

You can now install the package directly from PyPI:

pip install hackerbot

This will automatically install all required dependencies and make the hackerbot package available in your Python environment.

(Optional) Installing from Source

If you prefer to install from source for development purposes:

  1. Clone the Repository

    git clone https://github.com/hackerbotindustries/hackerbot-python-package.git
    cd hackerbot-python-package/
    
  2. Install Locally

    pip install .
    

Quick Start

SSH into the Raspberry Pi or open a VNC viewer, then install the official Python package:

pip install hackerbot

Or upgrade the existing package:

pip install --upgrade hackerbot

Then, run python3 to open up the Python interactive shell and copy and paste the following:

from hackerbot import Hackerbot

bot = Hackerbot()

bot.base.drive(0, 65)
bot.base.drive(200, 0)

You should see your Hackerbot leave the charger and move in the opposite direction.

bot.head.look(180, 250, 70)

Now your robot should move its head and look up at you!

bot.arm.move_joints(0, 0, 0, 0, 0, 0, 10)

You should see your elephant arm moving to a straight-up position.

bot.base.destroy(auto_dock=True)

Safely clean up, and your Hackerbot will return to the charger. Once destroy is called, you need to create a new Hackerbot instance to perform new actions.

Usage

After installation, you can import and use the package in your Python scripts:

import hackerbot

Testing

To run the unit tests:

cd tests/unit_tests
pytest

Troubleshooting

If you run into issues during installation or usage, try the following:

  • Use a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  • Upgrade pip:

    pip install --upgrade pip
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hackerbot-0.6.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hackerbot-0.6.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file hackerbot-0.6.0.tar.gz.

File metadata

  • Download URL: hackerbot-0.6.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for hackerbot-0.6.0.tar.gz
Algorithm Hash digest
SHA256 6e47d9a91e2969dec42036a722a0f8d7144e1004b71575409553b8d8dc6daad7
MD5 ab85138cb8324cdf22bbd8537662753f
BLAKE2b-256 9382e45674eb6713c348605956b25bda1d1cfb8e798c7b8268d9ac3adc7126e5

See more details on using hashes here.

File details

Details for the file hackerbot-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: hackerbot-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for hackerbot-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8647201d783959f93e849b3733dabcb1672a15fd44ed5af0ca0724e319eaa03
MD5 38290e5025fadabfe1e9a1fe2cef76e2
BLAKE2b-256 b68fa9021ef62875d4a4dfd37a18bfd5a9e4d81927d8ddd31c94ae04853a2909

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page