Skip to content

Latest commit

 

History

History
182 lines (117 loc) · 4.8 KB

File metadata and controls

182 lines (117 loc) · 4.8 KB

sciurus17_examples_py

このパッケージはSciurus17 ROS 2パッケージのPythonサンプルコード集です。

Table of Contents

Setup

Sciurus17の起動方法はsciurus17_examplesのREADMEを参照してください。

How to Run Examples

準備ができたらサンプルプログラムを実行します。 例えばグリッパを開閉するサンプルは次のコマンドで実行できます。

ros2 launch sciurus17_examples_py example.launch.py example:='gripper_control'

終了するときはCtrl+cを入力します。

Note

Gazeboでサンプルプログラムを実行する場合はuse_sim_timeオプションを付けます。

ros2 launch sciurus17_examples_py example.launch.py example:='gripper_control' use_sim_time:='true'

Examples

demo.launchを実行している状態で各サンプルを実行できます。

Note

実行できるサンプルの一覧は、example.launch.pyにオプション-sを付けて実行することで表示できます。

ros2 launch sciurus17_examples_py example.launch.py -s

gripper_control

ハンドを開閉させるコード例です。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='gripper_control'

Back to example list


pose_groupstate

group_stateを使うコード例です。

SRDFファイルsciurus17_moveit_config/config/sciurus17.srdfに記載されているtwo_arm_init_posetwo_arm_push_forward_poseの姿勢に移行します。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='pose_groupstate'

Back to example list


joint_values

左側のアームのジョイント角度を1つずつ変化させるコード例です。

SRDFファイルsciurus17_moveit_config/config/sciurus17.srdfに記載されているl_arm_init_poseから、各関節角度を15度ずつ順番に変化させます。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='joint_values'

Back to example list


neck_control

首を上下左右へ動かすコード例です。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='neck_control'

Back to example list


waist_control

腰を左右へひねる動作をするコード例です。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='waist_control'

Back to example list


pick_and_place_right_arm_waist

右手でターゲットを掴んで動かすコード例です。腰の回転も使用します。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='pick_and_place_right_arm_waist'

Back to example list


pick_and_place_left_arm

左手でターゲットを掴んで動かすコード例です。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py example.launch.py example:='pick_and_place_left_arm'

Back to example list


color_detection

特定の色の物体を検出して掴むコード例です。

  • デフォルトでは青い物体の位置をtfのフレームとして配信します。
  • 検出した物体のフレーム名は target_0 です。
  • 色の検出にはOpenCVを使用しています。
  • 検出した物体の距離は深度画像から取得します。

次のコマンドを実行します。

ros2 launch sciurus17_examples_py camera_example.launch.py example:='color_detection'

Back to example list