Commit Graph
1392 Commits
Author SHA1 Message Date
Samuel Sadok deb4a68d89 remove build.sh
This script was used by Travis CI which got disabled in
a4e03ffd07 in favor of GitHub Workflows.
Developers should use `make` instead of this script.
2020-07-20 11:12:01 +02:00
Rowan Goemans 09daacda9f Changed bash shebang to more a general version. 2020-07-19 20:55:01 +02:00
Oskar Weigl 8c85d2fe79 Add TODOs
Avoid transients when entering closed loop also on Circular position mode.
Phase interpolation is snapping to hard.
2020-07-18 19:05:34 -07:00
Rowan Goemans 1a0d6acace - Refactored thermal and current lmiting sub-systems and introduced motor thermistor support.
- Added thermal errors to dump_errors call in odrivetool.
- Added function in odrivetool to set thermistor coefficients based on thermistor specs.
- Added documentation for users on how to connect and configure their own thermistors.
2020-07-17 14:09:47 +02:00
Stephen Mounioloux 06989366a5 Added pos_abs_ latch in encoder::update() 2020-07-17 13:22:11 +02:00
Samuel Sadok 219c818fdd turn version.h into version.c
This speeds up the build process in many cases because this file is
refreshed on every build and by making it a code file much less off the
build graph depends on it.
2020-07-16 20:57:12 +02:00
Samuel Sadok 7fade2b95a add filter to the reported <odrv>.ibus 2020-07-13 16:00:33 +02:00
Unknown 0ee6c92cea Force position control when using ASCII t command 2020-07-08 22:18:19 -04:00
Unknown 28e54e2655 Merge branch 'rc-v0.5.0' into devel 2020-07-08 22:14:36 -04:00
Unknown ce7073baf5 Fix ASCII 't' command 2020-07-08 22:12:51 -04:00
Unknown b36e352ee0 Fix SPI DMA with different SPI transfer sizes 2020-07-03 23:37:54 +02:00
Unknown 9360c5df65 Fix SPI DMA with different SPI transfer sizes 2020-07-02 21:34:51 -04:00
Cam Buss 2571ab308d Allow reversal of homing direction and ability to clear SPI Error Rate (#427)
* clear spi_error_rate on error clear
* negative homing speed and negative endtop offset
2020-07-01 22:53:17 +02:00
Cam Buss fc82ed6610 Allow reversal of homing direction and ability to clear SPI Error Rate (#427)
* clear spi_error_rate on error clear
* negative homing speed and negative endtop offset
2020-07-01 22:50:25 +02:00
Samuel Sadok 2d05a50e89 Fix ASCII protocol bug when writing to uint8_t
When writing to uint8_t properties or equivalently
sized enum properties, the ASCII protocol handler would
write beyond the variable itself and overwrite adjacent
memory.

This manifested for instance in the following:

    r axis0.controller.config.input_mode 1
    w axis0.controller.config.control_mode 3
    r axis0.controller.config.input_mode 0

This boils down to what appears to be misbehavior of
`sscanf`.

This fix adds an intermediate union to provide a safe
memory area for the `sscanf` call.
2020-07-01 13:00:09 +02:00
Samuel Sadok 60482c9e8b Fix ASCII protocol bug when writing to uint8_t
When writing to uint8_t properties or equivalently
sized enum properties, the ASCII protocol handler would
write beyond the variable itself and overwrite adjacent
memory.

This manifested for instance in the following:

    r axis0.controller.config.input_mode 1
    w axis0.controller.config.control_mode 3
    r axis0.controller.config.input_mode 0

This boils down to what appears to be misbehavior of
`sscanf`.

This fix adds an intermediate union to provide a safe
memory area for the `sscanf` call.
2020-07-01 12:42:01 +02:00
PAJohnson eb494f409a Change from CurrentControl in interface yaml to TorqueControl 2020-06-23 16:11:11 -04:00
PAJohnson c63e51f8d7 Changed docs to reflect change from CONTROL_MODE_CURRENT_CONTROL to CONTROL_MODE_TORQUE_CONTROL 2020-06-23 16:04:00 -04:00
PAJohnson 152a127d67 Merge branch 'devel' of https://github.com/madcowswe/Odrive into A_to_Nm 2020-06-23 15:59:51 -04:00
Oskar Weigl 99507d2ece Merge pull request #424 from madcowswe/feature/doc_autogen
HTML API reference autogeneration
2020-06-23 12:27:12 -07:00
PAJohnson fc5361a042 Merge remote-tracking branch 'upstream/devel' into A_to_Nm 2020-06-22 13:38:47 -04:00
Samuel Sadok 4100fff46a Prevent python from using __pycache__ during build
Caching doesn't work well with the tup build system as tup acts offended
when a build task writes files outside of tup's root directory.

Particularly on Windows this manifests in errors like:

tup error: File '[...]/__pycache__/unicode_escape.cpython-38.pyc' was written to, but is not in .tup/db. You probably should specify it as an output

The option -B prevents python from using byte code cache.
2020-06-22 06:00:35 -07:00
PAJohnson 8d259c141e Merge branch 'A_to_Nm' of https://github.com/PAJohnson/ODrive into A_to_Nm 2020-06-18 18:33:31 -04:00
PAJohnson e5ace9ecc8 Changed default values of vel_gain, vel_integrator_gain and torque_constant to work with ODrive branded motors.
Changed units in comments from A to Nm where appropriate.
2020-06-18 18:32:24 -04:00
PAJohnson f19f57779b Changed vel_gain, vel_integrator_gain and torque_constant to work out of the box with ODrive branded motors.
Removed unused variable torque_lim_margin
Changed default value of torque_lim to +inf
2020-06-18 18:27:19 -04:00
Oskar Weigl 758989e2b4 Cleaner clamping 2020-06-18 12:58:10 -07:00
pjohnson 63f7c09bc2 Clamped max_torque to 0 for ACIM motors in case max_torque happened to be negative. 2020-06-18 15:13:58 -04:00
pjohnson a9b1841092 Added Motor::max_available_torque(). Use is to correctly determine torque limit for velocity anti-windup.
Set default value (0.0) for current_setpoint
Units documentation
Removed unused variable thermal_torque_lim_
2020-06-18 13:11:41 -04:00
pjohnson ceabd24582 Made changes reflecting PR comments.
Added torque_ramp_rate to controller config.
Changed INPUT_MODE_CURRENT_RAMP to INPUT_MODE_TORQUE_RAMP for controller input mode enum.
Torque limits and current limits are now observed seperately. Torque limit is in the controller, current limit is in the motor object.
Fixed torque -> current calculation in motor_update to handle ACIM motors.
2020-06-17 13:15:36 -04:00
Samuel Sadok 055aabc5a1 Make compile work on GCC 10.1 (again) 2020-06-17 12:39:01 +02:00
pjohnson d78119e29f Modified docs and communication interfaces to reflect change from A to Nm for motor control input.
Renamed vel_integrator_current_ to vel_integrator_torque_
Removed input_current_ from controller, added input_torque_
2020-06-16 17:10:36 -04:00
pjohnson e2527ec468 added torque_constant to motor config struct and interface file
changed all instances of current_setpoint to torque_setpoint
modified limitVel() to use torque instead of current units
removed effective_current_lim, added effective_torque_lim()
added torque_lim to motor config struct and interface file
2020-06-16 15:55:18 -04:00
Samuel Sadok 445f41aa2c Enhance API documentation 2020-06-10 23:03:07 +02:00
Samuel Sadok d304d4e7eb move part of documentation into the yaml file
The following documentation is moved to odrive-interfaces.yaml:
 - Error flag documentation from troubleshooting.md
 - Axis state documentation from commands.md
 - Input mode documentation from input_modes.md
2020-06-10 23:03:07 +02:00
Samuel Sadok 426236dff1 implement HTML API reference autogeneration
This adds a jinja template to generate markdown files
(with lots of HTML mixed in) from YAML using the existing
interface_generator.py script.

The docs website layout files are modified to incorporate the
new documentation.

While previously Github Pages was automatically running
Jekyll on the docs folder, this commit adds a custom Github
workflow to compile and deploy the website to facilitate
the custom markdown generation step before Jekyll runs.
2020-06-10 23:03:07 +02:00
Samuel Sadok 8c6ab4bd30 add compile prerequisites to CI 2020-06-10 15:44:03 +02:00
Samuel Sadok 61bc1322d1 Add help text for missing dependencies 2020-06-10 13:20:17 +02:00
Samuel Sadok f7c8a6ea94 Merge remote-tracking branch 'origin/devel' into feature/interface_autogen 2020-06-10 13:01:15 +02:00
Samuel Sadok c8f46bbb4a Make compile work on GCC 10.1 2020-06-08 10:16:39 +02:00
Samuel Sadok b6066eac01 fix windows compile 2020-06-05 14:55:20 +02:00
Samuel Sadok bcaa5cca9f make interface generator python 3.5 compatible.
Python 3.5 is the default version of Ubuntu 16.04 which is what our
Travis CI runs on.

- Python <3.6 does not keep the order of normal dicts.
- Python 3.5 does not use UTF-8 encoding for files by default.
2020-06-04 13:02:39 +02:00
Samuel Sadok c53ec7e9a5 resolve compile issues 2020-06-04 10:12:09 +02:00
Samuel Sadok 23a993ac42 switch to jsonschema draft 4 2020-06-03 18:24:54 +02:00
Samuel Sadok b529bddd94 add note to enums.py 2020-06-03 18:19:04 +02:00
Samuel Sadok 592b5f48c7 fix compilation
improve Python3 install check, remove python string
interpolation which is not supported by older python
versions

remove string interpolation
2020-06-03 18:05:38 +02:00
Samuel Sadok a874dcbbb9 Merge branch 'devel' into feature/interface_autogen 2020-06-02 21:26:22 +02:00
Samuel Sadok 6047c72014 remove stray line 2020-06-02 19:21:32 +02:00
samuelsadok 1d29893e8b Merge pull request #10 from RoCkaZ/master
Only set new timeout if it is different from the old one
2020-06-02 19:19:59 +02:00
Samuel Sadok a755f27917 Fix hang on compile on Windows
Windows 10 includes since version 1903 a python stub which is supposed
to open the MS Store if python is invoked but not installed. However
when invoked from tup, the stub simply hangs without output.

With this change we first check the python version (something that the
Windows stub does not interer with) before we invoke it.
2020-06-02 16:54:28 -07:00
Samuel Sadok fb7cabef5b make all other interfaces children of ODrive 2020-05-29 10:25:06 +02:00