Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tagにはROSのディストリビューションを指定してください。
Jazzyディストリビューションのイメージをダウンロードする場合は次のコマンドを実行します。

```sh
$ docker pull ghcr.io/rt-net/crane_plus:jazzy
docker pull ghcr.io/rt-net/crane_plus:jazzy
```

### ノードの起動
Expand All @@ -29,9 +29,9 @@ rockerのオプションには、

```sh
# rockerのインストール
$ sudo apt install python3-rocker
sudo apt install python3-rocker

$ rocker --x11 --net=host --privileged \
rocker --x11 --net=host --privileged \
--volume /dev/shm:/dev/shm \
-- ghcr.io/rt-net/crane_plus:$ROS_DISTRO \
ros2 launch crane_plus_examples demo.launch.py
Expand All @@ -44,18 +44,18 @@ $ rocker --x11 --net=host --privileged \

```sh
# ワークスペース作成
$ mkdir -p ~/crane_ws/src
mkdir -p ~/crane_ws/src
# パッケージをクローン
$ git clone https://github.com/rt-net/crane_plus.git ~/crane_ws/src/crane_plus
git clone https://github.com/rt-net/crane_plus.git ~/crane_ws/src/crane_plus

# パッケージをビルド
$ rocker --x11 --net=host --privileged \
rocker --x11 --net=host --privileged \
--volume ~/crane_ws:/root/overlay_ws \
-- ghcr.io/rt-net/crane_plus:$ROS_DISTRO \
colcon build --symlink-install

# ノードを起動
$ rocker --x11 --net=host --privileged \
rocker --x11 --net=host --privileged \
--volume /dev/shm:/dev/shm \
--volume ~/crane_ws:/root/overlay_ws \
-- ghcr.io/rt-net/crane_plus:$ROS_DISTRO \
Expand All @@ -68,8 +68,8 @@ $ rocker --x11 --net=host --privileged \

```sh
# jazzyディストリビューションのイメージを作成する
$ cd crane_plus/.docker
$ ./build_source.sh jazzy
cd crane_plus/.docker
./build_source.sh jazzy
...
Successfully tagged crane_plus:jazzy
```
84 changes: 51 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@ ROS 2 package suite of CRANE+ V2.

## Table of Contents

