ODrive的ASCII协议
---------------------学习笔记-----------------------------------------
一、发送命令
(1)用Zadig把ODrive的驱动设置为“usbser”;(windows会把设备看作COM端口)
(2)用PuTTY或者你喜欢的编程语言发送命令;
二、命令格式
command *42 ; comment [new line character]
三、参考命令
(1)电机轨迹命令----------t motor destination (推荐一般绕轴运动)
Example: t 0 -20000
t是轨迹;
motor是电机(0 or 1);
destination是目标位置 (编码器计数)
(2)电机位置命令
①发送一个设定值------q motor position velocity_lim current_lim
Example: q 0 -20000 10000 10
velocity_lim:速度限制,单位是count /s(可选)。
current_lim:电流限制,单位是A(可选)。
②实时控制-------------p motor position velocity_ff current_ff
Example: p 0 -20000 0 0
velocity_ff:速度前馈项,单位是count /s(可选)。
cur