cmd_vel_to_dcmotor_node
役割
cmd_vel_to_dcmotor_node は body velocity /cmd_vel を Rogidrive の motor velocity command に変換します。
Interface
種別 |
名前 |
型 / 内容 |
|---|---|---|
subscribe |
|
|
publish |
|
Rogidrive motor command |
parameter |
|
wheel 幾何 |
parameter |
|
wheel 配置と駆動方向 |
parameter |
|
motor 変換 |
Wheel kinematics
body velocity を、
とします。実装では物理配置に合わせて yaw だけ反転します。
wheel 位置と駆動方向は、
です。wheel 位置での robot 速度は、
接地点速度は駆動方向への射影です。
omni wheel 角速度は、
ここで \(\rho\) は wheel_radius です。motor 角速度は、
です。\(\eta_i\) は motor_signs[i]、\(G\) は motor_to_omni_reduction_ratio、\(m_{\max}\) は max_motor_speed_rad_s です。
Timeout
最後の /cmd_vel 受信からの経過時間を \(\Delta t\) とすると、
で timeout です。stop_on_timeout=true の場合、各 motor に速度 0 を 1 回 publish し、古い速度指令は繰り返しません。
設定ファイル
cmd_vel_to_dcmotor_node はパッケージ同梱の rogi_control/cmd_vel_to_dcmotor/config/cmd_vel_to_dcmotor.yaml を使います。sample の real.yaml では有効、sim.yaml では無効です。
key |
default 値 |
数式上の意味 |
|---|---|---|
|
|
入力 topic |
|
|
出力 topic |
|
|
motor command の publish 名 |
|
|
\(\rho\) |
|
|
\(R\) |
|
|
\(G\) |
|
|
\(\alpha_i\) |
|
|
\(\beta_i\) |
|
|
\(\eta_i\) |
|
|
clamp 上限 \(m_{\max}\) |
|
|
command publish 周期 |
|
|
timeout 条件 \(t_{\mathrm{timeout}}\) |
|
|
timeout 時に停止 command を出す |
|
|
ほぼ 0 の motor を disable 扱いにする |
|
|
0 判定しきい値 |
profile 側の起動 key は次です。
launch:
components:
control:
cmd_vel_to_dcmotor:
enabled: true
wheel_odometry と同じ wheel 順序・幾何を使います。特に motor_names[i] と \(\alpha_i,\beta_i,\eta_i\) の対応がずれると、特定 wheel だけ逆向きまたは別位置の wheel として計算されます。