Package Summary

Tags No category tags.
Version 2.0.1
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/rt-net/crane_plus.git
VCS Type git
VCS Version humble-devel
Last Updated 2023-09-08
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

CRANE+ V2 examples package

Additional Links

No additional links.

Maintainers

  • RT Corporation

Authors

  • Shota Aoki
  • Atsushi Kuwagata
  • Yusuke Kato

crane_plus_examples

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

準備(実機を使う場合)

crane_plus

1. CRANE+ V2本体をPCに接続する

CRANE+ V2本体をPCに接続します。 接続方法は製品マニュアルを参照してください。

※CRANE+ V2本体が接触しないように、十分なスペースを確保してください。

2. USB通信ポートの接続を確認する

USB通信ポートの設定についてはcrane_plus_controlREADME を参照してください。

正しく設定できていない場合、CRANE+ V2が動作しない、振動する、などの不安定な動きになるので注意してください

3. move_groupとcontrollerを起動する

標準のCRANE+ V2を使用する場合

次のコマンドでmove_group (crane_plus_moveit_config)と controller (crane_plus_control)を起動します。

$ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0

Webカメラ搭載モデルを使用する場合

Webカメラ搭載モデルの場合は、次のコマンドを実行してください。

```は使用するWebカメラを指定してください。


```sh
$ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0 use_camera:=true video_device:=/dev/video0

準備(Gazeboを使う場合)

======= crane_plus_ignition

1. move_groupとGazeboを起動する

次のコマンドでmove_group (crane_plus_moveit_config)とGazeboを起動します。

$ ros2 launch crane_plus_gazebo crane_plus_with_table.launch.py

サンプルプログラムを実行する

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'

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

Gazeboでサンプルプログラムを実行する場合

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control' use_sim_time:=true

Examples

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

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

$ ros2 launch crane_plus_examples example.launch.py -s
Arguments (pass arguments as '<name>:=<value>'):

    'example':
        Set an example executable name: [gripper_control, pose_groupstate, joint_values, pick_and_place]
        (default: 'gripper_control')


gripper_control

グリッパを開閉させるコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'

back to example list


pose_groupstate

group_stateを使うコード例です。

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

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

$ ros2 launch crane_plus_examples example.launch.py example:='pose_groupstate'

back to example list


joint_values

アームのジョイント角度を1つずつ変更するコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='joint_values'

back to example list


pick_and_place

モノを掴む・持ち上げる・運ぶ・置くコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='pick_and_place'

back to example list


Camera Examples

Webカメラ搭載モデルのカメラを使用したサンプルコードです。

「Webカメラ搭載モデルを使用する場合」の手順に従って、 demo.launchを実行している状態で、 各サンプルを実行できます。

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

$ ros2 launch crane_plus_examples camera_example.launch.py -s
Arguments (pass arguments as '<name>:=<value>'):

    'example':
        Set an example executable name: [color_detection]
        (default: 'color_detection')


aruco_detection

モノに取り付けたArUcoマーカをカメラで検出し、マーカ位置に合わせて掴むコード例です。 マーカはaruco_markers.pdfをA4紙に印刷して、一辺50mmの立方体に取り付けて使用します。

検出されたマーカの位置姿勢はtfのフレームとして配信されます。 tfのframe_idはマーカIDごとに異なりID0のマーカのframe_idtarget_0になります。 掴む対象はtarget_0に設定されています。 マーカ検出にはOpenCVを使用しています。

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

ros2 launch crane_plus_examples camera_example.launch.py example:='aruco_detection'

Videos

crane_plus_aruco_detection_demo

back to example list


color_detection

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

デフォルトでは赤い物体の位置をtfのフレームとして配信します。 tfのframe_idtarget_0です。 色検出にはOpenCVを使用しています。

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

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

Videos

crane_plus_color_detection_demo

back to example list


CHANGELOG

Changelog for package crane_plus_examples

2.0.1 (2023-09-08)

  • README

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged crane_plus_examples at Robotics Stack Exchange

No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.

Package Summary

