●練習問題
下記の動作配列データを使って、後退歩行、左右旋回、左右横歩きを確認してください。
リスト10-1 back_walk.py(部分)
angle = [
[75, 95, 90,110,110, 90, 90,110,110, 90, 95, 95, 8],
[70,100, 90,100,100,100, 90,110,110, 90, 100, 90, 4]#左足前
[75, 95, 90, 90, 90,100, 90, 90, 90, 90, 95, 95, 4],
[80, 90, 90, 80, 80,100, 100, 70, 70, 90, 90,100, 8],#右体重
[85, 85, 90, 70, 70, 90, 90, 70, 70, 90, 85,105, 8],
[90, 80, 90, 70, 70, 90, 80, 80, 80, 90, 80,110, 4],#右足前
[85, 85, 90, 90, 90, 90, 80, 90, 90, 90, 85,105, 4],
[80, 90, 90,110,110, 80, 80,100,100, 90, 90,100, 8],#左体重
]
後退歩行は、前進歩行の配列を時系列で逆向きに並べ直しています。
リスト10-2 left_turn.py(部分)
angle = [
[75, 95, 90,110,110, 90, 90,110,110, 90, 95, 95, 8],
[80, 90, 90,110,110, 80, 80,100,100, 90, 90,100, 8],#左体重
[85, 85, 90, 90, 90, 90, 80, 90, 90, 90, 85,105, 4],
[90, 80, 90, 70, 70, 90, 80, 80, 80, 90, 80,110, 4],#右足前
[85, 85, 90, 70, 70, 90, 90, 70, 70, 90, 85,105, 8],
[80, 90, 90, 80, 80, 90, 90, 70, 70, 90, 90,100, 8],#中体重
[75, 95, 90, 90, 90, 90, 90, 90, 90, 90, 95, 95, 4],
[70,100, 90,100,100, 90, 90,110,110, 90, 100, 90, 4]#左足前
]
リスト10-3 right_turn.py(部分)
angle = [
[75, 95, 90,110,110, 90, 90,110,110, 90, 95, 95, 8],
[80, 90, 90,110,110, 90, 90,100,100, 90, 90,100, 8],#中体重
[85, 85, 90, 90, 90, 90, 90, 90, 90, 90, 85,105, 4],
[90, 80, 90, 70, 70, 90, 90, 80, 80, 90, 80,110, 4],#右足前
[85, 85, 90, 70, 70, 90, 90, 70, 70, 90, 85,105, 8],
[80, 90, 90, 80, 80,100, 100, 70, 70, 90, 90,100, 8],#右体重
[75, 95, 90, 90, 90,100, 90, 90, 90, 90, 95, 95, 4],
[70,100, 90,100,100,100, 90,110,110, 90, 100, 90, 4]#左足前
]
左右旋回は基本的に前進歩行と同じですが、どちらか一方(左旋回時は左脚が遊脚のと き、右旋回時は右脚が遊脚のとき)で体重移動をやめて、両脚を地面と擦るようにしています。脚の機構にヨー軸関節を持たない 2 足歩行ロボットの場合、左右旋回するためにこのような動きをさせることが多いです。
リスト10-4 left_walk.py(部分)
angle = [
[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 6],
[90, 90, 90, 90, 90,100, 100, 90, 90, 90, 90, 90, 6],
[90, 90, 80, 90, 90,100, 100, 90, 90,100, 90, 90, 6],
[90, 90, 80, 90, 90, 80, 80, 90, 90, 90, 90, 90, 6],
[90, 90, 90, 90, 90, 80, 80, 90, 90, 90, 90, 90, 6],
[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 6]
]
リスト10-5 right_walk.py(部分)
angle = [
[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 6],
[90, 90, 90, 90, 90, 80, 80, 90, 90, 90, 90, 90, 6],
[90, 90, 80, 90, 90, 80, 80, 90, 90,100, 90, 90, 6],
[90, 90, 90, 90, 90,100, 100, 90, 90,100, 90, 90, 6],
[90, 90, 90, 90, 90,100, 100, 90, 90, 90, 90, 90, 6],
[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 6]
]
横歩きは人間のやり方とほぼ同じです。片側に体重を移して遊脚を横方向にステップし た後反対側に体重移動します。
コメント