Skip to content

TeamSOBITS/sobits_teleop

Repository files navigation

JA | EN

Contributors Forks Stargazers Issues License

SOBITS TELEOP

目次
  1. 概要
  2. 環境構築
  3.  実行・操作方法
  4. マイルストーン

概要

SOBITSのロボットをjoystick(PS4, PS5), Meta Quest, Keyboardで遠隔操作するためのパッケージ.
Meta Questのセットアップに関してはこちらをクリック.

(上に戻る)

環境構築

ここで,本レポジトリのセットアップ方法について説明します.

(上に戻る)

環境条件

まず,以下の環境を整えてから,次のインストール段階に進んでください.

System Version
Ubuntu 24.04 (Noble Numbat)
ROS Jazzy Jalisco
Python 3.12~

(上に戻る)

インストール方法

  1. ROSのsrcフォルダに移動します.

    $ cd ~/colcon_ws/src/
  2. 本レポジトリをcloneします.

    $ git clone https://github.com/TeamSOBITS/sobits_teleop
  3. レポジトリの中へ移動します.

    $ cd sobits_teleop/
  4. 依存パッケージをインストールします.

    $ bash install.sh
  5. パッケージをコンパイルします.

    $ cd ~/colcon_ws/
    $ colcon build --symlink-install
    $ source ~/colcon_ws/install/setup.sh

(上に戻る)

実行・操作方法

sobits_teleopを使う上での基本的な流れ

  1. configファイル作成
    • ロボットと,デバイスに対応するconfigファイルを作成する.
  2. テレオペノード実行
    • デバイスがPCと接続されていることを確認し、テレオペノードを実行する.

(上に戻る)

configファイル作成

ロボットとテレオペで使用するデバイス(ps4, Meta Questなど)を選定する.

sobits_teleop/config/{使用するロボット}/{使用するロボット}.yamlにロボットの設定、sobits_teleop/config/{使用するロボット}/{使用するデバイス}.yamlにコントローラの設定をする.

robot.yaml(例)
/**:
  ros__parameters:
  
    robot_topic_name:
      joint_states_topic : joint_states # joint_statesのトピック名を指定
      joint_trajectory_topic: # 各ポジションのjoint_trajecotyのトピック名を指定
        head : head_position_controller/joint_trajectory
        body : body_position_controller/joint_trajectory
        arm_left : arm_left_position_controller/joint_trajectory
        arm_right : arm_right_position_controller/joint_trajectory
      cmd_vel_topic : cmd_vel # command_velocityのトピック名を指定
{使用するデバイス}.yaml(例)
/**:
  ros__parameters:

    control_joints: # 操作するjoint_trajectory_controllerを定義する
      groups:
      - head
      - body
      - arm_left
      - arm_right
      head:
        names: # joint_trajectory_controllerのjointを定義する
        - head_tilt_joint
        - head_pan_joint
        head_tilt_joint:
          button : 2           # トリガーの定義
          fast_button : 6      # トリガーを押している間、動きを早める
          axis : 1             # ジョイスティックの傾きで動かす
          axis_sign : 1        # ジョイスティックの正負を変更
          speed : 0.1          # トリガー押下時のスピード
          fast_speed : 0.5     # fast_button押下時のスピード
      ...

    control_poses: # 定義済のポーズにロボットを動かす
      trigger : 8        # トリガーの定義
      pose_list:         # 定義済のポーズリストを定義
        - initial_pose
        - ninja_pose
        - detecting_high_pose
        - pre_manipulation_pose
      initial_pose:
        button : 2            # トリガー押下状態で押されたとき、initial_poseにする
      ...

    control_velocity: # 車輪を動かす
      button : 5               # トリガーの定義
      fast_button : 7          # トリガーを押している間、動きを早める
      linear_x_axis : 1        # ジョイスティックの傾きにより前進後退する
      linear_y_axis : 0        # ジョイスティックの傾きにより左右移動する
      angular_axis : 3         # ジョイスティックの傾きにより旋回する
      axis_sign : 1            # 旋回時のジョイスティックの正負を変更
      linear_scale : 0.1       # linearのスピード
      angular_scale : 0.3      # angularのスピード
      fast_linear_scale : 0.2  # fast_button押下時のlinearスピード
      fast_angular_scale : 0.6 # fast_button押下時のangularスピード

(上に戻る)

テレオペノード実行

使用するデバイスとPCをBluetooth経由などで接続し、sobits_teleop.launch.pydeviceを使用するデバイスに合わせて書き換えて、実行する.

declare_device_cmd = DeclareLaunchArgument(
        'device',
        default_value='ps4', 
        # default_value='ps5',
        # default_value='quest',
        # default_value='keyboard',
        description='Input device type: ps4, quest, keyboard'
    )
DUALSHOCKの場合
  1. DUALSHOCKをBluetoothでPCと接続し、jstest-gtkコマンドでデバイスと接続していることを確認する.

[!Note] ds4drvをDocker container内で使用する場合、/dev/input//run/udevをマウントする.

  1. その後、sobits_teleop.launch.pyを起動し、yamlファイルで設定した操作方法を参考にロボットを操作する.
Meta Questの場合
  1. 使用するMeta QuestとPCが同一WIFIに接続しているか確認する.

  2. PC側でhostname -Iコマンドなどを使用してROS_IPを確認する.

  3. Meta Questを起動し、事前にセットアップしたUnity Projectを起動する. (Meta Questのセットアップに関してはこちらを参考)

  4. Unity Projectを起動したら、画面上にあるROS_IPを確認し、左側コントローラのメニューボタンを押してROS_IPを入力し、変更する.

  5. その後、sobits_teleop.launch.pyを起動し、yamlファイルで設定した操作方法を参考にロボットを操作する.

(上に戻る)

マイルストーン

  • 疑似逆運動学の追加
  • Meta Questでの逆運動学の追加

現時点のバッグや新規機能の依頼を確認するためにIssueページ をご覧ください.

(上に戻る)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors