Building a movable robot model — ROS 2 Documentation: Jazzy documentation
Goal: Learn how to define movable joints in URDF. In this tutorial, we’re going to revise the R2D2 model we made in the previous tutorial so that it has movable joints. In the previous model, all of the joints were fixed. Now we’ll explore three other
docs.ros.org
https://jihong.tistory.com/531
URDF :Building a visual robot model from scratch
https://docs.ros.org/en/jazzy/Tutorials/Intermediate/URDF/Building-a-Visual-Robot-Model-with-URDF-from-Scratch.html Building a visual robot model from scratch — ROS 2 Documentation: Jazzy documentationThe body is now blue. We’ve defined a new material
jihong.tistory.com
빨간색은 x축 , 초록색은 y축 , 파란색은 z축

goal
- URDF에서 movable한 joints를 정의해보자.
- 이번 튜토리얼에서는, 이전 튜토리얼에서 정의한 R2D2 모델에서 joints를 movable하게 변경할것이다.
- 이전 튜토리얼에서는 https://jihong.tistory.com/531 모든 joints들을 fixed형태로 정의했다.
이번에는 3개의 다른 중요한 joints타입은 continuos, revolute , prismatic에 대해서 사용할 것이다.
- 이전 튜토리얼에서는 https://jihong.tistory.com/531 모든 joints들을 fixed형태로 정의했다.
- 아래의 명령어를 실행하면 위의 그림1과 같이 나온다.
ros2 launch urdf_tutorial display.launch.py model:=urdf/06-flexible.urdf
Head에 대한 XML코드
- 해당 joint의 이름은 head_swivel이며, 타입은 continuos이다.
- continuous는 제한없이 무한히 회전이 가능한 joint이다.
- axis xyz=0 0 1
- z축 방향으로 회전하게 설정한것이다. 이는 머리가 수직 축을 기준으로 회전함을 의미한다.
만약 1 0 0 이였다면 x축을 따라서 회전 했을것임.
- z축 방향으로 회전하게 설정한것이다. 이는 머리가 수직 축을 기준으로 회전함을 의미한다.
- origin xyz=0 0 0.3으로 joint의 기준 위치를 설정함
- 이는 base_link의 z축을 기준으로 0.3m위에 머리가 위치함을 의미.

The Gripper에 대한 XML코드
- left_griper_joint는 joint의 이름이며, 타입은 revolute이다.
- revolute타입은 회전하는 joint이며, 특정 축을 기준으로 각도 제한이 있는 회전이 가능하다.
- limit 태그로 joint의 동작 범위를 제어한다.
- effort=1000은 joint에 가해질 수 있는 최대 힘을 설정한다.
여기에서는 최대 1000뉴턴까지 적용 가능하게 설정하였다. 일반적으로는 모터의 출력 한계를 의미한다. - lower=0.0은 최소 각도 범위를 0라디안으로 설정하였다.
- upper=0.548은 최대 각도 범위를 31.4도로 설정하였다.
- velocity=0.5는 최대 각속도를 0.5 rad/s로 설정
- effort=1000은 joint에 가해질 수 있는 최대 힘을 설정한다.

The Gripper Arm에 대한 XML코드
- prismatic 타입은 특정한 축을 따라서 직선 운동을 수행한다.
- 최대로 0m까지 이동가능하며, 최소 -0.38m까지 이동이 가능하다.

'ROS 2' 카테고리의 다른 글
| URDF : Using Xacro to clean up your code (0) | 2025.02.04 |
|---|---|
| URDF : Adding physical and collision properties (0) | 2025.02.04 |
| URDF :Building a visual robot model from scratch (0) | 2025.02.03 |
| URDF란? (1) | 2025.02.03 |
| ROS 2 Tutorials : Writing a simple service and client (Python) (0) | 2025.01.15 |