Skip to content

Instantly share code, notes, and snippets.

View maxstrid's full-sized avatar

Maxwell Henderson maxstrid

View GitHub Profile
import math
import numpy as np
import matplotlib.pyplot as plt
class TrapezoidMotionProfile:
def __init__(self, distance, max_vel, max_accel) -> None:
self.ta = max_vel / max_accel
accel_distance = 0.5 * max_accel * self.ta**2
if (accel_distance > distance / 2.0):