aubo i5 + realsense D435i识别抓取实践二
前言
前面配置好了aubo机械臂的ROS软件包,机械臂可以正常运行后,接下来我们进行机械臂与相机的手眼标定。手眼标定分为eye_on_hand和eye_to_hand,我们这里是将相机固定在机械臂末端随机械臂移动而移动,故属于eye_on_hand,接下来我们将进行手眼标定的演示。
一、手眼标定是什么?
手眼标定是将标定机械臂与相机的位置关系的一种方法,eye_on_hand通常标定相机与机械臂末端的位置关系,而eye_to_hand通常标定相机与机械臂基坐标之间的位置关系,可以理解为相机相对谁固定就标定它们两者之间位置关系。标定得到位置关系后可以将在相机坐标系下识别到的物体转换至机械臂坐标系下,便于机械臂的操作。
二、标定软件安装
1.aruco_ros安装
$ git clone -b kinetic-devel https://github.com/pal-robotics/aruco_ros ~/aubo_ws/src
$ cd ~/aubo_ws
$ catkin_make -j2 -DCATKIN_WHITELIST_PACKAGES="aruco_ros"
2.vision_visp安装
$ sudo apt-get install ros-kinetic-visp
3.easy_handeye安装
$ git clone https://github.com/IFL-CAMP/easy_handeye ~/aubo_ws/src
$ cd ~/aubo_ws
$ catkin_make -j2 -DCATKIN_WHITELIST_PACKAGES="easy_handeye"
4.realsense驱动安装
sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
$ sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
$ sudo apt-get install librealsense2-* librealsense2
5.安装realsense ROS软件包
$ sudo apt-get install ros-kinetic-realsense2-*
三、配置
1.launch文件修改
easy_handeye在docs/example_launch文件夹中有一个ur5,kinect的样例,这里我们拷贝一份到工作包easy_handeye/launch文件夹下重命名为auboi5_realsense_calibration.launch。文件内容如下:
<?xml version="1.0"?>
<launch>
<arg name="namespace_prefix" default="auboi5_realsense_handeyecalibration" />
<arg name="robot_ip" doc="The IP address of the UR5 robot" default=”192.168.12.102” />
<arg name="marker_size" doc="Size of the ArUco marker used, in meters" default="0.08"/>
<arg name