あかすくぱるふぇ

同人サークル「あかすくぱるふぇ」のブログです。

2018年01月

1560:桶狭間の戦い:織田vs今川
 今川義元が死去
1569:遠江防衛戦:徳川vs今川北条
1569:駿河防衛戦:武田vs今川北条

1560:小田原城の戦い:北条vs上杉
 景虎を人質に越相同盟
1561:川中島の戦い:武田vs上杉

1570:姉川の戦い:織田徳川vs浅井
1573:三方ヶ原の戦い:武田vs徳川
 その後、武田信玄が死去
1575:長篠の戦い:織田vs武田

1577:手取川の戦い:上杉vs織田
 その後、上杉謙信が死去
1578:御舘の乱:景勝vs景虎

1582:本能寺の変

・URDFの基本形
<robot name="">
    <link name="">
       <visual>
           <geometry></geometry>
       </visual>
       <collision>
           <geometry></geometry>
       </collision>
       <inertial>
         <mass>
         <inertia>
       </inertial>
    </link>
    <joint name="" type="">
        <axis>
        <parent link="">
        <child link="">
        <origin>
    </joint>
</robot>

robot nameはGazeboにモデルをspawnする時などに使う
linkの位置はjointで親リンクとの相対位置として指定する


・関節情報のやり取り
パラメーターサーバーはURDFモデルをrobot_descriptionという名前で読み込む
  <param name="robot_description" textfile="$(find tortoisebot)/urdf/tortoisebot.urdf>
/joint_state_publisherノードは、関節状態を/joint_statesトピックとして配信する
  <gazebo>
   <plugin name="joint_state_publisher">
    <jointName></jointName>
   </plugin>
  </gazebo>
/robot_state_publisherノードは、パラメーターサーバーからURDFモデルを読み込み、/joint_statesを購読して順運動学を実行し、/tfトピックとして配信する
  <node name="robot_state_publisher" pkg="" type=""/>
rvizは、パラメーターサーバーからURDFモデルを読み込み、/tfを購読して、ロボットを可視化する


・ロボットの動かし方
移動ロボットなら、cmd_velトピックをdifferential_drive_controllerプラグインに購読させて動かす(p.307)
アームロボットなら、follow_joint_trajectoryアクションをros_controllプラグインに受信させて動かす(p.343)
 controller_managerがJointTrajectoryトピックを購読してfollow_joint_trajectoryアクションをros_controllに投げる
移動ロボもアームロボもjoint_state_publisherでjoint_statesを配信する点は同じ

・アームロボット
ロボット(urdfで定義されるgazebo sim)はros_controlとjoint_state_publisherのプラグインを持つ。
ros_controlは最初、コントローラーが何も動いていない状態で起動する。
launchファイルから、controller_managerにjoint_trajectory_controllerを起動させる。
 joint_trajectory_controllerはJointTrajectoryメッセージをゴールとしてfollow_joint_trajectoryアクションを処理し、ロボットを制御する。
joint_state_publisherはjoint_statesを配信する。
robot_state_publisherはjoint_statesをtfに変換して配信する。

ros_control(joint_trajectory_controller)が無いと、ロボットを制御できない。follow_joint_trajectoryアクションを処理できない。
joint_state_publisherが無いとjoint_statesがわからない。
robot_state_publisherが無いとtfがわからない。

・アームロボット基本
ros_controlプラグイン
コントローラーの種類はJointTrajectoryControllerでarm_controllerと名付ける
/arm_controller/commandでtrajectory_msgs/JointTrajectoryを指定して起動生成
JointTrajectory/pointsは指定した軸の角度(rad)

↑このページのトップヘ