mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-21 07:14:22 +08:00
Merge branch 'master' into devel
This commit is contained in:
+8
-1
@@ -1,7 +1,7 @@
|
||||
# Unreleased Features
|
||||
Please add a note of your changes below this heading if you make a Pull Request.
|
||||
|
||||
## [0.4.1] - UNRELEASED
|
||||
## UNRELEASED
|
||||
### Added
|
||||
* Hall sensor feedback
|
||||
* Configurable RC PWM input
|
||||
@@ -12,6 +12,13 @@ Please add a note of your changes below this heading if you make a Pull Request.
|
||||
* `encoder.config.bandwidth`
|
||||
|
||||
# Releases
|
||||
## [0.4.1] - 2018-07-01
|
||||
### Fixed
|
||||
* Encoder errors would show up as Axis error `ERROR_MOTOR_FAILED` instead of `ERROR_ENCODER_FAILED`.
|
||||
* Various pip install dependencies
|
||||
* Ability for python tools threads to quit properly
|
||||
* dfuse error prints now python3 compatible
|
||||
|
||||
## [0.4.0] - 2018-06-10
|
||||
### Added
|
||||
* Encoder can now go forever in velocity/torque mode due to using circular encoder space.
|
||||
|
||||
@@ -25,7 +25,7 @@ void Encoder::setup() {
|
||||
|
||||
void Encoder::set_error(Encoder::Error_t error) {
|
||||
error_ |= error;
|
||||
axis_->error_ |= Axis::ERROR_MOTOR_FAILED;
|
||||
axis_->error_ |= Axis::ERROR_ENCODER_FAILED;
|
||||
}
|
||||
|
||||
bool Encoder::do_checks(){
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ All encoder types that are currently supported require the ODrive to do some sor
|
||||
|
||||
During encoder offset calibration the rotor must be allowed to rotate without any biased load during startup. That means mass and weak friction loads are fine, but gravity or spring loads are not okay.
|
||||
|
||||
In the `odrivetool`, type `<axis>.encoder.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION` <kbd>Enter</kbd>.
|
||||
In the `odrivetool`, type `<axis>.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION` <kbd>Enter</kbd>.
|
||||
|
||||
To verify everything went well, check the following variables:
|
||||
|
||||
|
||||
@@ -153,8 +153,8 @@ def setup_udev_rules(logger):
|
||||
logger.warn("you should run this as root, otherwise it will probably not work")
|
||||
with open('/etc/udev/rules.d/50-odrive.rules', 'w') as file:
|
||||
file.write('SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="0d3[0-9]", MODE="0666"\n')
|
||||
subprocess.run(["udevadm", "control", "--reload-rules"], check=True)
|
||||
subprocess.run(["udevadm", "trigger"], check=True)
|
||||
subprocess.check_call(["udevadm", "control", "--reload-rules"])
|
||||
subprocess.check_call(["udevadm", "trigger"])
|
||||
logger.info('udev rules configured successfully')
|
||||
|
||||
def yes_no_prompt(question, default=None):
|
||||
|
||||
@@ -36,7 +36,7 @@ def get_version_from_git():
|
||||
print(ex)
|
||||
return "[unknown version]", 0, 0, 0, 1
|
||||
|
||||
def get_version_str(git_only=False, is_post_release=False, bump_rev=False):
|
||||
def get_version_str(git_only=False, is_post_release=False, bump_rev=False, release_override=False):
|
||||
"""
|
||||
Returns the versions of the tools
|
||||
If git_only is true, the version.txt file is ignored even
|
||||
@@ -57,7 +57,7 @@ def get_version_str(git_only=False, is_post_release=False, bump_rev=False):
|
||||
version = '{}.{}.{}'.format(major, minor, revision)
|
||||
if is_post_release:
|
||||
version += ".post"
|
||||
elif unreleased:
|
||||
elif not release_override and unreleased:
|
||||
version += ".dev"
|
||||
return version
|
||||
|
||||
@@ -70,6 +70,9 @@ if __name__ == '__main__':
|
||||
args = parser.parse_args()
|
||||
|
||||
git_name, major, minor, revision, unreleased = get_version_from_git()
|
||||
print('Firmware version {}.{}.{}{} ({})'.format(
|
||||
major, minor, revision, '-dev' if unreleased else '',
|
||||
git_name))
|
||||
args.output.write('#define FW_VERSION "{}"\n'.format(git_name))
|
||||
args.output.write('#define FW_VERSION_MAJOR {}\n'.format(major))
|
||||
args.output.write('#define FW_VERSION_MINOR {}\n'.format(minor))
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
|
||||
import fibre.discovery
|
||||
from fibre import Logger, Event
|
||||
import odrive
|
||||
from odrive.utils import OperationAbortedException, decode_temp
|
||||
from odrive.utils import OperationAbortedException
|
||||
from odrive.configuration import *
|
||||
|
||||
# Flush stdout by default
|
||||
|
||||
+40
-32
@@ -31,13 +31,16 @@ PyPi credentials and that your account has the rights
|
||||
to publish packages with the name odrive.
|
||||
"""
|
||||
|
||||
# Set to true to make the current release
|
||||
is_release = False
|
||||
|
||||
# Set to true to make an official post-release, rather than dev of new version
|
||||
is_post_release = False
|
||||
post_rel_num = 8
|
||||
post_rel_num = 0
|
||||
|
||||
# To test higher numbered releases, bump to the next rev
|
||||
bump_rev = not is_post_release
|
||||
devnum = 1
|
||||
devnum = 0
|
||||
bump_rev = not is_post_release and not is_release
|
||||
|
||||
# TODO: add additional y/n prompt to prevent from erroneous upload
|
||||
|
||||
@@ -50,7 +53,10 @@ creating_package = "sdist" in sys.argv
|
||||
# Load version from Git tag
|
||||
import odrive.version
|
||||
version = odrive.version.get_version_str(
|
||||
git_only=creating_package, is_post_release=is_post_release, bump_rev=bump_rev )
|
||||
git_only=creating_package,
|
||||
is_post_release=is_post_release,
|
||||
bump_rev=bump_rev,
|
||||
release_override=is_release)
|
||||
|
||||
# If we're currently creating the package we need to autogenerate
|
||||
# a file that contains the version string
|
||||
@@ -85,33 +91,35 @@ if not creating_package:
|
||||
except PermissionError:
|
||||
print("Warning: could not set up udev rules. Run `sudo odrivetool udev-setup` to try again.")
|
||||
|
||||
setup(
|
||||
name = 'odrive',
|
||||
packages = ['odrive', 'odrive.dfuse', 'fibre'],
|
||||
scripts = ['odrivetool', 'odrivetool.bat', 'odrive_demo.py'],
|
||||
version = version,
|
||||
description = 'Control utilities for the ODrive high performance motor controller',
|
||||
author = 'Oskar Weigl',
|
||||
author_email = 'oskar.weigl@odriverobotics.com',
|
||||
license='MIT',
|
||||
url = 'https://github.com/madcowswe/ODrive',
|
||||
keywords = ['odrive', 'motor', 'motor control'],
|
||||
install_requires = [
|
||||
'ipython', # Used to do the interactive parts of the odrivetool
|
||||
'PyUSB', # Required to access USB devices from Python through libusb
|
||||
'PySerial', # Required to access serial devices from Python
|
||||
'requests', # Used to by DFU to load firmware files
|
||||
'IntelHex', # Used to by DFU to download firmware from github
|
||||
'matplotlib', # Required to run the liveplotter
|
||||
'pywin32 >= 222; platform_system == "Windows"' # Required for fancy terminal features on Windows
|
||||
],
|
||||
package_data={'': ['version.txt']},
|
||||
classifiers = [],
|
||||
)
|
||||
try:
|
||||
setup(
|
||||
name = 'odrive',
|
||||
packages = ['odrive', 'odrive.dfuse', 'fibre'],
|
||||
scripts = ['odrivetool', 'odrivetool.bat', 'odrive_demo.py'],
|
||||
version = version,
|
||||
description = 'Control utilities for the ODrive high performance motor controller',
|
||||
author = 'Oskar Weigl',
|
||||
author_email = 'oskar.weigl@odriverobotics.com',
|
||||
license='MIT',
|
||||
url = 'https://github.com/madcowswe/ODrive',
|
||||
keywords = ['odrive', 'motor', 'motor control'],
|
||||
install_requires = [
|
||||
'ipython', # Used to do the interactive parts of the odrivetool
|
||||
'PyUSB', # Required to access USB devices from Python through libusb
|
||||
'PySerial', # Required to access serial devices from Python
|
||||
'requests', # Used to by DFU to load firmware files
|
||||
'IntelHex', # Used to by DFU to download firmware from github
|
||||
'matplotlib', # Required to run the liveplotter
|
||||
'pywin32 >= 222; platform_system == "Windows"' # Required for fancy terminal features on Windows
|
||||
],
|
||||
package_data={'': ['version.txt']},
|
||||
classifiers = [],
|
||||
)
|
||||
|
||||
# TODO: include README
|
||||
# TODO: include README
|
||||
|
||||
# clean up
|
||||
if creating_package:
|
||||
os.remove(version_file_path)
|
||||
os.remove(fibre_link)
|
||||
finally:
|
||||
# clean up
|
||||
if creating_package:
|
||||
os.remove(version_file_path)
|
||||
os.remove(fibre_link)
|
||||
|
||||
Reference in New Issue
Block a user