Skip to main content

Python client library for communicating with DickerBot robots.

Project description

DickerBotClient

DickerBotClient is a Python client library designed for seamless communication with DickerBot robots. It provides a simple interface to interact with DickerBot robots, enabling control over sensors and motors via WebSocket communication.

Features

  • WebSocket Communication: Connects to a WebSocket server to send and receive sensor and control data.
  • Sensor Data: Retrieves and processes sensor information such as accelerometer, gyroscope, and distance sensors.
  • Image Data: Receives image data from the robot and converts it into a usable format.
  • Control Data: Sends motor control data (speed and direction) to the robot.

Installation

You can install the latest release of DickerBotClient from PyPI using pip:

pip install dickerbotclient

Usage in Python

Importing the library in your python script

import dickerbotclient as dbc

Creating an instance of the class

bot = dbc.DickerBotClient()

Connecting to the host socket

Note: Get ip_address and port from the Host UI

bot.connect(ip_address, port)

Polling sensor data

sensor_data = bot.get_sensor_data()

Format: [acceleration_x, acceleration_y, acceleration_z, angular_velocity_x, angular_velocity_y, angular_velocity_z, temperature, distance_left, distance_front, distance_right, distance_back]

Value 999 anywhere indicates error

Polling image data

image = bot.get_image_data()

Format: 96x96 grayscale

Sending control data

bot.set_control_data(wheel, speed, direction)
Parameter Description
wheel 0 = left; 1 = right; 999 = error
speed 0-255; 999 = error
direction 0 = neutral; 1 = forward; 2 = backward; 999 = error

Disconnecting from host socket

bot.disconnect()

Example Teleop

# TODO: Create a program to do keyboard basic teleop using w,a,s,d while showing realtime video stream and IMU/proximity data.

DickerBot Project

You can find information about the DickerBot on the GitHub page.

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

dickerbotclient-1.0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

dickerbotclient-1.0.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dickerbotclient-1.0.3.tar.gz.

File metadata

  • Download URL: dickerbotclient-1.0.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for dickerbotclient-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c61d1769856760c6f251b4be361e4c5b696818bc1c43214cd05f93f67e07f423
MD5 5bf2d429446624cced9a495866ee42c3
BLAKE2b-256 d453ad2b0a7c8e2b1c5ea385e560dcddee1f37cc9d0b1bf2f2643170b2de832c

See more details on using hashes here.

File details

Details for the file dickerbotclient-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dickerbotclient-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a642c2900df4af76db74838c6b2bc988c196d03662fec8e041736ef4f8dd7a8e
MD5 32fcb4b2beb6bb056bd717e0308f281d
BLAKE2b-256 d399af08443cd27a4ab44880f2be02af6c628b46f381ba0730a4c2ac43a8543a

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