Skip to content

AK70-9 用の有線・無線停止ボタンの追加#5

Open
anhquan18 wants to merge 6 commits into
multichannelfrom
feature/add_brake_button_via_can_connection
Open

AK70-9 用の有線・無線停止ボタンの追加#5
anhquan18 wants to merge 6 commits into
multichannelfrom
feature/add_brake_button_via_can_connection

Conversation

@anhquan18

Copy link
Copy Markdown

What does this implement/fix?

有線・無線E-STOPピン対応のブレーキ機能を追加。ボタン押下時にAK70-9へダンピング指令(Kp=0 / Kd=最大 / v_des=0 / τ_ff=0)を送信し、解除時は送信を停止します。

NUM_CAN_CHANNELの定義に応じた自動ブレーキ指令の送信挙動は以下の通りです。

  • NUM_CAN_CHANNEL==1:can0から12台のモーターへダンピング指令を送信
  • NUM_CAN_CHANNEL==2:can0からID1〜6、can1からID7〜12のモーターへダンピング指令を送信

Does this close any currently open issues?

#2

How has this been tested?

Mujina_boardを用いてボタンの押下・解除でモータのKP/KDゲンイの変化を確認できました。
確認手順はモータの内部状態確認スクリプトを用いて、以下のように実行します。

モータ内部状態確認のスクリプト:
motor_status.py

# セットアップ
sudo ip link set can0 down 2>/dev/null || true
sudo ip link set can1 down 2>/dev/null || true

sudo ip link set can0 type can bitrate 1000000 restart-ms 100
sudo ip link set can1 type can bitrate 1000000 restart-ms 100

sudo ip link set can0 up
sudo ip link set can1 up

# モータの内部状態を確認するスクリプトを実行
python3 motor_status.py

# 停止ボタンの押下・解除でモータの動作を確認します。

Any other comments?

現状、AK70-9にのみ対応しますが、RS02には別のブランチで対応させる予定です。

Checklists

@anhquan18 anhquan18 requested a review from chama1176 July 6, 2026 04:44
@anhquan18 anhquan18 self-assigned this Jul 6, 2026
@anhquan18 anhquan18 changed the title AK70-9 用の有線の・無線停止ボタンの追加 AK70-9 用の有線・無線停止ボタンの追加 Jul 6, 2026
Comment thread src/brake.c Outdated
* (4.2 Force Control) and the quadruped_control TmotorV3 driver.
*/
#ifndef BRAKE_MOTOR_CMD
#define BRAKE_MOTOR_CMD { 0x00, 0x0F, 0xFF, 0x7F, 0xFF, 0x7F, 0xF7, 0xFF }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kp, Kdの値との対応を各要素ごとにコメントで入れてもらえますか

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

解説を追加しました。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。
Kdは100に設定お願いします

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kdゲンイを4095から100に修正しました

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます

@chama1176

Copy link
Copy Markdown
Collaborator

このブランチはマージせずに適宜追従したいと思います

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants