mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-27 13:23:52 +08:00
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:
@@ -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
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user