Skip to content

Instantly share code, notes, and snippets.

@jschoch
jschoch / config.toml
Last active October 18, 2024 21:59
error for pose2sim
###############################################################################
## PROJECT PARAMETERS ##
###############################################################################
# Configure your project parameters here.
#
# IMPORTANT:
# If a parameter is not found here, Pose2Sim will look for its value in the
# Config.toml file of the level above. This way, you can set global
from collections import defaultdict
import cv2
from ultralytics import YOLO
from ultralytics.utils.plotting import Annotator, colors
track_history = defaultdict(lambda: [])
model = YOLO("/home/schoch/rocm_pytorch/runs/segment/train28/weights/best.pt") # segmentation model
@jschoch
jschoch / max_vel.md
Last active March 20, 2024 13:59
linuxcnc max_velocity settings

The below explaination was generated by google gemini

@jschoch
jschoch / arduino_stuff.c
Created March 14, 2024 22:31
now_pendant.py
ESP32Encoder encoder1;
ESP32Encoder encoder2;
ESP32Encoder encoder3;
ESP32Encoder encoder4;
Ticker readEncoders;
Ticker slowReadEncoders;
enum class InputType{
Encoder,
@jschoch
jschoch / foo.v
Created February 18, 2024 17:16
encoder in verilog
module quad(clk, A, B, Z, count, revolutions);
input clk, A, B,Z;
output [63:0] count;
output [8:0] revolutions;
localparam [11:0] ppr = 80;
reg [2:0] quadA_delayed, quadB_delayed;
always @(posedge clk) quadA_delayed <= {quadA_delayed[1:0], A};
always @(posedge clk) quadB_delayed <= {quadB_delayed[1:0], B};
@jschoch
jschoch / quadz.v
Created February 16, 2024 22:57
quadz.v
module quadencoderz
#(
parameter BITS = 32,
parameter QUAD_TYPE = 0,
parameter CLK_FREQ = 27_000_000,
parameter PPR = 400
)
(
input clk,
input a,
{
"name": "jessTangNano9K",
"description": "my udp lateh config",
"boardcfg": "TangNano9K",
"transport": "UDP",
"ip": "192.168.10.71",
"enable": {
"pin": "69"
},
"plugins": [
@jschoch
jschoch / xenc_vel.c
Created February 5, 2024 03:17
xenc_vel.c
#include "rtapi.h" /* RTAPI realtime OS API */
#include "rtapi_app.h" /* RTAPI realtime module decls */
#include "rtapi_string.h"
#include "hal.h" /* HAL public API decls */
/* module information */
MODULE_AUTHOR("Jesse Schoch");
MODULE_DESCRIPTION("Encoder Velocity for RIO encoder with z ");
MODULE_LICENSE("GPL");
{
"name": "TangNano9K",
"description": "TangNano9K with 5Axis BOB over SPI",
"boardcfg": "TangNano9K",
"transport": "SPI",
"axis": 9,
"interface": [
{
"type": "w5500",
@jschoch
jschoch / got_balls.py
Created June 16, 2022 03:45
cycloid ball reducer sketch for fusion360
import adsk.core, adsk.fusion, adsk.cam, traceback, math
import sys, os
packagepath = os.path.join(os.path.dirname(sys.argv[0]), 'Lib/site-packages/')
if packagepath not in sys.path:
sys.path.append(packagepath)
#import numpy as np
#np = math