From 20d7bdf8c007086cda4a3473fa71db1bc4aee995 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Fri, 27 Sep 2019 18:10:24 +0200 Subject: [PATCH] update documentation --- docs/_data/index.yaml | 2 ++ docs/commands.md | 6 +++--- docs/endstops.md | 8 ++++---- docs/getting-started.md | 3 +-- docs/interfaces.md | 4 ++++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/_data/index.yaml b/docs/_data/index.yaml index bd258a11..6d34a8d2 100644 --- a/docs/_data/index.yaml +++ b/docs/_data/index.yaml @@ -15,6 +15,8 @@ sections: url: interfaces - title: Encoders url: encoders + - title: Homing & Endstops + url: endstops - title: Control & Tuning url: control - title: Hoverboard Guide diff --git a/docs/commands.md b/docs/commands.md index 1dce7336..2d26586a 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -61,9 +61,9 @@ Possible values are: * `CTRL_MODE_VOLTAGE_CONTROL` - this one is not normally used. # Control Commands -* `.controller.pos_setpoint = ` -* `.controller.vel_setpoint = ` -* `.controller.current_setpoint = ` +* `.controller.input_pos = ` +* `.controller.input_vel = ` +* `.controller.input_current = ` ## System monitoring commands diff --git a/docs/endstops.md b/docs/endstops.md index ca63bd19..3eae059d 100644 --- a/docs/endstops.md +++ b/docs/endstops.md @@ -35,10 +35,11 @@ Enables/disables detection of the endstop. If disabled, homing and e-stop canno This is the position of the endstops on the relevant axis, in counts. For example, if you want a position command of `0` to represent a position 100 counts away from the endstop, the offset would be `-100.0` (because the endstop is located at axis position `-100.0`). ``` -..max_endstop.config.offset = ..min_endstop.config.offset = ``` +This setting is only used for homing. Only the offset of the `min_endstop` is used. + ### debounce_ms The debouncing time for this endstop. Most switches exhibit some sort of bounce, and this setting will help prevent the switch from triggering repeatedly. It works for both HIGH and LOW transitions, regardless of the setting of `is_active_high`. Debouncing is a good practice for digital inputs, read up on it [here](https://en.wikipedia.org/wiki/Switch). `debounce_ms` has units of miliseconds. @@ -94,17 +95,16 @@ homing_speed | float | 2000.0f ### Performing the Homing Sequence -Homing is possible once the ODrive has closed-loop control over the axis. To trigger homing, we must first be in `AXIS_STATE_CLOSED_LOOP_CONTROL`, then call `..controller.home_axis()` This starts the homing sequence, which works as follows: +Homing is possible once the ODrive has closed-loop control over the axis. To trigger homing, we must enter `AXIS_STATE_HOMING`. This starts the homing sequence, which works as follows: 1. The axis moves towards the `min_endstop` at `homing_speed` 2. The axis presses the `min_endstop` 3. The axis moves away from the `min_endstop` to the home position ### Homing at Startup -It is possible to configure the odrive to enter homing immediately after startup. For safety reasons, we require the user to specifically enable closed loop control at startup, even if homing is requested. Thus, to enable homing at startup, the following must be configured: +It is possible to configure the odrive to enter homing immediately after startup. To enable homing at startup, the following must be configured: ``` -..config.startup_closed_loop_control = True ..config.startup_homing = True ``` diff --git a/docs/getting-started.md b/docs/getting-started.md index 444bdaf4..1ea259c2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -343,8 +343,7 @@ You can now control the velocity with `axis.controller.input_vel = 5000` [count/ Set `axis.controller.config.control_mode = CTRL_MODE_CURRENT_CONTROL`.
You can now control the current with `axis.controller.current_setpoint = 3` [A]. -*Note: There is no velocity limiting in current control mode. Make sure that you don't overrev the motor, or exceed the max speed for your encoder.* - +Note: If you exceed `vel_limit` in current control mode, the current is reduced. To disable this, set `axis.controller.enable_current_vel_limit = False`. ## Watchdog Timer Each axis has a configurable watchdog timer that can stop the motors if the diff --git a/docs/interfaces.md b/docs/interfaces.md index e9a8781d..ca9db588 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -169,3 +169,7 @@ Pinout: * GPIO 1: Tx (connect to Rx of other device) * GPIO 2: Rx (connect to Tx of other device) * GND: you must connect the grounds of the devices together. Use any GND pin on J3 of the ODrive. + +## CAN Simple Protocol + +See [CAN Protocol](can-protocol).