記事一覧

M5Atomで作る四脚ロボット Wiiヌンチャクを繋げてコントロール

M5Atomで作る四脚ロボット Wiiヌンチャクを繋げてコントロール


Control by connecting Wii Nunchuck, quadruped robot made with M5Atom.



こんにちはRoboTakaoです。M5Atomで作る四脚ロボットをブラッシュアップ中です。
今度はWii のコントローラ ヌンチャクを接続してロボットをコントロールしたいと思います。

Hello, I'm Robo Takao. I am brushing up a quadruped robot made with M5Atom.
Now I want to connect the Wii controller Nunchaku to control the robot.

NX15_72.jpg

構成としては以下のようにして、ロボットとは違うM5Atom LiteにWii ヌンチャクを繋げてrosserial経由で通信します。
The configuration is as follows. Connect the Wii Nunchuck to M5Atom Lite, which is different from the robot. And it communicates via rosserial.

構成 Configure

NX15_73.jpg

WiiヌンチャクとM5Atom Liteの接続
Wii Nunchuck and M5Atom Lite connection

実はだいぶ前にArduino nanoで接続テストをしていました。その時の投稿はこちら。WiiヌンチャクはI2Cで通信しています。M5AtomともI2Cで繋げれば使えます。
Previously, I did a connection test with Arduino nano. Click here for the post at that time. Wii Nunchuck communicates via I2C. You can use it by connecting it to M5Atom with I2C.

NX15_64.jpg

まずはテストtest
Arduino IDEのシリアルプロッターで動作確認
Confirmed operation with Arduino IDE serial plotter



ROS gazeboで四脚ロボットで動作できることを確認
Confirmed that ROS gazebo can operate with a quadruped robot



実機でも動作確認Operation check on the actual machine



ケースの作成 Case

Wiiヌンチャクに接続したM5Atomは乾電池(3個)で駆動します。
Fusion360でケースを設計して3Dプリントしました。

The M5Atom connected to the Wii Nunchuck is powered by 3 batteries.
I designed the case with Fusion 360 and printed it.

NX15_74.jpg

NX15_62.jpeg

NX15_63.jpeg

NX15_61.jpeg

歩行制御テスト Walking control test

Wii ヌンチャクのボタンは歩行と停止およびターンかスライド歩行か切り替えるようにしました。
The Wii Nunchaku button now switches between walking and stopping and turning or sliding walking.

NX15_66.jpeg

良い感じです。It feels good.




ソースコードSource code

https://github.com/RoboTakao/NX15A.git

ソースはgithubにアップしました。The source has been uploaded to github.

M5Atom用スケッチ Sketch for M5 Atom
 For robot : nx15_rosserial_wifi_IMU.ino
 For wii controller : nx15_rosserial_wifi_wii.ino

起動 Start-up
roslaunch nx15a nx15a_simulation_rosserial_wii_imu.launch
rosrun nx15a nx15a_walk_ik_wii_imu.py




スポンサードリンク

コメント

コメントの投稿

非公開コメント

プロフィール

RoboTakao

Author:RoboTakao
みなさんご訪問ありがとうございます。ロボット作りたいけどお小遣いそんなにないし、簡単でローコストでロボットを作るための私のプロジェクトを紹介します。

ウェブサイトもありますのでそちらもよろしくお願いします。
http://robotakao.jp/

スポンサーリンク