찹쌀이네 공부 공간

[ROS2] Moveit2 설치 및 실행 본문

Vision Language Action, VLA

[ROS2] Moveit2 설치 및 실행

호떡공돌이 2026. 3. 23. 23:36

https://moveit.ai/install-moveit2/binary/

 

MoveIt 2 Binary Install | MoveIt

 

moveit.ai

위 사이트에서 jazzy 용 moveit2 패키지 설치

 

 

 

https://docs.universal-robots.com/Universal_Robots_ROS2_Documentation/doc/ur_robot_driver/ur_robot_driver/doc/installation/installation.html

 

Installation of the ur_robot_driver — Universal Robots ROS 2 Driver Documentation 0.1 documentation

You can either install this driver from binary packages as shown above or build it from source. We recommend a binary package installation unless you want to join development and submit changes. Note Controlling the robot using ROS raises the requirement f

docs.universal-robots.com

위 사이트에서 ur_robot_driver 설치한다.

 

ur_robot_driver는 UR 로봇과 ROS 2 사이를 이어주는 핵심 드라이버 패키지이며, 다음과 같은 역할을 수행한다.

 

로봇 상태를 ROS 2로 가져옴

예를 들어, 아래 항목을 ROS 토픽/인터페이스 형태로 올려준다.

  • 현재 joint angle
  • TCP 위치
  • 속도
  • 로봇 상태
  • I/O 상태

ROS 2에서 로봇으로 명령을 보냄

  • 관절 궤적 실행
  • MoveIt 계획 실행
  • URScript 전송
  • 대시보드 명령
  • 컨트롤러 스위칭

MoveIt이 실제 로봇을 움직일 수 있게 연결해줌

  • ur_description
    로봇 모양, 링크, 조인트, URDF/xacro
  • ur_moveit_config
    MoveIt이 계획할 수 있게 해주는 설정
  • ur_robot_driver
    실제 로봇과 ROS 2를 연결해서 실제로 움직이게 하는 드라이버
  • ur_client_library
    더 아래 레벨의 C++ 통신 라이브러리

참고로, source install/setup.bash는 내가 직접 만든 워크스페이스의 빌드 결과물을 현재 터미널에 올리는 것

참고로, source /opt/ros/jazzy/setup.bash는 Ubuntu에 apt로 설치된 ROS 2 Jazzy 기본 환경을 올리는 것

 

설치가 완료 됐으면, 아래 커맨드를 실행해서 문제 없는지 확인한다.

일단은 robot_description를 실행하지 않았으니 waiting 메세지가 나오며, 하드웨어를 실행하거나, 시뮬레이션을 사용해서 robot_description을 실행해야 한다. (moveit2는 robot_description을 활용함.)

 

참고로, ros2 ur 관련 패키지 실행은 ros2 launch <패키지명> <런치파일명> 순서로 한다.

ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e

 

 

터미널을 추가로 열어서, rviz를 통해 ur 로봇을 실행해보자.

마우스로 end effector를 움직인 뒤, Plan 버튼을 눌러 모션도 확인해보자.

ros2 launch ur_description view_ur.launch.py ur_type:=ur5e