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

뼈대가 되는 기본 로봇시뮬레이터와 보다 자세한 기술적 설명은 위의 Related post에서 확인 가능합니다.
기존 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
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에서 크게 벗어나지 않도록 제어합니다.
| 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가 표시됩니다.
| 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를 계산 |
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