mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 14:38:18 +08:00
update changelog, improve some ascii commands
This commit is contained in:
@@ -37,6 +37,20 @@ Example: `t 0 -20000`
|
||||
For general moving around of the axis, this is the recommended command.
|
||||
|
||||
#### Motor Position command
|
||||
For basic use where you send one setpoint at at a time, use the `q` command.
|
||||
If you have a realtime controller that is streaming setpoints and tracking a trajectory, use the `p` command.
|
||||
|
||||
```
|
||||
q motor position velocity_lim current_lim
|
||||
```
|
||||
* `q` for position
|
||||
* `motor` is the motor number, `0` or `1`.
|
||||
* `position` is the desired position, in encoder counts.
|
||||
* `velocity_lim` is the velocity limit, in counts/s (optional).
|
||||
* `current_lim` is the current limit, in A (optional).
|
||||
|
||||
Example: `q 0 -20000 10000 10`
|
||||
|
||||
```
|
||||
p motor position velocity_ff current_ff
|
||||
```
|
||||
@@ -90,3 +104,8 @@ Not all parameters can be accessed via the ASCII protocol but at least all param
|
||||
* `property` name of the property, as seen in ODrive Tool
|
||||
* `value` text representation of the value to be written
|
||||
* Example: `w axis0.controller.pos_setpoint -123.456`
|
||||
|
||||
#### System commands:
|
||||
* `ss` - Save config
|
||||
* `se` - Erase config
|
||||
* `sr` - Reboot
|
||||
|
||||
+11
-2
@@ -261,7 +261,7 @@ You can also directly control the current of the motor, which is proportional to
|
||||
|
||||
|
||||
### Trajectory control
|
||||
Set `axis.controller.config.control_mode = CTRL_MODE_TRAJECTORY_CONTROL`.<br>
|
||||
While in position control mode, use the `move_to_pos` or `move_incremental` functions. See the **Usage** section for details<br>
|
||||
This mode lets you smoothly accelerate, coast, and decelerate the axis from one position to another. With raw position control, the controller simply tries to go to the setpoint as quickly as possible. Using a trajectory lets you tune the feedback gains more aggressively to reject disturbance, while keeping smooth motion.
|
||||
|
||||
<br>
|
||||
@@ -291,9 +291,18 @@ Keep in mind that you must still set your safety limits as before. I recommend
|
||||
#### Usage
|
||||
Use the `move_to_pos` function to move to an absolute position:
|
||||
```
|
||||
<odrv>.<axis>.controller.move_to_pos(<Float>)
|
||||
<odrv>.<axis>.controller.move_to_pos(your_absolute_pos)
|
||||
```
|
||||
|
||||
Use the `move_incremental` function to move to a relative position.
|
||||
To set the goal relative to the current actual position, use `from_goal_point = False`
|
||||
To set the goal relative to the previous destination, use `from_goal_point = True`
|
||||
```
|
||||
<odrv>.<axis>.controller.move_incremental(pos_increment, from_goal_point)
|
||||
```
|
||||
|
||||
You can also execute a move with the [appropriate ascii command](ascii-protocol.md#motor-trajectory-command).
|
||||
|
||||
### Circular position control
|
||||
|
||||
To enable Circular position control, set `axis.controller.config.setpoints_in_cpr = True`
|
||||
|
||||
Reference in New Issue
Block a user