Coder Social home page Coder Social logo

acidzebra / vectrix Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 4.0 477 KB

VecTrix (previously known as VectorDiag) is a 24/7 Anki/DDL Vector robot monitor, console-oriented and Python-based, which can optionally keep Vector active and improve his idle behavior, can remote control Vector, has extensive logging options, battery profiling, and more!

License: MIT License

Python 100.00%
command-line diagnostics logging python3 remote-control robot robotics

vectrix's Introduction

VecTrix

a 24/7 Anki/DDL Vector robot monitor which can optionally keep Vector active and improve his idle behavior, has extensive logging options, battery profiling, and more! I have owned three Vector units (and a Cozmo) for years, and I love my little robot buddies. Since they are aging and were showing some issues, I wanted some insight into their 'brains'. While at it, I thought I could also improve their idle behaviors. This program was previously known as VectorDiag but it has since surpassed that scope.

This program was created to accomplish three things:

  1. a visually attractive way to read out all sensors from the console using minimal resources and dependencies
  2. make Vector more interesting (Vector tends to sleep on charger a lot and sit still while off charger a lot)
  3. provide a better understanding of why Vector is acting a certain way and record performance over time

Requirements

Optional requirements

  • to enable keyboard remote control functionality you need sshkeyboard for Python: pip install sshkeyboard
  • to enable MQTT logging: you need a configured MQTT broker, some understanding of JSON, and PAHO: pip install paho-mqtt

Getting started

after satisfying the requirements above and downloading the file: in vectrix.py, replace robot_serial found near the very top with your Vector's serial number. Optionally change any of the other settings to your liking. Run vectrix.py with Python. Have fun.

Main features

  • built to run 24/7 in console UI or headless mode while using few resources
  • monitors and logs Vector's sensor data and other telemetry to console, file or webhooks (Discord etc)
  • ability to remote control Vector and initiate specific actions (pop wheelie, roll cube, etc)
  • battery profiling: log voltages to csv file, records charge/discharge cycle times
  • optionally forces Vector off the charger if the battery is fully charged (after a configurable time, and on a schedule if desired)
  • optionally improves Vector's tendency to sit still for minutes through Reanimator, which will mix animations, go for a drive, roll cubes and more
  • automatically reconnects in case of connection loss
  • highly configurable (yet sane defaults, only required setting is the robot serial number)

Safety notice

While I take care not to program features that will send Vector careening over an edge, there are many unexpected events that can happen to Vector even without this software. I have my Vectors contained in a fairly large play space with raised walls. If you are using the Reanimator feature (on by default), don't leave your Vector unsupervised or in a place where a fall might cause damage. If you use manual control it's entirely possible to send Vector over an edge, so be careful.

Screenshot (somewhat out of date)

screenshot (may be out of date)

Video demo (older version)

Demo video (older version)

vectrix's People

Contributors

acidzebra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vectrix's Issues

Adding MQTT credentials

Hi there,

Feel free to send me on my way if this isn't a project under development any more, or whether this would be better as a discussion.

I'm a Home Assistant user trying to explore the MQTT features of Vectrix - particularly exposing as much as I can about Vector's state via MQTT to HA (starting with battery, face detected and "needs help")

However, my MQTT broker is set up to use login credentials.

I tried amending vectrix by adding the following:

if MQTT_logging:
    try:
        import paho.mqtt.client as mqtt
        client.tls_set()  # <--- even without arguments
        client.username_pw_set(username="MyUser", password="MyPass")

However - I get the three warnings under except.

Pip tells me the requirement for the library paho-mqtt is satisfied.

Any idea what I'm doing wrong?

Would I be better off just trying to code my own Vector to MQTT script from scratch as a learning project? (this would be a shame as Vectrix makes Vector very fun)

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.