Tags No category tags.
Version 1.2.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/rt-net/crane_plus.git
VCS Type git
VCS Version foxy-devel
Last Updated 2023-08-08
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

CRANE+ V2 examples package

Additional Links

No additional links.

Maintainers

  • RT Corporation

Authors

  • Shota Aoki
  • Atsushi Kuwagata

crane_plus_examples

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

準備(実機を使う場合)

crane_plus

1. CRANE+ V2本体をPCに接続する

CRANE+ V2本体をPCに接続します。 接続方法は製品マニュアルを参照してください。

※CRANE+ V2本体が接触しないように、十分なスペースを確保してください。

2. USB通信ポートの接続を確認する

USB通信ポートの設定についてはcrane_plus_controlREADME を参照してください。

正しく設定できていない場合、CRANE+ V2が動作しない、振動する、などの不安定な動きになるので注意してください

3. move_groupとcontrollerを起動する

標準のCRANE+ V2を使用する場合

次のコマンドでmove_group (crane_plus_moveit_config)と controller (crane_plus_control)を起動します。

$ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0

Webカメラ搭載モデルを使用する場合

Webカメラ搭載モデルの場合は、次のコマンドを実行してください。

```は使用するWebカメラを指定してください。


```sh
$ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0 use_camera:=true video_device:=/dev/video0

準備(Ignition Gazeboを使う場合)

crane_plus_ignition

1. move_groupとIgnition Gazeboを起動する

次のコマンドでmove_group (crane_plus_moveit_config)と Ignition Gazeboを起動します。

$ ros2 launch crane_plus_ignition crane_plus_ignition.launch.py

サンプルプログラムを実行する

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'

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

Ignition Gazeboでサンプルプログラムを実行する場合

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control' use_sim_time:='true'

Examples

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

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

$ ros2 launch crane_plus_examples example.launch.py -s
Arguments (pass arguments as '<name>:=<value>'):

    'example':
        Set an example executable name: [gripper_control, pose_groupstate, joint_values, pick_and_place]
        (default: 'gripper_control')


gripper_control

グリッパを開閉させるコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'

back to example list


pose_groupstate

group_stateを使うコード例です。

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

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

$ ros2 launch crane_plus_examples example.launch.py example:='pose_groupstate'

back to example list


joint_values

アームのジョイント角度を1つずつ変更するコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='joint_values'

back to example list


pick_and_place

モノを掴む・持ち上げる・運ぶ・置くコード例です。

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

$ ros2 launch crane_plus_examples example.launch.py example:='pick_and_place'

back to example list


Camera Examples

Webカメラ搭載モデルのカメラを使用したサンプルコードです。

「Webカメラ搭載モデルを使用する場合」の手順に従って、 demo.launchを実行している状態で、 各サンプルを実行できます。

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

$ ros2 launch crane_plus_examples camera_example.launch.py -s
Arguments (pass arguments as '<name>:=<value>'):

    'example':
        Set an example executable name: [color_detection]
        (default: 'color_detection')

aruco_detection

モノに取り付けたArUcoマーカをカメラで検出し、マーカ位置に合わせて掴むコード例です。 マーカはaruco_markers.pdfをA4紙に印刷して、一辺50mmの立方体に取り付けて使用します。

検出されたマーカの位置姿勢はtfのフレームとして配信されます。 tfのframe_idはマーカIDごとに異なりID0のマーカのframe_idtarget_0になります。 掴む対象はtarget_0に設定されています。 マーカ検出にはOpenCVを使用しています。

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

ros2 launch crane_plus_examples camera_example.launch.py example:='aruco_detection'

Videos

back to example list

color_detection

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

デフォルトでは赤い物体の位置をtfのフレームとして配信します。 tfのframe_idtarget_0です。 色検出にはOpenCVを使用しています。

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

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

Videos

back to example list


CHANGELOG

Changelog for package crane_plus_examples

1.1.0 (2022-08-16)

  • Update author tags (#49)
  • Rename CRANE+V2 to CRANE+ V2 (#44)
  • Contributors: Shota Aoki

1.0.0 (2022-06-22)

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged crane_plus_examples at Robotics Stack Exchange

No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.