InputDriverFTC
A pathing library to help you visualize Coyote Beta's x/y piecewise position functions over time.
Example of How to Use:
import math
import time
from InputDriverFTC.FieldDisplay import FieldDisplay
# Everything is in meters
robot = FieldDisplay(ROBOT_INIT_X=3.35, ROBOT_INIT_Y=0.88, ROBOT_INIT_HEADING=180, ROBOT_SIZE=0.406)
def get_x(t):
return -t*0.5
def get_y(t):
return 0.25*math.sin(t)
def get_heading(t):
if t < 3.4:
return 180
elif t < 4.4:
return 50*math.cos(math.pi*t-4.4)+130
return 80
if __name__ == "__main__":
timing = 0
while robot.running:
robot.set_motion(x=get_x(timing), y=get_y(timing), heading=get_heading(timing))
time.sleep(0.01)
timing += 0.01
robot()
Release files for InputDriverFTC 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| InputDriverFTC-0.3.tar.gz | 4.4 kB | Details |
Release files / InputDriverFTC-0.3.tar.gz
| Download URL | InputDriverFTC-0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef5c9c8fd90406af24daff6ad5400dff1d9b9633148db55e3a7b2ec5cbc8d9df
|
|
BLAKE2b-256 checksum How to use checksums |
ddf7d88dd0bb48bffb9698f14e5b9c4df6dd383865a890456222f448fe60d911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.5
|