Changed from counts->radians internally. By default, input positions and velocities are also in radians.

Added multipliers for input pos/vel to allow users to define their own units for those inputs.
This commit is contained in:
PAJohnson
2020-06-25 21:39:20 +01:00
parent 98e9d730f4
commit 9faf46ad47
10 changed files with 43 additions and 30 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ def print_help(args, have_devices):
print('')
print('For example: "odrv0.motor0.encoder.pos_estimate"')
print('will print the current encoder position on motor 0')
print('and "odrv0.motor0.pos_setpoint = 10000"')
print('and "odrv0.motor0.input_pos = 10000"')
print('will send motor0 to 10000')
print('')
+3 -2
View File
@@ -8,6 +8,7 @@ import sys
import os
import argparse
import time
import math
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.realpath(__file__))),
@@ -151,8 +152,8 @@ try:
# If you want to plot different values, change them here.
# You can plot any number of values concurrently.
cancellation_token = start_liveplotter(lambda: [
my_odrive.axis0.encoder.pos_estimate,
my_odrive.axis1.encoder.pos_estimate,
my_odrive.axis0.encoder.pos_est_rad,
my_odrive.axis1.encoder.pos_est_rad,
])
print("Showing plot. Press Ctrl+C to exit.")