소프트웨어 & SDK
LinkerBot O6 SDK, ROS2 컨트롤러, LeRobot 통합을 설치하고 구성합니다. 파이썬에서 공동 제어. 작업 공간 제한 및 토크 관리. ~ 2 시간.
5중 2부 · 소프트웨어 & SDK · ~ 2시간
리커봇 SDK, ROS2 컨트롤러, 레로봇 통합 및 파이썬에서 공동 위치 제어를 설치합니다. 텔레오퍼레이션으로 이동하기 전에 스크립트 된 멀티-관절 궤도를 실행하십시오.
단계 1: 파이썬 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를 표준
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
두 번째 터미널에서, 공동 국가 주제가 발표하고 있는 것을 확인합니다.
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개의 관이 위치 명령에 응답하는 것을 확인합니다. 첫 번째 실행에
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")
**
단계 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()
"
카메라가 구성되어 있는 경우
2부대 완료...
ROS2 컨트롤러는 오류 없이 시작되고
[← 경로 개요로 돌아가]







