一、配置环境
操作系统:Ubuntu 18.04
机械臂型号:UR5 ;polyscope 3.14
夹爪型号:Robotiq 2F-85
深度相机:Intel RealSense - D435i
二、标定前环境配置
2.1实现ROS实时控制UR5机械臂
参考笔者之前整理的博客:ROS-Melodic-Moveit 实时控制UR5机械臂
2.2安装Intel RealSense - D435i
参考笔者之前整理的博客:Ubuntu18.04+ROS Melodic+D435i环境配置
(注:2.1-2.2均在同一工作空间的src文件夹内安装)
2.3安装aruco_ros
cd ~/catkin_UR5/src
git clone -b melodic-devel https://github.com/pal-robotics/aruco_ros.git
cd ..
catkin_make
2.3安装vision_visp / visp_hand2eye_calibration
cd ~/catkin_UR5/src
git clone -b melodic-devel https://github.com/lagadic/vision_visp.git
cd ..
catkin_make --pkg visp_hand2eye_calibration
2.4安装easy_handeye
cd ~/catkin_UR5/src
git clone https://github.com/IFL-CAMP/easy_handeye
cd ..
catkin_make
(若因新版easy_handeye在标定过程中报错,可留言邮箱联系笔者获取旧版easy_handeye功能包)
2.5下载并打印 ArUco marker
进入网站下载打印ArUco marker。注意:
Dictionary 要选 Original ArUco;
Marker ID 和 Marker size 自选,在launch文件中做相应修改;
(笔者选了ID=100;Size=300mm=0.3m)
打印时要选择原始大小,否则要测量一下打印出来的真实大小。
(笔者的UR5机械臂安装有Robotiq夹爪,将打印好的ArUco marker纸用手爪夹紧进行标定。)
三、眼在手外标定
3.1修改标定 launch 文件
标定过程需启动 ur5 机械臂的相关节点,realsense 节点,aruco 节点,easy_handeye 节点,可写一个 launch 文件同时启动上述节点。easy_handeye 包中给出了用一个 launch 文件实现的示例,在如下的目录中:xxx/easy_handeye/docs/example_launch/ur5_kinect_calibration.launch文件。我们在此基础上修改。在文件里面为了避免出现一些报错,把D435i相机的启动程序、UR5机器人的启动程序屏蔽掉,实验时单独启动运行。
# 将 launch 文件拷贝到 easy_handeye 功能包的 launch 目录中,并改名为:eye_to_hand_calibration.launch
cd ~/catkin_UR5