Try   HackMD

MoveIt! package

tags: ros moveit robot simulator vsclab
Outline

Installation

  • 2022/9/25:
    MoveIt-humble 的 binary 版本尚未推出,因此降回使用 foxy 版,編譯速度較快

Demo Program

匯入台達機械手臂 URDF 至 MoveIt2!

環境安裝

由於 ROS 2 foxy 沒有 "MoveIt Setup Assistant",因此使用 MoveIt 1 Noetic (需先安裝 ROS 1 Noetic)

tf 套件介紹

URDF 介紹

Create MoveIt Configuration Package

[2022/10/19 - ] ROS 1 Noetic

  1. Exporting URDF from SOLIDWORKS and Simulate the Robotic Arm in ROS using Moveit, Gazebo and Raviz with Inverse Kinamatics - YouTube Playlist
    • 利用 SOLIDWORKS 匯出 URDF package
    • 利用 MoveIt Assistance 匯出 moveit package
    其他教學
  • [roslaunch ERROR]
    Could not load controller 'joint_state_controller' because controller type 'joint_state_controller/JointStateController' does not exist.
    • Solution
      $ sudo apt-get install ros-noetic-joint-state-controller ros-noetic-joint-trajectory-controller
  • [Gazebo]
    [ERROR] [1667645588.171038399, 0.126000000]: No p gain specified for pid. Namespace:gazebo_ros_control/pid_gains/Joint1

機械手臂模擬程式執行流程(ROS 1 Noetic)

$ cd ~/delta_ws           # 進入工作目錄
$ catkin_make             # 編譯
$ source devel/setup.bash # source the overlay

# 預覽台達機械手臂(無物理引擎)
$ roslaunch delta_model display.launch

$ roslaunch moveit_delta_sim demo_gazebo.launch

# 模擬台達機械手臂運動規劃(含物理引擎+控制器)
$ roslaunch moveit_delta_sim full_delta_sim.launch

[2022/11/16 - ] ROS 2 foxy (移至Humble開發)

機械手臂模擬程式執行流程(ROS 2 foxy)

# 進入工作目錄
$ colcon_cd delta_ros2_ws # by colcon_cd
$ cd ~/delta_ros2_ws      # manually

# 編譯
$ colcon build

# 載入套件環境
$ source install/setup.bash

# 預覽台達機械手臂(無物理引擎)
$ ros2 launch src/delta_model/arm.launch.py

# 模擬台達機械手臂運動規劃(含物理引擎+控制器)
$ roslaunch moveit_delta_sim full_delta_sim.launch
URDF Launcher 開發流程
  1. 參考以下官方範例來撰寫 [ROS 2 Launch File]
    (https://docs.ros.org/en/foxy/Tutorials/Intermediate/Launch/Creating-Launch-Files.html)
  2. 將URDF路徑參數指向DRV70L
MoveIt2 Launcher 開發流程

[2023/01/05 - ] ROS 2 humble

機械手臂模擬程式執行流程(ROS 2 humble)

# 進入工作目錄
$ colcon_cd delta_ros2_ws # by colcon_cd
$ cd ~/delta_ros2_ws      # manually

# 編譯
$ colcon build

# 載入套件環境
$ source ~/delta_ros2_ws/install/setup.bash
$ source ~/ws_moveit2/install/setup.bash

# 預覽台達機械手臂(無物理引擎)
$ ros2 launch delta_model display.launch.py

# (Terminal 1) 開啟台達機械手臂 MoveIt 環境
$ ros2 launch moveit2_delta demo.launch.py rviz_config:="src/moveit2_delta/rviz/moveit.rviz"

# (Terminal 2) 開啟 MoveIt 命令控制程式
$ ros2 run hello_moveit hello_moveit_delta
$ ros2 launch hello_moveit collision_demo.launch.py

# 模擬台達機械手臂運動規劃(含物理引擎+控制器)
# $ roslaunch moveit_delta_sim full_delta_sim.launch
MoveIt2 (humble) Launcher 開發流程

Step 1. 參考以下範例修改 delta_model 的CMakeLists.txtpackage.xml

Step 2. 編譯 URDF 檔,打開 moveit_setup_assistant

$ cd ~/delta_ros2_ws
$ colcon build
$ source install/setup.bash
$ ros2 run moveit_setup_assistant moveit_setup_assistant

Step 3. Moveit Setup Assistant

Step 4. 編譯並開啟範例程式

$ cd ~/delta_ros2_ws
$ colcon build
$ source install/setup.bash
$ ros2 launch moveit2_delta demo.launch.py
參考教學

使用 MoveIt C++ API 建立軌跡規劃

API Docs:
其他教學
  • config/*_planning.yaml 記得修改 Joint Group 名稱,才能載入 move_group_node, rviz2_node

ROS control/controller

# List Controller Types
$ rosservice call controller_manager/list_controller_types

# Show Pos, Vel of joints
$ rostopic echo /joint_states

TODO:

  1. Gazebo模擬震顫問題
  2. Gazebo機械手臂顯示問題

MoveIt!/Planners

Self-Collision Checking Results

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →