mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-22 16:14:37 +08:00
included updates from past two months
This commit is contained in:
@@ -70,6 +70,33 @@ All multibyte values are little endian (aka Intel format, aka least significant
|
||||
* These messages can be sent to either address on a given ODrive board.
|
||||
|
||||
|
||||
Cyclic Messages
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Cyclic messages are sent by ODrive on a timer without a request. As of firmware verion `0.5.4`, the Cyclic messsages are:
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 25 50
|
||||
:header-rows: 1
|
||||
|
||||
* - ID
|
||||
- Name
|
||||
- Rate (ms)
|
||||
* - 0x001
|
||||
- ODrive Heartbeat Message
|
||||
- 100
|
||||
* - 0x009
|
||||
- Encoder Estimates
|
||||
- 10
|
||||
|
||||
.. ID | Name | Rate (ms)
|
||||
.. --: | :-- | :--
|
||||
.. 0x001 | ODrive Heartbeat Message | 100
|
||||
.. 0x009 | Encoder Estimates | 10
|
||||
|
||||
These can be configured for each axis, see e.g. :code:`axis.config.can`.
|
||||
|
||||
|
||||
Interoperability with CANopen
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -372,39 +372,18 @@ The latest official release (0.10.0 as of Nov 2020) doesn't support the STM32F72
|
||||
|
||||
Documentation
|
||||
--------------------------------------------------------------------------------
|
||||
.. admonition:: TODO
|
||||
.. admonition:: In Progress
|
||||
|
||||
**Documentation refactor in progress, changing significantly**
|
||||
ODrive documentation is now built using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
|
||||
|
||||
* Prerequisites:
|
||||
|
||||
* prerequisites
|
||||
* Install Sphinx: :code:`pip install -U sphinx`
|
||||
* Install packages: :code:`pip install sphinx-copybutton sphinx-panels sphinx-rtd-theme`
|
||||
|
||||
|
||||
|
||||
* Run :code:`make html` within the :kbd:`./docs/reStructuredText` folder
|
||||
* Open :kbd:`./docs/reStructuredText/_build/index.html` to view
|
||||
|
||||
.. All `*.md` files in the `docs/` directory of the master branch are served up by GitHub Pages on `this domain <https://docs.odriverobotics.com>`__.
|
||||
|
||||
.. * Theme: `minimal https://github.com/pages-themes/minimal>`__ by `orderedlist](https://github.com/orderedlist)
|
||||
.. * HTML layout: `docs/_layouts/default.html`
|
||||
.. * CSS style: `docs/assets/css/styles.scss`
|
||||
.. * Site index: `docs/_data/index.yaml`
|
||||
|
||||
.. To run the docs server locally:
|
||||
|
||||
.. ```bash
|
||||
.. cd docs
|
||||
.. gem install bundler # The gem command typically comes with a Ruby installation
|
||||
.. #export PATH="$PATH:~/.gem/ruby/2.7.0/bin" # or similar (depends on OS)
|
||||
.. rm Gemfile.lock # only if below commands cause trouble
|
||||
.. bundle config path ruby-bundle
|
||||
.. bundle install
|
||||
.. mkdir -p _api _includes
|
||||
.. python ../Firmware/interface_generator_stub.py --definitions ../Firmware/odrive-interface.yaml --template _layouts/api_documentation_template.j2 --outputs _api/'#'.md && python ../Firmware/interface_generator_stub.py --definitions ../Firmware/odrive-interface.yaml --template _layouts/api_index_template.j2 --output _includes/apiindex.html
|
||||
.. bundle exec jekyll serve --incremental --host=0.0.0.0
|
||||
.. ```
|
||||
|
||||
.. On Ubuntu 18.04, prerequisites are: `ruby ruby-dev zlib1g-dev`.
|
||||
|
||||
.. _modifying-libfibre:
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ The GPIOs that are used for the endstops need to be configured according to the
|
||||
Assuming your endstop is connected to GPIO X:
|
||||
|
||||
* Configuration 1, 2: :code:`<odrv>.config.gpioX_mode = GPIO_MODE_DIGITAL_PULL_DOWN`
|
||||
* Configuration 3, 4: :code:`<odrv>.config.gpioX_mode = GPIO_MODE_DIGITAL_PULL_DOWN`
|
||||
* Configuration 3, 4: :code:`<odrv>.config.gpioX_mode = GPIO_MODE_DIGITAL_PULL_UP`
|
||||
|
||||
.. figure:: figures/Endstop_configuration.png
|
||||
:scale: 50 %
|
||||
@@ -119,14 +119,14 @@ Assuming your endstop is connected to GPIO X:
|
||||
Example
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If we want to configure a 3D printer-style (configuration 4) minimum endstop for homing on GPIO 5 and we want our motor to move away from the endstop about a quarter turn with a 8192 cpr encoder, we would set:
|
||||
If we want to configure a 3D printer-style (configuration 4) minimum endstop for homing on GPIO 5 and we want our motor to move away from the endstop about a quarter turn, we would set:
|
||||
|
||||
.. code:: iPython
|
||||
|
||||
<odrv>.config.gpio5_mode = GPIO_MODE_DIGITAL
|
||||
<odrv>.<axis>.min_endstop.config.gpio_num = 5
|
||||
<odrv>.<axis>.min_endstop.config.is_active_high = False
|
||||
<odrv>.<axis>.min_endstop.config.offset = -1.0*(8912/4)
|
||||
<odrv>.<axis>.min_endstop.config.offset = -0.25
|
||||
<odrv>.<axis>.min_endstop.config.enabled = True
|
||||
<odrv>.config.gpio5_mode = GPIO_MODE_DIGITAL_PULL_UP
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ measured in seconds. Set
|
||||
to turn on this feature.
|
||||
|
||||
The watchdog is fed using the :code:`axis.watchdog_feed()` method of each axis.
|
||||
Some :ref:`ascii commands <acsii-cmd-ref>` feed the watchdog automatically.
|
||||
Some :ref:`ascii commands <acsii-cmd-ref>` and most CANSimple commands feed the watchdog automatically.
|
||||
|
||||
What's next?
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -52,6 +52,27 @@ You may wire the motor phases in any order into a motor connector on the ODrive,
|
||||
You can see instructions `here <https://discourse.odriverobotics.com/t/encoder-error-error-illegal-hall-state/1047/7?u=madcowswe>`__.
|
||||
|
||||
|
||||
ODrive Configuration
|
||||
-------------------------------------------------------------------------------
|
||||
There are a few items we need to configure on the ODrive before setting up the motor.
|
||||
|
||||
* :code:`odrv0.config.enable_brake_resistor`
|
||||
Set this to `True` if using a brake resistor.
|
||||
You need to save the ODrive configuration and reboot the ODrive for this to take effect.
|
||||
|
||||
* :code:`odrv0.config.brake_resistance` [Ohm]
|
||||
This is the resistance of the brake resistor.
|
||||
You can leave this at the default setting if you are not using a brake resistor.
|
||||
Note that there may be some extra resistance in your wiring and in the screw terminals, so if you are getting issues while braking you may want to increase this parameter by around 0.05 ohm.
|
||||
|
||||
* :code:`odrv0.config.dc_max_negative_current` [Amps]
|
||||
This is the amount of current allowed to flow back into the power supply.
|
||||
The convention is that it is negative. By default, it is set to a conservative value of 10mA.
|
||||
If you are using a brake resistor and getting :code:`DC_BUS_OVER_REGEN_CURRENT` errors, raise it slightly.
|
||||
If you are not using a brake resistor and you intend to send braking current back to the power supply, set this to a safe level for your power source.
|
||||
Note that in that case, it should be higher than your motor current limit + current limit margin.
|
||||
|
||||
|
||||
Hoverboard Motor Configuration
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -157,3 +157,10 @@ False steps or direction changes when using step/dir
|
||||
A section cut from cat-5 cable works well as does just twisting some normal insulated wire together.
|
||||
* Ensure that the step/dir signal cables are not draped over the odrive board, are not running in parallel to the motor or power supply cables.
|
||||
* If the above does not resolve your issue on V3.4 boards and lower try adding a ~22 Ohm resistor in series with the step and direction pins along with a ~ 4.7 nF capacitor between the ground pin and the step and dir pins such as shown `here <https://cdn.discordapp.com/attachments/369667319280173069/420811057431445504/IMG_20180306_211224.jpg>`_.
|
||||
|
||||
Index search never completes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* There are some GPIO pin interrupt collisions on ODrive 3.6 that could cause index search to fail in certain conditions.
|
||||
If you are using both step/dir and index pins, we recommend disabling :code:`step_dir_always_on`.
|
||||
For more information, `see this thread <https://github.com/odriverobotics/ODrive/issues/605#issuecomment-971576393>`_.
|
||||
Reference in New Issue
Block a user