Isaac Sim ROS2 Tutorial 6: Franka Joint Control
Franka Panda의 joint state를 ROS2로 publish하고 joint command를 subscribe해 articulation을 제어한다.
이번 글은 Isaac Sim에서 robot articulation을 ROS2 joint topic과 연결하는 과정을 정리한 기록이다. 예제 대상은 Franka Panda이며, 현재 joint state를 ROS2로 publish하고 외부 node가 보낸 joint command를 다시 Isaac Sim 안의 Articulation Controller로 전달한다.
참고한 흐름은 Isaac Sim의 ROS2 Joint Control 튜토리얼과 Extension Python Scripting 예제다.
1. Franka Panda 추가
Content Browser에서 Franka Panda USD를 stage에 추가한다. stage에 올라온 prim 이름은 환경에 따라 /franka 또는 /panda처럼 달라질 수 있으므로, 이후 target prim에는 실제 articulation root를 선택한다.
1
Isaac Sim > Robots > FrankaRobotics > FrankaPanda > franka.usd
2. Joint State Action Graph
새 Action Graph를 만들고 joint state publish와 joint command subscribe에 필요한 노드를 배치한다.
| 노드 | 역할 |
|---|---|
| On Playback Tick | simulation frame마다 graph를 실행합니다. |
| Isaac Read Simulation Time | ROS2 message timestamp에 넣을 simulation time을 읽습니다. |
| ROS2 Publish Joint State | robot의 현재 joint state를 /joint_states topic으로 publish합니다. |
| ROS2 Subscribe Joint State | /joint_command topic에서 joint command를 받습니다. |
| Articulation Controller | subscribe한 joint command대로 robot articulation을 움직입니다. |
/joint_states는 Isaac Sim에서 외부 ROS2 환경으로 나가는 topic이고, /joint_command는 외부 ROS2 node가 Isaac Sim으로 보내는 topic이다. 두 방향을 분리해서 이해해야 graph 연결을 헷갈리지 않는다.
3. Target Prim과 Topic 설정
Publish Joint State와 Articulation Controller 노드의 target에는 Franka articulation root를 넣는다. command topic 이름과 joint name이 실제 stage의 articulation과 맞아야 한다.
1
2
3
4
5
6
7
On Playback Tick
-> ROS2 Publish Joint State
-> ROS2 Subscribe Joint State
-> Articulation Controller
Isaac Read Simulation Time
-> ROS2 Publish Joint State timestamp
4. ROS2 Publisher 실행
외부 터미널에서 tutorial publisher를 실행해 /joint_command를 publish한다.
1
ros2 run isaac_tutorials ros2_publisher.py
다른 터미널에서는 joint state가 정상적으로 나오는지 확인한다.
1
ros2 topic echo /joint_states

5. 정리
이번 연결의 핵심은 joint command를 바로 물리 엔진에 쓰는 것이 아니라, ROS2 Subscribe Joint State 노드와 Articulation Controller를 거쳐 articulation target으로 전달한다는 점이다.
1
Tools > Robotics > ROS 2 OmniGraphs > JointStates
1
2
3
4
5
6
7
8
Franka articulation
-> ROS2 Publish Joint State
-> /joint_states
/joint_command
-> ROS2 Subscribe Joint State
-> Articulation Controller
-> Franka articulation



