LinkerBot O6 Pathに戻る

ソフトウェア&SDK

リンクボット O6 SDK,ROS2コントローラ,レロボット統合をインストール・構成する. パイthonで共同制御.作業スペース制限とトーク管理. ~2時間.

5件中2件 ·ソフトウェア&SDK · ~2時間

パイthon で LinkerBot SDK,ROS2 コントローラー,LeRobot 統合,および共同位置制御を設定する.遠隔操作に移る前にスクリプト付きの多関数軌道を実行する.

ステップ1: Python SDKと仮想環境

# Create a dedicated venv for the O6
python3 -m venv ~/o6-env
source ~/o6-env/bin/activate

# Install the LinkerBot SDK and data dependencies
pip install roboticscenter lerobot numpy torch torchvision

# Verify the import works
python3 -c "from roboticscenter.o6 import O6Robot; print('SDK OK')"

ステップ 2: ROS2 コントローラー設定

LinkerBot ROS2 パッケージでは,O6は標準的な T6ハードウェアインターフェースとして公開されています. これにより,ROS2対応のプランナー,MoveIt2または独自のコントローラを使用できます.

mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/roboticscenter/linkerbot_ros2.git

cd ~/ros2_ws
source /opt/ros/humble/setup.bash
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source install/setup.bash

腕を接続してコントローラを起動する

ros2 launch linkerbot_bringup o6_bringup.launch.py \
  can_interface:=can0

2つ目のターミナルでは,共同国家トピックが公開していることを確認します

source ~/ros2_ws/install/setup.bash
ros2 topic echo /joint_states --once

ステップ3:共同限界基準

Joint Min (rad) Max (rad) Max Vel (rad/s)
Joint 1 (base rotation) -3.14 +3.14 1.5
Joint 2 (shoulder) -2.09 +2.09 1.5
Joint 3 (elbow) -2.62 +2.62 1.5
Joint 4 (forearm roll) -3.14 +3.14 2.0
Joint 5 (wrist pitch) -1.57 +1.57 2.0
Joint 6 (wrist roll) -3.14 +3.14 2.0

4 ステップ: 脚本 を 書き た 軌道を 行なう

位置命令に反応する 6 つの関節を確認します. T7 を最初の実行で低く保持します.

from roboticscenter.o6 import O6Robot
import time

robot = O6Robot(can_interface="can0")
robot.connect()
robot.enable_torque()

# Move to a pre-reach position
print("Moving to pre-reach...")
robot.move_joints(
    positions=[0.0, -0.5, 1.0, 0.0, 0.5, 0.0],  # radians
    speed_fraction=0.2
)
time.sleep(3)

# Reach forward (extend joint 2 and 3)
print("Reaching forward...")
robot.move_joints(
    positions=[0.0, -1.0, 1.5, 0.0, 0.5, 0.0],
    speed_fraction=0.2
)
time.sleep(3)

# Return to home
print("Returning to home...")
robot.move_to_home(speed_fraction=0.2)
time.sleep(3)

robot.disable_torque()
robot.disconnect()
print("Trajectory complete")

** スクリプト動作中に腕の作業空間から手を離してください. T8または低で実行し,速度を増加する前に腕を予想外の動きに注意深く観察してください.

ステップ 5: レロボット SDK 統合

確認 LeRobot は提供されたロボット設定を使用して O6 と通信できます:

python3 -c "
from lerobot.common.robot_devices.robots.factory import make_robot
robot = make_robot('linker_bot_o6')
robot.connect()
obs = robot.capture_observation()
print('Observation keys:', list(obs.keys()))
robot.disconnect()
"

T9 (関節位置と速度) とT10のようなキーが表示される必要があります.カメラが設定されている場合.

ユニット2 完成する...

ROS2コントローラはエラーなく起動し, T12が公開しています.スクリプト付きの軌道は6つの関節を2つの経路点で実行し,帰国します.レロボットの T13は有効な観測ディクトを返します.あなたは関節制限表を理解し,それらの範囲の外の位置を指揮していません.

[← 経路概要に戻る]