소프트웨어 설정
SDK 설치, ROS2 전신 제어 인터페이스, 관절 상태 읽기 및 명령, 운동 API 기본, MuJoCo 휴머노이드 시뮬레이션 및 3가지 문제 해결 문제입니다.
섹션으로 이동:
부스터 SDK 설치
Booster SDK는 다음과 같이 배포됩니다. booster_robotics_sdk_python PyPI에서. K1의 네트워크 제어 인터페이스에 Python 바인딩을 제공합니다.
가상 환경 만들기(권장)
python3 -m venv ~/.venvs/booster-k1
source ~/.venvs/booster-k1/bin/activate
SDK 설치
pip install booster_robotics_sdk_python
설치 확인
python3 -c "import booster_robotics_sdk; print('SDK ready')"
네트워크 구성
K1은 유선 이더넷을 통해 통신합니다. 연결하기 전에 호스트 PC의 네트워크 인터페이스를 구성하십시오.
# Set your PC's Ethernet interface to 192.168.10.10
sudo ip addr add 192.168.10.10/24 dev eth0
sudo ip link set eth0 up
# Verify connectivity to the K1
ping 192.168.10.102
ROS2 전신 제어 인터페이스
K1에는 모든 관절을 표준으로 노출하는 ROS2 브리지 노드가 함께 제공됩니다. ros2_control 하드웨어 인터페이스. 이를 통해 MoveIt2, 궤적 플래너 및 맞춤형 컨트롤러와의 통합이 가능합니다.
ROS2 험블 설치
sudo apt update && sudo apt install software-properties-common curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | \
sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu jammy main" \
> /etc/apt/sources.list.d/ros2.list'
sudo apt update
sudo apt install ros-humble-desktop ros-humble-ros2-control \
ros-humble-ros2-controllers ros-humble-joint-state-publisher-gui -y
K1 ROS2 패키지 복제 및 빌드
mkdir -p ~/k1_ws/src && cd ~/k1_ws/src
git clone https://github.com/BoosterRobotics/booster_ros2.git
cd ~/k1_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install
K1 교량 발사
source ~/k1_ws/install/setup.bash
ros2 launch booster_ros2 k1_bringup.launch.py \
robot_ip:=192.168.10.102
관절 상태 검사
# List all available topics
ros2 topic list
# Stream joint states (22 joints at 500 Hz)
ros2 topic echo /joint_states
합동국가를 읽고 지휘하기
Python SDK는 22개 관절 모두에 대한 직접 액세스를 제공합니다. 동작을 명령하기 전에 항상 DAMP 모드에서 시작하십시오.
관절 상태 연결 및 읽기
from booster_robotics_sdk import BoosterRobot, RobotMode
# Connect to the robot
robot = BoosterRobot(ip="192.168.10.102")
robot.connect()
# Enter DAMP mode (safe, low impedance)
robot.set_mode(RobotMode.DAMP)
# Read full joint state
state = robot.get_state()
print(f"Mode: {state.mode}")
print(f"Joint positions (rad): {state.joint_positions}")
print(f"Joint velocities (rad/s): {state.joint_velocities}")
print(f"Joint torques (Nm): {state.joint_torques}")
print(f"IMU euler (deg): {state.imu_euler}")
robot.disconnect()
커맨드 암 관절 위치(CUSTOM 모드)
CUSTOM 모드에서는 팔을 관절 수준으로 직접 제어할 수 있습니다. 리프팅 고정 장치가 필요합니다. 로봇이 자체 무게를 지탱해서는 안 됩니다. 참조 안전 페이지.
from booster_robotics_sdk import BoosterRobot, RobotMode, ArmCommand
import numpy as np
robot = BoosterRobot(ip="192.168.10.102")
robot.connect()
# Transition: DAMP -> PREP -> CUSTOM
robot.set_mode(RobotMode.DAMP)
robot.set_mode(RobotMode.PREP)
import time; time.sleep(3) # Wait for PREP stabilization
robot.set_mode(RobotMode.CUSTOM)
# Command right arm to a target configuration (7 DOF)
# Joints: shoulder_pitch, shoulder_roll, shoulder_yaw,
# elbow_pitch, wrist_pitch, wrist_roll, wrist_yaw
target = [0.0, -0.3, 0.0, 0.8, 0.0, 0.0, 0.0]
cmd = ArmCommand(side="right", joint_positions=target, kp=60, kd=2)
robot.send_arm_command(cmd)
robot.disconnect()
머리 자세 제어
from booster_robotics_sdk import BoosterRobot, HeadCommand
robot = BoosterRobot(ip="192.168.10.102")
robot.connect()
robot.set_mode(RobotMode.PREP)
# Head: yaw in [-90, 90] deg, pitch in [-40, 30] deg
cmd = HeadCommand(yaw_deg=15.0, pitch_deg=-10.0)
robot.send_head_command(cmd)
robot.disconnect()
Locomotion API 기본 사항
K1의 운동 컨트롤러는 균형과 보행을 자율적으로 관리합니다. 속도 목표를 명령합니다. 온보드 컨트롤러는 안정성을 처리합니다. 항상 감시인이 있어야 합니다.
모드 전환 순서
from booster_robotics_sdk import BoosterRobot, RobotMode, LocomotionCommand
import time
robot = BoosterRobot(ip="192.168.10.102")
robot.connect()
# Step 1: Enter DAMP (zero torque, safe to handle)
robot.set_mode(RobotMode.DAMP)
time.sleep(1)
# Step 2: Enter PREP (stand up to PREP posture)
robot.set_mode(RobotMode.PREP)
time.sleep(5) # Wait for full PREP stabilization — do not skip
# Step 3: Enter WALK
robot.set_mode(RobotMode.WALK)
time.sleep(2)
명령 이동(속도 모드)
# Walk forward at 0.3 m/s
cmd = LocomotionCommand(
vx=0.3, # forward/back (m/s), range: [-0.5, 0.5]
vy=0.0, # lateral (m/s), range: [-0.3, 0.3]
vyaw=0.0 # rotation (rad/s), range: [-1.0, 1.0]
)
robot.send_locomotion_command(cmd)
time.sleep(2)
# Stop
robot.send_locomotion_command(LocomotionCommand(vx=0, vy=0, vyaw=0))
time.sleep(1)
# Return to PREP then DAMP
robot.set_mode(RobotMode.PREP)
time.sleep(3)
robot.set_mode(RobotMode.DAMP)
robot.disconnect()
소프트웨어의 비상 정지
# Call from any thread — immediately enters DAMP mode
robot.emergency_stop()
긴급 상황에는 항상 하드웨어 비상 정지 버튼을 선호하십시오. 소프트웨어 비상 정지는 백업 전용입니다.
MuJoCo 휴머노이드 시뮬레이션
K1 URDF 모델은 SDK에 포함되어 있습니다. MuJoCo를 사용하여 하드웨어 배포 전에 이동 및 조작 정책을 개발하고 테스트하세요.
MuJoCo 설치
pip install mujoco
K1 체육관 환경 복제
git clone https://github.com/BoosterRobotics/booster_gym.git
cd booster_gym
pip install -e .
걷기 시뮬레이션 실행
python examples/walk_sim.py --render
아이작 심(고급)
NVIDIA Isaac Sim은 대규모 정책 훈련을 위한 GPU 가속 병렬 시뮬레이션을 제공합니다. K1 URDF는 Isaac Sim 4.x로 깔끔하게 가져옵니다. NVIDIA GPU(16GB VRAM 권장) 및 Isaac Sim 라이선스가 필요합니다. 참조 휴머노이드 비교 기사 시뮬레이션 벤치마크용.
시뮬레이션-실제 정렬 — K1 MuJoCo 모델에는 실제 하드웨어와 일치하는 보정된 관성 매개변수와 조인트 제한이 포함되어 있습니다. 시뮬레이션을 통해 학습된 정책은 최소한의 이득 조정으로 배포할 수 있습니다.
휴머노이드 설정에 대한 상위 3가지 문제
Connection refused / ping timeout
가장 일반적인 문제입니다. 거의 항상 호스트 PC 측의 네트워크 구성이 잘못되었습니다.
고치다:
# 1. Verify your PC's interface is on the correct subnet
ip addr show eth0
# Should show 192.168.10.10/24
# 2. Set it if not configured
sudo ip addr flush dev eth0
sudo ip addr add 192.168.10.10/24 dev eth0
sudo ip link set eth0 up
# 3. Ping the robot
ping -c 4 192.168.10.102
# 4. If ping fails, verify the K1 is fully booted
# The K1 takes ~60 seconds to boot. Look for the LED sequence
# to complete before attempting connection.
K1이 밸런스 컨트롤러를 초기화하려면 PREP에서 최소 3초가 필요합니다. 너무 빠른 전환은 첫 번째 설정 중 넘어지는 가장 일반적인 원인입니다.
고치다:
# Always wait at least 5 seconds in PREP before WALK
robot.set_mode(RobotMode.PREP)
time.sleep(5) # Do not reduce this
# Verify PREP is fully active before proceeding
state = robot.get_state()
assert state.mode == RobotMode.PREP, "PREP not confirmed"
# Have your spotter positioned with the e-stop
robot.set_mode(RobotMode.WALK)
hardware interface not found
ROS2 브리지가 K1의 하드웨어 인터페이스를 찾을 수 없습니다. 일반적으로 실행 파일의 패키지 누락 또는 잘못된 로봇 IP로 인해 발생합니다.
고치다:
# 1. Install missing ros2_control packages
sudo apt install ros-humble-ros2-control \
ros-humble-ros2-controllers -y
# 2. Rebuild the workspace
cd ~/k1_ws && colcon build --symlink-install
# 3. Source both ROS2 and your workspace
source /opt/ros/humble/setup.bash
source ~/k1_ws/install/setup.bash
# 4. Verify robot_ip matches actual K1 IP
ros2 launch booster_ros2 k1_bringup.launch.py \
robot_ip:=192.168.10.102
# 5. Check the K1 is connected and responding
ping 192.168.10.102
아직도 붙어있나요? 에 게시 SVRC 포럼 Ubuntu 버전, 정확한 오류 메시지 및 SDK 버전(pip show booster_robotics_sdk_python).