dVRK PSM Teleoperation Experiment


Related posts

🛠️ Writing in progress 🛠️ (Updated Jun 2026)

Simulator preview

뼈대가 되는 기본 로봇시뮬레이터와 보다 자세한 기술적 설명은 위의 Related post에서 확인 가능합니다.

Simulator Overview

기존 MuJoCo 기반 simulator MyJoCo 위에 SurRoL 연구를 참고하여 dVRK PSM model, RCM(Remote Center of Motion) 기반 제어 관점, needle reach task를 추가했습니다. 특히 SurRoL의 PSM teleoperation 흐름과 RCM frame에서의 도구 끝점 제어 방식을 참고하면서, 일반적인 manipulator 제어와 다른 수술로봇 특화 제어 구조를 실험할 수 있도록 구성했습니다. 본 실험을 통해 의료특화 로봇이 왜 별도의 kinematic constraint와 task setup(예. 성공 기준인 tip error 정의)을 필요로 하는지 직접 확인할 수 있었습니다.

뼈대가 되는 기본 로봇시뮬레이터와 보다 자세한 기술적 설명은 다음 포스팅에서 확인 가능합니다. https://leewoojye.github.io/robotics/research/2026/06/03/myjoco3.html

How to use: dVRK PSM Needle Reach Teleoperation

conda environment를 생성하고 활성화합니다:

conda create -n my_robotics python=3.12
conda activate my_robotics

프로젝트 루트에서 dependency를 설치합니다:

pip install -r requirements.txt

프로젝트 루트에서 다음 명령으로 GUI demo를 실행합니다:

python -m sim_with_mujoco.demo.dvrk_psm_teleop_demo

현재는 needle reach task만을 수행한 상태이며 grasping, gauze retrieval, needle pickup task로까지의 확장을 목표로 하고 있습니다. PSM tool tip을 초록색 needle target 쪽으로 이동시키면서 shaft가 RCM constraint에서 크게 벗어나지 않도록 제어합니다.

Controls

Input Behavior
W / S tool-tip target을 world z 방향으로 이동
A / D tool-tip target을 world y 방향으로 이동
Q / E tool-tip target을 world x 방향으로 이동

좌측 상단 overlay에는 현재 task, action vector, tip error, RCM error가 표시됩니다.

Core Implementation

Area Current implementation
Input viewer SurRoL 방식 keyboard input을 제공하는 단순한 GLFW/MuJoCo viewer인 SurrolKeyboardViewer class 사용
Teleoperation target 키 입력마다 tool-tip target 위치를 조금씩 누적 변경
RCM-aware Numerical IK solve_dvrk_rcm_ik에서 목표 world-frame tip target을 RCM frame으로 변환한 뒤 yaw, pitch, insertion target 계산
Actuation 안정적인 teleoperation을 위해 active joint를 kinematic servo 방식으로 갱신 (추후 개선할 부분)
Metrics surgical task utility를 통해 tip error, RCM error를 계산

Simulator Structure

sim_with_mujoco/
  demo/
    dvrk_psm_teleop_demo.py       dVRK PSM teleoperation entry
  environment/
    env.py                        MuJoCo model/data/viewer wrapper
  tasks/surgical/
    safety_metrics.py             tip, RCM metrics
    target_sequence.py            timed target sequence helper
  utils/
    dvrk_ik.py                    dVRK RCM-frame PSM IK
    ik.py                         DLS multi-target IK
    ik_qp.py                      differential IK
    dynamics.py                   computed torque and PD helpers
    collision.py                  MuJoCo contact helpers
    mj.py                         MuJoCo id mapping helpers
  viewer/
    surrol_keyboard_viewer.py     SurRoL keyboard preview viewer
    viewer.py                     generic MuJoCo viewer wrapper

Current Limitations

  • 현재 demo는 needle reach 중심이며 grasping, gauze retrieval 태스크도 수행해야 합니다.
  • Keyboard input은 실제 dVRK MTM/haptic device가 아닌 보편적인 인터페이스 형식을 갖추고 있습니다.
  • SurRoL 기반 PSM model이 MjData qpos를 직접 수정하고 있으며, 온전한 dynamics simulator가 아닙니다.

References

  • MuJoCo documentation
  • Modern Robotics, Kevin M. Lynch and Frank C. Park
  • Drake Differential IK: https://drake.mit.edu/doxygen_cxx/group__planning__kinematics.html
  • robosuite Controllers: https://robosuite.ai/docs/modules/controllers.html
  • dm_control: https://github.com/google-deepmind/dm_control
  • SurRoL: https://github.com/med-air/SurRoL

Tech Stack

  • Python
  • MuJoCo
  • GLFW
  • NumPy
  • SciPy
  • matplotlib