0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

マニピュレーター付きロボットをシミュレーション環境(Gazebo)に読み込んで動かしてみた

Posted at

1. はじめに

今まで「走行」ロボットのシミュレーションを中心にしてきましたが物足りなくなってきましたので、マニピュレーター付きロボットのシミュレーションに挑戦してみました。この記事では、そのシミュレーション環境の構築と操作方法について紹介していきたいと思います。

2. 実行環境

  • CPU: CORE i7 7th Gen
  • メモリ: 32GB
  • GPU: GeForce RTX 2070
  • OS: Ubuntu22.04(WSL2ではなくPCに直接インストール)
  • ROS2: Humble
  • Nvidia Driver: 535

3. 対象としたロボット

Kimらの論文[1]で紹介されていたNeobotix MMO-500は、BIMデータと連携した屋内塗装シミュレーションに用いられており、マニピュレーター付きのロボット(Neobotix MMO-500)が自律走行しつつ塗装を行うという作業をしています。そしてNeobotix MMO-500というロボットについては以下のリンクでサンプルのシミュレーション環境が公開されています。

しかしながら、前述のリポジトリはROS向けであり、私の環境はROS2のため適用できません。そのためNeobotix社が別リポジトリとして公開しているROS2対応かつマニピュレーター付きのロボットがある以下のブランチをクローンして用いることにしました。なお、このブランチではMMO-500ではなくMPO-700というロボットにマニピュレーターが搭載されています。

4. 構築手順

4.1 リポジトリのクローン

terminal
mkdir -p ~/ros2_mmo500/src
cd ~/ros2_mmo500/src
git clone --branch mobile-manipulators https://github.com/neobotix/neo_simulation2.git

注:ファイル名はros2_mmo500としていますが、ここは適当で大丈夫です。

4.2 依存関係のインストールとビルド

terminal
sudo apt install ros-humble-ros2-control ros-humble-ros2-controllers ros-humble-joint-state-publisher-gui
terminal
cd ~/ros2_mmo500
rosdep update
rosdep install --from-paths src --ignore-src -r -y

その他、私の環境では以下のパッケージの追加インストールが必要でした

terminal
sudo apt install xterm
sudo apt install ros-humble-gazebo-ros2-control

そして以下のコマンドでビルドします。

terminal
cd ~/ros2_mmo500
colcon build

5. シミュレーション結果

ビルド完了後、以下のコマンドでシミュレーション環境(Gazebo)を起動しました。

terminal(1)
source ~/ros2_mmo500/install/setup.bash
ros2 launch neo_simulation2 simulation.launch.py

そして以下のコマンドでマニピュレーターを動かしました。

terminal(2)
source ~/ros2_mmo500/install/setup.bash
ros2 topic pub /arm_controller/joint_trajectory trajectory_msgs/JointTrajectory '
{
  "joint_names": ["ur10shoulder_pan_joint", "ur10shoulder_lift_joint", "ur10elbow_joint", "ur10wrist_1_joint", "ur10wrist_2_joint", "ur10wrist_3_joint"],
  "points": [
    {
      "positions": [0.0, -0.5, 1.0, 0.0, 0.0, 0.0],
      "velocities": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      "time_from_start": { "sec": 3, "nanosec": 0 }
    }
  ]
}'

ros2 topic pub /arm_controller/joint_trajectory trajectory_msgs/JointTrajectory '
{
  "joint_names": ["ur10shoulder_pan_joint", "ur10shoulder_lift_joint", "ur10elbow_joint", "ur10wrist_1_joint", "ur10wrist_2_joint", "ur10wrist_3_joint"],
  "points": [
    {
      "positions": [0.0, 0.5, 0.0, 0.0, 0.0, 0.0],
      "velocities": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      "time_from_start": { "sec": 3, "nanosec": 0 }
    }
  ]
}'

以下が上記のコマンドで、マニピュレーターを動かすシミュレーションを行った時の動画です。
なお、ロボットはxterm(teleop_twist_keyboardと表示のあるウィンドウ)から指示を出して、少し前進させてもいます。

6. まとめ

Neobotix社が公開しているリポジトリを利用し、Gazebo上でマニピュレーター付きロボットのシミュレーションを試行することができました。しかし、現時点で以下の課題があります:

  • マニピュレーター付きロボットが意図せずわずかに移動する
  • マニピュレーター付きロボットの自律走行は実現できていない
  • マニピュレーターの動作制御が不十分

次回以降は、これらの問題に取り組んでいく予定です。

参考記事やサイト

[1]Development of BIM-integrated construction robot task planning and simulation system

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?