mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-18 09:29:03 +08:00
Merge branch 'devel' into DRV-error-readouts
This commit is contained in:
Vendored
+2
-1
@@ -6,7 +6,8 @@
|
||||
"configurations": [
|
||||
{
|
||||
// For the Cortex-Debug extension
|
||||
"type": "openocd-gdb",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "openocd",
|
||||
"request": "launch",
|
||||
"name": "Debug ODrive",
|
||||
"executable": "${workspaceRoot}/build/ODriveFirmware.elf",
|
||||
|
||||
+10
-1
@@ -1,10 +1,16 @@
|
||||
## [0.3.4] - 2018-02-21
|
||||
## UNRELEASED
|
||||
Please add a note of your changes below this heading if you make a PR
|
||||
|
||||
### Added
|
||||
* Reporting of DRV status/control registers and fault codes
|
||||
* DRV status read script
|
||||
* Microsecond delay function
|
||||
|
||||
## [0.3.4] - 2018-02-13
|
||||
|
||||
### Fixed
|
||||
* Broken way to check for python 2. Python 2 not supported yet.
|
||||
|
||||
## [0.3.3] - 2018-02-12
|
||||
|
||||
### Added
|
||||
@@ -14,6 +20,9 @@
|
||||
### Changed
|
||||
* Modified python code to be Python 2 compatible
|
||||
|
||||
### Fixed
|
||||
* USB CSC (USB serial) now reports a sensible baud rate
|
||||
|
||||
## [0.3.2] - 2018-02-02
|
||||
|
||||
### Added
|
||||
|
||||
@@ -72,7 +72,7 @@ Motor_t motors[] = {
|
||||
.vel_limit = 20000.0f, // [counts/s]
|
||||
.current_setpoint = 0.0f, // [A]
|
||||
.calibration_current = 10.0f, // [A]
|
||||
.resistance_calib_max_voltage = 1.0f, // [V]
|
||||
.resistance_calib_max_voltage = 1.0f, // [V] - You may need to increase this if this voltage isn't sufficient to drive calibration_current through the motor.
|
||||
.phase_inductance = 0.0f, // to be set by measure_phase_inductance
|
||||
.phase_resistance = 0.0f, // to be set by measure_phase_resistance
|
||||
.motor_thread = 0,
|
||||
@@ -178,7 +178,7 @@ Motor_t motors[] = {
|
||||
.vel_limit = 20000.0f, // [counts/s]
|
||||
.current_setpoint = 0.0f, // [A]
|
||||
.calibration_current = 10.0f, // [A]
|
||||
.resistance_calib_max_voltage = 1.0f, // [V]
|
||||
.resistance_calib_max_voltage = 1.0f, // [V] - You may need to increase this if this voltage isn't sufficient to drive calibration_current through the motor.
|
||||
.phase_inductance = 0.0f, // to be set by measure_phase_inductance
|
||||
.phase_resistance = 0.0f, // to be set by measure_phase_resistance
|
||||
.motor_thread = 0,
|
||||
|
||||
@@ -16,6 +16,7 @@ The project is under active development, so make sure to check the [Changelog](C
|
||||
- [Continuing without an IDE](#no-ide-instructions)
|
||||
- [Communicating over USB or UART](#communicating-over-usb-or-uart)
|
||||
- [Encoder Calibration](#encoder-calibration)
|
||||
- [Checking for error codes](#checking-for-error-codes)
|
||||
- [Generating startup code](#generating-startup-code)
|
||||
- [Notes for Contributors](#notes-for-contributors)
|
||||
|
||||
@@ -226,6 +227,36 @@ If you have an encoder with an index (Z) signal, you may avoid having to do the
|
||||
* If you wish to scan for the index pulse in the other direction (if for example your axis usually starts close to a hard-stop), you can set a negative value in `.encoder.idx_search_speed`.
|
||||
* If your motor has problems reaching the index location due to the mechanical load, you can increase `.calibration_current`.
|
||||
|
||||
<br><br>
|
||||
## Checking for error codes
|
||||
`explore_odrive.py`can also be used to check error codes when your odrive is not working as expected. For example `my_odrive.motor0.error` will list the error code associated with motor 0.
|
||||
<br><br>
|
||||
The error nummber corresponds to the following:
|
||||
0. `ERROR_NO_ERROR`
|
||||
1. `ERROR_PHASE_RESISTANCE_TIMING`
|
||||
2. `ERROR_PHASE_RESISTANCE_MEASUREMENT_TIMEOUT`
|
||||
3. `ERROR_PHASE_RESISTANCE_OUT_OF_RANGE`
|
||||
4. `ERROR_PHASE_INDUCTANCE_TIMING`
|
||||
5. `ERROR_PHASE_INDUCTANCE_MEASUREMENT_TIMEOUT`
|
||||
6. `ERROR_PHASE_INDUCTANCE_OUT_OF_RANGE`
|
||||
7. `ERROR_ENCODER_RESPONSE`
|
||||
8. `ERROR_ENCODER_MEASUREMENT_TIMEOUT`
|
||||
9. `ERROR_ADC_FAILED`
|
||||
10. `ERROR_CALIBRATION_TIMING`
|
||||
11. `ERROR_FOC_TIMING`
|
||||
12. `ERROR_FOC_MEASUREMENT_TIMEOUT`
|
||||
13. `ERROR_SCAN_MOTOR_TIMING`
|
||||
14. `ERROR_FOC_VOLTAGE_TIMING`
|
||||
15. `ERROR_GATEDRIVER_INVALID_GAIN`
|
||||
16. `ERROR_PWM_SRC_FAIL`
|
||||
17. `ERROR_UNEXPECTED_STEP_SRC`
|
||||
18. `ERROR_POS_CTRL_DURING_SENSORLESS`
|
||||
19. `ERROR_SPIN_UP_TIMEOUT`
|
||||
20. `ERROR_DRV_FAULT`
|
||||
21. `ERROR_NOT_IMPLEMENTED_MOTOR_TYPE`
|
||||
|
||||
If you get an error code larger than this, it may be the case that someone added a code and forgot to update the documentation. In that case, please check [MotorControl/low_level.h](MotorControl/low_level.h) for the full enum.
|
||||
|
||||
<br><br>
|
||||
## Generating startup code
|
||||
**Note:** You do not need to run this step to program the board. This is only required if you wish to update the auto generated code.
|
||||
|
||||
@@ -26,8 +26,8 @@ by default while UART runs the stream based variant.
|
||||
|
||||
## Packet format ##
|
||||
We will call the ODrive "server" and the PC "client". A request is a message
|
||||
from the PC to the ODrive and a response is a message from the PC to the
|
||||
ODrive.
|
||||
from the PC to the ODrive and a response is a message from the ODrive to the
|
||||
PC.
|
||||
|
||||
Each request-response transaction corresponds to a single endpoint operation.
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import sys
|
||||
|
||||
import abc
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
ABC = abc.ABC
|
||||
else:
|
||||
ABC = abc.ABCMeta('ABC', (), {})
|
||||
# if sys.version_info >= (3, 4):
|
||||
ABC = abc.ABC
|
||||
# else:
|
||||
# ABC = abc.ABCMeta('ABC', (), {})
|
||||
|
||||
if sys.version_info <= (3, 3):
|
||||
from monotonic import monotonic
|
||||
time.monotonic = monotonic
|
||||
# if sys.version_info <= (3, 3):
|
||||
# from monotonic import monotonic
|
||||
# time.monotonic = monotonic
|
||||
|
||||
SYNC_BYTE = 0xAA
|
||||
CRC8_INIT = 0x42
|
||||
|
||||
Reference in New Issue
Block a user