Streaming Mocap Data into ROS by OSC
사전 준비사항
1
5
마지막 업데이트
ROS는 로봇 애플리케이션 개발을 위한 오픈소스 프레임워크로, 센서, 제어, 시각화 등을 하나의 구조에서 연결할 수 있습니다.
MOVIN TRACIN과 MOVIN Studio로 캡처한 모션 데이터는 ROS 2 환경에서 실시간 (또는 파일 기반) 으로 재생, 리타게팅되어, RViz2에서 로봇 모델 움직임을 확인하거나 로봇 제어 파이프라인에 연동해 활용할 수 있습니다.
ROS 연동을 위해서는 아래 환경이 필요합니다. 하단의 패키지들이 모두 설치되어 있는지 먼저 확인해주세요.
ROS 2:
Humble (tested)
필수 ROS 2 패키지:
robot_state_publisher
rviz2
xacro
tf2_ros
필수 pip 패키지:
numpy
scipy
movin-sdk-python (BVH 파일 로딩 및 실시간 모드에 필요)
cd ~/ros2_ws/src
git clone https://github.com/MOVIN3D/Motion-Player-ROSROS 2 워크스페이스의 src 폴더로 이동한 뒤, Motion-Player-ROS 레포지토리를 클론해주세요.
ros2 launch motion_player realtime.launch.pyMOVIN Studio에서 모션 데이터를 받기 위해 실시간 모드를 실행해주세요.
실시간 모드에서는 다음 기능을 사용할 수 있습니다
실시간 리타게팅: MOVIN의 모션 데이터를 로봇 모델에 즉시 적용합니다.
실시간 시각화: RViz2에서 MOVIN의 모션 캡처 스켈레톤과 리타게팅된 로봇 모션을 동시에 확인할 수 있습니다.
ros2 launch motion_player realtime.launch.py port:=11235 human_height:=1.80 skeleton_offset_x:=1.5필요에 따라 아래와 같이 커스텀 파라미터를 지정할 수 있습니다.
port
11235
UDP port to listen for OSC mocap data
robot_type
unitree_g1
Target robot type (unitree_g1 or unitree_g1_with_hands)
human_height
1.75
Human height in meters for scaling
skeleton_offset_x
1.0
X offset to place skeleton beside robot
urdf_file
(package default)
Path to custom URDF file
rviz_config
(package default)
Path to custom RViz config file
또한 --realtime 플래그를 사용해 직접 노드를 실행할 수도 있습니다.
ros2 run motion_player motion_player --realtime --ros-args -p port:=11235 -p human_height:=1.8마지막 업데이트