- [Supported ROS 2 distributions](#supported-ROS-2-distributions)
- [Requirements](#requirements)
- [Installation](#installation)
- [Binary installation](#binary-installation)
- [Source Build](#source-build)
- [Quick Start](#quick-start)
- [Packages](#packages)
- [License](#license)
- [Disclaimer](#disclaimer)
- [crane\_plus](#crane_plus)
- [Supported ROS 2 distributions](#supported-ROS-2-distributions)
- [Requirements](#requirements)
- [Installation](#installation)
- [Docker images](#docker-images)
- [Binary installation](#binary-installation)
- [Source Build](#source-build)
- [Quick Start](#quick-start)
- [Packages](#packages)
- [How to Use Examples](#how-to-use-examples)
- [License](#license)
- [Contributing](#contributing)
- [Disclaimer](#disclaimer)

## Supported ROS 2 distributions

- [Foxy](https://github.com/rt-net/crane_plus/tree/foxy-devel)
- [Humble](https://github.com/rt-net/crane_plus/tree/humble-devel)
- Jazzy
- [Humble Hawksbill](https://github.com/rt-net/crane_plus/tree/humble)
- [Jazzy Jalisco](https://github.com/rt-net/crane_plus/tree/jazzy)

## Requirements

- CRANE+ V2
- [Product Introduction](https://rt-net.jp/products/cranev2/)
- [Web Shop](https://www.rt-shop.jp/index.php?main_page=product_info&cPath=1348_1&products_id=3626&language=ja)
- Linux OS
- Ubuntu 24.04
- ROS
- ROS 2
- [Jazzy Jalisco](https://docs.ros.org/en/jazzy/Installation.html)

## Installation
Expand All @@ -43,46 +47,43 @@ ROS 2 package suite of CRANE+ V2.
### Binary installation

```sh
$ sudo apt update
$ sudo apt install ros-$ROS_DISTRO-crane-plus
sudo apt update
sudo apt install ros-$ROS_DISTRO-crane-plus
```

### Source Build

```sh
# Download crane_plus repository
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ git clone -b $ROS_DISTRO https://github.com/rt-net/crane_plus.git
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone -b $ROS_DISTRO https://github.com/rt-net/crane_plus.git

# Install dependencies
$ rosdep install -r -y -i --from-paths .
rosdep install -r -y -i --from-paths .

# Build & Install
$ cd ~/ros2_ws
$ colcon build --symlink-install
$ source ~/ros2_ws/install/setup.bash
cd ~/ros2_ws
colcon build --symlink-install
source ~/ros2_ws/install/setup.bash
```

## Quick Start

```sh
# Connect CRANE+ V2 to PC, then
$ source ~/ros2_ws/install/setup.bash
$ ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0
source ~/ros2_ws/install/setup.bash
ros2 launch crane_plus_examples demo.launch.py port_name:=/dev/ttyUSB0

# Terminal 2
$ source ~/ros2_ws/install/setup.bash
$ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'
source ~/ros2_ws/install/setup.bash
ros2 launch crane_plus_examples example.launch.py example:='gripper_control'

# Press [Ctrl-c] to terminate.
```

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

詳細は[crane_plus_examples](./crane_plus_examples/README.md)
を参照してください。

## Packages

- crane_plus_control
Expand All @@ -102,19 +103,36 @@ $ ros2 launch crane_plus_examples example.launch.py example:='gripper_control'
- [README](./crane_plus_moveit_config/README.md)
- CRANE+ V2の`moveit2`設定ファイルです

## How to Use Examples

サンプルプログラムは、`crane_plus_examples`パッケージの[README](./crane_plus_description/README.md)参照してください。

- crane_plus_examples
- gripper_control
- pose_groupstate
- joint_values
- pick_and_place
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRANE+ V2にはカメラサンプルもあるので追加するとよいかと思います。ただ、そもそもですが、サンプルの一覧の案内はcrane_plus_examplesのREADMEにもあるので、ここではサンプルの一覧はなくても良いかもしれません。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

該当箇所のサンプルの列挙を削除しました。


## License

このリポジトリはApache 2.0ライセンスの元、公開されています。
ライセンスについては[LICENSE](./LICENSE)を参照ください。
各ファイルにライセンスが明記されている場合、そのライセンスに従います。
特に明記がない場合は、Apache License, Version 2.0に基づいて公開されています。
ライセンスの全文は[LICENSE](./LICENSE)または[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)から確認できます。

サーボモータのAX-12Aに関するCADモデルの使用については、ROBOTIS社より使用許諾を受けています。
CRANE+ V2に使用されているROBOTIS社の部品類にかかる著作権、商標権、その他の知的財産権は、ROBOTIS社に帰属します。

We have obtained permission from ROBOTIS Co., Ltd. to use CAD models relating to servo motors AX-12A. The proprietary rights relating to any components or parts manufactured by ROBOTIS and used in this product, including but not limited to copyrights, trademarks, and other intellectual property rights, shall remain vested in ROBOTIS.

## Disclaimer
## Contributing

本ソフトウェアはApache 2.0ライセンスで、「AS IS」(現状有姿のまま)で提供しています。本ソフトウェアに関する無償サポートはありません。
- 本ソフトウェアはオープンソースですが、開発はオープンではありません。
- 本ソフトウェアは基本的にオープンソースソフトウェアとして「AS IS」(現状有姿のまま)で提供しています。
- 本ソフトウェアに関する無償サポートはありません。
- バグの修正や誤字脱字の修正に関するリクエストは常に受け付けていますが、それ以外の機能追加等のリクエストについては社内のガイドラインを優先します。
詳しくは[コントリビューションガイドライン](./CONTRIBUTING.md)に従ってください。

## Disclaimer

当該製品および当ソフトウェアの使用中に生じたいかなる損害も株式会社アールティでは一切の責任を負いかねます。 ユーザー自身で作成されたプログラムに適切な制限動作が備わっていない場合、本体の損傷や、本体が周囲や作業者に接触、あるいは衝突し、思わぬ重大事故が発生する危険があります。 ユーザーの責任において十分に安全に注意した上でご使用下さい。

74 changes: 44 additions & 30 deletions crane_plus_control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,25 @@
このパッケージは[ros2_control](https://github.com/ros-controls/ros2_control)
をベースにした、CRANE+ V2 のコントローラパッケージです。

## ros2_control関連ファイル
## Table of Contents

- [crane\_plus\_control](#crane_plus_control)
- [ros2\_control Files](#ros2_control-files)
- [Setup](#setup)
- [USB Port Configuration](#usb-port-configuration)
- [latency_timer Setting](#latency_timer-setting)
- [Return Delay Time Setting](#return-delay-time-setting)
- [How to Launch Nodes](#how-to-launch-nodes)
- [Controller Manager Parameters](#controller-manager-parameters)
- [Control Cycle](#control-cycle)
- [Controllers](#controllers)
- [crane\_x7\_hardware Parameters](#crane_x7_hardware-parameters)
- [USB Port](#usb-port)
- [Baudrate](#baudrate)
- [Communication Timeout](#communication-timeout)
- [Serveo](#servo)

## ros2_control Files

- `crane_plus_control::CranePlusHardware (crane_plus_hardware)`
- 本パッケージがエクスポートする[Hardware Components](https://ros-controls.github.io/control.ros.org/getting_started.html#hardware-components)です
Expand All @@ -14,25 +32,26 @@
- [config/crane_plus_controllers.yaml](./config/crane_plus_controllers.yaml)
- Controller Managerのパラメータファイルです

## 実機のセットアップ
## Setup

`crane_plus_hardware`がCRANE+ V2実機と通信するために、
PCとCRANE+ V2の設定が必要です。

**正しく設定できていない場合、CRANE+ V2が動作しない、振動する、などの不安定な動きをするため注意してください**
> [!NOTE]
> 正しく設定できていない場合、CRANE+ V2が動作しない、振動する、などの不安定な動きをするため注意してください。

### USB通信ポートの設定
### USB Port Configuration

`crane_plus_hardware`はUSB通信ポート(`/dev/ttyUSB*`)を経由してCRANE+ V2と通信します。

次のコマンドでアクセス権限を変更します。

```sh
# /dev/ttyUSB0を使用する場合
$ sudo chmod 666 /dev/ttyUSB0
sudo chmod 666 /dev/ttyUSB0
```

### latency_timerの設定
### latency_timer Setting

CRANE+ V2を100 Hz周期で制御するためには、
USB通信ポートとサーボモータの設定を変更します。
Expand All @@ -43,9 +62,8 @@ USB通信ポートとサーボモータの設定を変更します。

```sh
# /dev/ttyUSB0を使用する場合

# rootに切り替える
$ sudo su
## rootに切り替える
sudo su
```

```txt
Expand All @@ -55,7 +73,7 @@ $ sudo su
# exit
```

### Return Delay Timeの設定
### Return Delay Time Setting

CRANE+ V2に搭載されているサーボモータ[Dynamixel AX-12A](https://emanual.robotis.com/docs/en/dxl/ax/ax-12a/)
には`Return Delay Time`というパラメータがあります。
Expand All @@ -68,7 +86,7 @@ CRANE+ V2に搭載されているサーボモータ[Dynamixel AX-12A](https://em

![Setting Return Delay Time](https://rt-net.github.io/images/crane-plus/setting_return_delay_time.png)

## ノードの起動
## How to Launch Nodes

`crane_plus_control.launch.py`を実行すると、`Controller Manager`ノードが起動し、
以下のコントローラが読み込まれます。
Expand All @@ -81,10 +99,10 @@ CRANE+ V2に搭載されているサーボモータ[Dynamixel AX-12A](https://em
次のコマンドでジョイント角度情報(`joint_states`)を表示できます

```sh
$ ros2 topic echo /joint_states
ros2 topic echo /joint_states
```

## Controller Managerのパラメータ
## Controller Manager Parameters

`Controller Manager`のパラメータは
[config/crane_plus_controllers.yaml](./config/crane_plus_controllers.yaml)
Expand All @@ -103,22 +121,20 @@ controller_manager:
type: joint_state_broadcaster/JointStateBroadcaster
```

### 制御周期
### Control Cycle

`update_rate`は制御周期を設定します。

CRANE+ V2に使用しているサーボモータの仕様により、
100 Hz以上の周期で制御できません。
CRANE+ V2に使用しているサーボモータの仕様により、100 Hz以上の周期で制御できません。

### コントローラ
### Controllers

CRANE+ V2の腕の制御用に`crane_plus_arm_controller`を、
グリッパの制御用に`crane_plus_gripper_controller`を設定しています。

## crane_plus_hardwareのパラメータ
## crane_plus_hardware Parameters

`crane_plus_hardware`のパラメータは
[crane_plus_description/urdf/crane_plus.urdf.xacro](../crane_plus_description/urdf/crane_plus.urdf.xacro)
`crane_plus_hardware`のパラメータは、[crane_plus_description/urdf/crane_plus.urdf.xacro](../crane_plus_description/urdf/crane_plus.urdf.xacro)
で設定しています。

```xml
Expand All @@ -132,28 +148,26 @@ CRANE+ V2の腕の制御用に`crane_plus_arm_controller`を、
<xacro:arg name="read_temperatures" default="0" />
```

### USB通信ポート
### USB Port

`port_name`はCRANE+ V2との通信に使用するUSB通信ポートを設定します。

### ボーレート
### Baudrate

`baudrate`はCRANE+ V2に搭載したDynamixelとの通信ボーレートを設定します。

デフォルト値にはDynamixel AX-12Aの最高ボーレートである`1000000` (1 Mbps)を設定しています。

### 通信タイムアウト
### Communication Timeout

`timeout_seconds`は通信タイムアウト時間(秒)を設定します。

`crane_plus_hardware`は、一定時間(デフォルト5秒間)通信に失敗し続けると、
read/write動作を停止します。
`crane_plus_hardware`は、一定時間(デフォルト5秒間)通信に失敗し続けると、read/write動作を停止します。
USBケーブルや電源ケーブルが抜けた場合等に有効です。

### サーボパラメータ
### Servo

`read_velocities`、`read_loads`、`read_voltages`、`read_temperatures`
は、サーボの回転速度、電圧、負荷、温度を読み取るためのパラメータです。
`read_velocities`、`read_loads`、`read_voltages`、`read_temperatures`は、サーボの回転速度、電圧、負荷、温度を読み取るためのパラメータです。

`1`をセットすると、サーボパラメータを読み取ります。

Expand All @@ -162,9 +176,9 @@ USBケーブルや電源ケーブルが抜けた場合等に有効です。
読み取ったパラメータは`dynamic_joint_states`トピックとしてパブリッシュされます。

```sh
$ ros2 topic echo /dynamic_joint_states
ros2 topic echo /dynamic_joint_states
```

---

[back to top](#crane_plus_control)
[Back to top](#crane_plus_control)
Loading