Skip to content

Instantly share code, notes, and snippets.

@frien137
frien137 / vectorconnectsub.py
Created October 21, 2022 14:20 — forked from acidzebra/vectorconnectsub.py
workaround for the endless timeouts
robot_connected = 0
while robot_connected == 0:
try:
print("Connecting to Vector")
myrobot.connect(timeout=30)
robot_connected = 1
sleep(2)
except anki_vector.exceptions.VectorNotFoundException as e:
print("Vector not found exception, sleeping for 60 secs and retrying. Error: " + repr(e))
sleep(60)
@frien137
frien137 / vectordiag.py
Created September 17, 2022 15:54 — forked from acidzebra/vectordiag.py
Tool to continuously monitor Vector's sensor and other telemetry data in near realtime, without hogging the connection (you can still run other programs). Useful for diagnosing issues or just because it looks neat.
#!/usr/bin/env python3
# --- VectorDiag 0.3.1 ---
vd_version = "0.3.1"
#
# a program to monitor Vector's sensors and other telemetry data, can be running while other vector programs are running (I think...it worked for me)
# requirements:
# - Windows, Mac, or Linux system
# - configured Vector SDK and Vector robot (i.e. you can already connect to the robot with python)
# - the dashing library: pip3 install dashing
@frien137
frien137 / cozmo_unleashed.py
Last active January 25, 2022 14:23 — forked from acidzebra/cozmo_unleashed.py
Cozmo Unleashed: Attempting to create a perpetuum cozmobile for Anki's awesome robot - https://www.anki.com/en-us/cozmo
#!/usr/bin/env python3
#
# NOTE I HAVE MOVED ON TO USING A CUSTOM MARKER PRINTED OUT AND PASTED ON TOP OF MY CHARGER
# SIZED AT 4CM/SIDE COZMO HAS A MUCH BETTER CHANCE OF FINDING THE CHARGER - SIMILAR TO THE NEW VECTOR ROBOT
# the last "general purpose" version is https://gist.github.com/acidzebra/c02ff8c8ccb0e3a057ae0b48a5082a68/ad4ff9d686f7e2a1b197c4a26c6290d51a7c4380
# if you want to print out your own you can find a version of marker CustomObjectMarkers.Hexagons2 used here
# http://cozmosdk.anki.com/docs/generated/cozmo.objects.html?highlight=hexagons2#cozmo.objects.CustomObjectMarkers.Hexagons2
#
# WHAT THIS PROGRAM DOES
#
@frien137
frien137 / DroidChat.py
Last active September 7, 2022 18:24
Vector and Cozmo chat
#!/usr/bin/env python3
#
# Copyright (c) 2020 frien
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#