Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Jan 29, 2025
1 parent a131875 commit 25d355b
Showing 1 changed file with 12 additions and 73 deletions.
85 changes: 12 additions & 73 deletions crane_x7_examples_py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,21 @@

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

- [crane\_x7\_examples_py](#crane_x7_examples_py)
- [準備(実機を使う場合)](#準備実機を使う場合)
- [1. CRANE-X7本体をPCに接続する](#1-crane-x7本体をpcに接続する)
- [2. USB通信ポートの接続を確認する](#2-usb通信ポートの接続を確認する)
- [3. move\_groupとcontrollerを起動する](#3-move_groupとcontrollerを起動する)
- [標準のCRANE-X7を使用する場合](#標準のcrane-x7を使用する場合)
- [RealSense D435マウンタ搭載モデルを使用する場合](#realsense-d435マウンタ搭載モデルを使用する場合)
- [準備 (Gazeboを使う場合)](#準備-gazeboを使う場合)
- [1. move\_groupとGazeboを起動する](#1-move_groupとgazeboを起動する)
- [crane\_x7\_examples\_py](#crane_x7_examples_py)
- [起動方法](#起動方法)
- [サンプルプログラムを実行する](#サンプルプログラムを実行する)
- [Gazeboでサンプルプログラムを実行する場合](#gazeboでサンプルプログラムを実行する場合)
- [Examples](#examples)
- [gripper\_control](#gripper_control)
- [Videos](#videos)
- [pose\_groupstate](#pose_groupstate)
- [Videos](#videos-1)
- [joint\_values](#joint_values)
- [Videos](#videos-2)
- [pick\_and\_place](#pick_and_place)
- [Videos](#videos-4)
- [Camera Examples](#camera-examples)
- [aruco\_detection](#aruco_detection)
- [Videos](#videos-5)
- [color\_detection](#color_detection)
- [Videos](#videos-6)
- [point\_cloud\_detection](#point_cloud_detection)
- [Videos](#videos-7)

## 準備(実機を使う場合)

![crane_x7](https://rt-net.github.io/images/crane-x7/CRANE-X7-500x500.png)

### 1. CRANE-X7本体をPCに接続する
CRANE-X7本体をPCに接続します。
接続方法は製品マニュアルを参照してください。

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

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

USB通信ポートの設定については`crane_x7_control`
[README](../crane_x7_control/README.md)
を参照してください。

**正しく設定できていない場合、CRANE-X7が動作しないので注意してください**

### 3. move_groupとcontrollerを起動する

#### 標準のCRANE-X7を使用する場合
次のコマンドでmove_group (`crane_x7_moveit_config`)と
controller (`crane_x7_control`)を起動します。

```sh
ros2 launch crane_x7_examples demo.launch.py port_name:=/dev/ttyUSB0
```

#### RealSense D435マウンタ搭載モデルを使用する場合
[RealSense D435マウンタ](https://github.com/rt-net/crane_x7_Hardware/blob/master/3d_print_parts/v1.0/CRANE-X7_HandA_RealSenseD435マウンタ.stl)を搭載している場合は次のコマンドを実行します。RealSense D435が起動し、camera_linkがロボットモデルに追加されます。

```sh
ros2 launch crane_x7_examples demo.launch.py port_name:=/dev/ttyUSB0 use_d435:=true
```

## 準備 (Gazeboを使う場合)

![crane_x7_gazebo](https://rt-net.github.io/images/crane-x7/crane_x7_gazebo_ros2.png)

### 1. move_groupとGazeboを起動する

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

```sh
ros2 launch crane_x7_gazebo crane_x7_with_table.launch.py
```
## 起動方法
CRANE-X7の起動方法は[crane_x7_examplesのREADME](../crane_x7_examples/README.md)を参照してください。

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

Expand Down Expand Up @@ -131,7 +71,7 @@ ros2 launch crane_x7_examples_py example.launch.py example:='gripper_control'

<img src=https://rt-net.github.io/images/crane-x7/gazebo_gripper_example.gif width=500px />

#### Videos
**videos**
[![crane_x7_gripper_control_demo](http://img.youtube.com/vi/uLRLkwbXUP0/hqdefault.jpg)](https://youtu.be/uLRLkwbXUP0)

[back to example list](#examples)
Expand All @@ -153,7 +93,7 @@ ros2 launch crane_x7_examples_py example.launch.py example:='pose_groupstate'

<img src=https://rt-net.github.io/images/crane-x7/gazebo_pose_groupstate.gif width=500px />

#### Videos
**videos**
[![crane_x7_pose_groupstate_demo](http://img.youtube.com/vi/FH18dA_xcjM/hqdefault.jpg)](https://youtu.be/FH18dA_xcjM)

[back to example list](#examples)
Expand All @@ -171,7 +111,7 @@ ros2 launch crane_x7_examples_py example.launch.py example:='joint_values'
```
<img src= https://rt-net.github.io/images/crane-x7/gazebo_joint_values_example.gif width = 500px />

#### Videos
**videos**
[![crane_x7_joint_values_demo](http://img.youtube.com/vi/skRwrrlUl4c/hqdefault.jpg)](https://youtu.be/skRwrrlUl4c)

[back to example list](#examples)
Expand All @@ -197,7 +137,7 @@ CRANE-X7から20cm離れた位置にピッキング対象を設置します。

サンプルで使用しているこのオレンジ色のソフトボールはRT ROBOT SHOPの[こちらのページ](https://www.rt-shop.jp/index.php?main_page=product_info&cPath=1299_1307&products_id=3701)から入手することができます。

#### Videos
**videos**

[![crane_x7_pick_and_place_demo](http://img.youtube.com/vi/S_MwSvG2tKw/hqdefault.jpg)](https://youtu.be/S_MwSvG2tKw)

Expand All @@ -207,20 +147,19 @@ CRANE-X7から20cm離れた位置にピッキング対象を設置します。

[RealSense D435マウンタ](https://github.com/rt-net/crane_x7_Hardware/blob/master/3d_print_parts/v1.0/CRANE-X7_HandA_RealSenseD435マウンタ.stl)搭載モデルのカメラを使用したサンプルコードです。

[「RealSense D435マウンタ搭載モデルを使用する場合」](#realsense-d435マウンタ搭載モデルを使用する場合)の手順に従って`demo.launch`を実行している状態で各サンプルを実行できます。
[crane_x7_examplesのREADME](../crane_x7_examples/README.md)に記載されている「RealSense D435マウンタ搭載モデルを使用する場合」の手順に従って`demo.launch`を実行している状態で各サンプルを実行できます。

- [aruco\_detection](#aruco_detection)
- [color\_detection](#color_detection)


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

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

'example':
Set an example executable name: [aruco_detection, point_cloud_detection]
Set an example executable name: [aruco_detection, color_detection]
(default: 'aruco_detection')
```

Expand All @@ -237,7 +176,7 @@ tfの`frame_id`はマーカIDごとに異なりID0のマーカの`frame_id`は`t
ros2 launch crane_x7_examples_py camera_example.launch.py example:='aruco_detection'
```

#### Videos
**videos**
[![crane_x7_aruco_detection_demo](http://img.youtube.com/vi/eWzmG_jbTmM/hqdefault.jpg)](https://youtu.be/eWzmG_jbTmM)

[back to camera example list](#camera-examples)
Expand All @@ -258,7 +197,7 @@ tfの`frame_id`は`target_0`です。
ros2 launch crane_x7_examples_py camera_example.launch.py example:='color_detection'
```

#### Videos
**videos**
[![crane_x7_color_detection_demo](http://img.youtube.com/vi/O8lqw7yemAI/hqdefault.jpg)](https://youtu.be/O8lqw7yemAI)

[back to camera example list](#camera-examples)
Expand Down

0 comments on commit 25d355b

Please sign in to comment.