Skip to content

Commit

Permalink
[docs] Updated hand-eye calibration instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
vimior committed Nov 14, 2023
1 parent 73395ef commit 59f2a25
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
8 changes: 8 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,14 @@ Sample calibration result TF publication:
[publish_handeye_tf_lite6.launch](./xarm_vision/d435i_xarm_setup/launch/publish_handeye_tf_lite6.launch)


### 7.2.2 Precautions for Hand-eye Calibration:
Since the position and orientation of the robot arm generated by `easy_handeye` by default does not change much, the final calibration result may not be too accurate or stable.
In the actual calibration process, we do not need to use the position generated by `easy_handeye`. We can specify the startup parameter `freehand_robot_movement:=true` in the above command to start, and control the robotic arm to different positions through the xarm studio control interface or enable drag teaching. Then collect data through "__Take Sample__" of the activated hand-eye calibration window. After collecting about 17 data, calculate it through "__Compute__". It is recommended to rotate the rpy as much as possible to ensure that the calibration plate is within the field of view for the position of the robotic arm during each acquisition.
- The angle between the rotation axes of the two movements should be as large as possible
- The rotation angle corresponding to the rotation matrix of each movement should be as large as possible
- The distance from the camera center to the calibration plate should be as small as possible
- The distance moved by the end of the robot arm in each movement should be as small as possible

## 7.3 Vision Guided Grasping Demo:
[***find_object_2d***](http://introlab.github.io/find-object/) is used for this demo for simple object detection and grasping. Hardware used in this part: RealSense D435i depth camera, UFACTORY camera stand and the xArm Gripper.

Expand Down
10 changes: 9 additions & 1 deletion ReadMe_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ $ catkin_make
```bash
$ roslaunch d435i_xarm_setup d435i_xarm_auto_calib.launch robot_dof:=your_xArm_DOF robot_ip:=your_xArm_IP
```
标定使用的aruco二维码可以在[这里下载](https://chev.me/arucogen/),请记住自己下载的`marker ID``marker size`,并在以上launch文件中修改。参考[官方](https://github.com/IFL-CAMP/easy_handeye#calibration)或其他网络教程通过图形界面进行标定,标定完成并确认保存后,默认会在 `~/.ros/easy_handeye`目录下生成`.yaml`后缀的结果文档,供后续与手臂一起进行坐标变换使用。如果固定件用的是UFACTORY提供的[camera_stand](https://www.ufactory.cc/products/xarm-camera-module-2020),在xarm_vision/d435i_xarm_setup/config/[xarm_realsense_handeyecalibration_eye_on_hand_sample_result.yaml](./xarm_vision/d435i_xarm_setup/config/xarm_realsense_handeyecalibration_eye_on_hand_sample_result.yaml)中保存了参考的标定结果。
标定使用的aruco二维码可以在[这里下载](https://chev.me/arucogen/),请记住自己下载的`marker ID``marker size`,并在以上launch文件中修改。参考[官方](https://github.com/IFL-CAMP/easy_handeye#calibration)或其他网络教程通过图形界面进行标定,标定完成并确认保存后,默认会在 `~/.ros/easy_handeye`目录下生成`.yaml`后缀的结果文档,供后续与手臂一起进行坐标变换使用。如果固定件用的是UFACTORY提供的[camera_stand](https://www.ufactory.cc/products/xarm-camera-module-2020),在xarm_vision/d435i_xarm_setup/config/[xarm_realsense_handeyecalibration_eye_on_hand_sample_result.yaml](./xarm_vision/d435i_xarm_setup/config/xarm_realsense_handeyecalibration_eye_on_hand_sample_result.yaml)中保存了参考的标定结果。

### 7.2.1 关于 UFACTORY Lite6 手眼标定:
请首先阅读和了解上面7.2章节关于xarm系列的标定示例,然后使用下面列出的替换文件应用于lite6的标定:
Expand All @@ -719,6 +719,14 @@ $ roslaunch d435i_xarm_setup d435i_lite6_auto_calib.launch robot_ip:=your_xArm_I
标定结果发布启动文件示例:
[publish_handeye_tf_lite6.launch](./xarm_vision/d435i_xarm_setup/launch/publish_handeye_tf_lite6.launch)

### 7.2.2 手眼标定注意事项:
由于`easy_handeye`默认生成的机械臂位置的位姿变化不大,导致最终的标定结果可能不是太准确也不那么稳定。
在实际标定过程中我们可以不使用`easy_handeye`生成的位置,可以在上述命令指定启动参数`freehand_robot_movement:=true`启动,通过xarm studio控制界面或者开启拖动示教认为控制机械臂到不同位置,然后通过启动的手眼标定窗口的"__Take Sample__"采集数据,采集到大概17个数据后通过"__Compute__"计算,每次采集时机械臂的位置建议在保证标定板在视野范围内尽量多旋转rpy
- 两次运动的旋转轴的夹角越大越好
- 每次运动的旋转矩阵对应的旋转角度越大越好
- 相机中心到标定板的距离越小越好
- 每次运动机械臂末端运动的距离越小越好

## 7.3 3D视觉抓取示例:
本部分提供利用[***find_object_2d***](http://introlab.github.io/find-object/)进行简单的物体识别和抓取的示例程序。使用了RealSense D435i深度相机,UFACTORY camera_stand以及xArm官方机械爪。

Expand Down
15 changes: 12 additions & 3 deletions xarm_vision/d435i_xarm_setup/launch/d435i_lite6_auto_calib.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<launch>
<arg name="namespace_prefix" default="xarm_realsense_handeyecalibration" />
<arg name="robot_ip" doc="The IP address of the xarm robot" />
<arg name="kinematics_suffix" default="" />
<arg name="freehand_robot_movement" default="false" />
<!-- PLEASE USE THE PROPER MARKER CONFIGURATION ! -->
<arg name="marker_size" doc="Size of the ArUco marker used, in meters" default="0.1" />
<arg name="marker_id" doc="The ID of the ArUco marker used" default="105"/>
Expand All @@ -27,10 +29,17 @@
</node>

<!-- start the robot -->
<include file="$(find lite6_moveit_config)/launch/realMove_exec.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<include file="$(find uf_robot_moveit_config)/launch/_robot_moveit_realmove.launch">
<arg name="dof" value="6"/>
<arg name="robot_ip" value="$(arg robot_ip)"/>
<arg name="robot_type" value="lite"/>
<arg name="kinematics_suffix" value="$(arg kinematics_suffix)"/>
<arg name="show_rviz" value="false" />
</include>
<!-- <include file="$(find lite6_moveit_config)/launch/realMove_exec.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<arg name="show_rviz" value="false" />
</include> -->

<!-- start easy_handeye -->
<include file="$(find easy_handeye)/launch/calibrate.launch" >
Expand All @@ -42,7 +51,7 @@
<arg name="robot_base_frame" value="link_base" />
<arg name="robot_effector_frame" value="link_eef" />

<arg name="freehand_robot_movement" value="false" />
<arg name="freehand_robot_movement" value="$(arg freehand_robot_movement)" />
<arg name="robot_velocity_scaling" value="0.1" />
<arg name="robot_acceleration_scaling" value="0.1" />
<arg name="move_group" value="lite6" />
Expand Down
16 changes: 13 additions & 3 deletions xarm_vision/d435i_xarm_setup/launch/d435i_xarm_auto_calib.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<arg name="namespace_prefix" default="xarm_realsense_handeyecalibration" />
<arg name="robot_ip" doc="The IP address of the xarm robot" />
<arg name="robot_dof" doc="The degree of freedom of the xarm" />
<arg name="robot_type" default="xarm" />
<arg name="kinematics_suffix" default="" />
<arg name="freehand_robot_movement" default="false" />
<!-- PLEASE USE THE PROPER MARKER CONFIGURATION ! -->
<arg name="marker_size" doc="Size of the ArUco marker used, in meters" default="0.1" />
<arg name="marker_id" doc="The ID of the ArUco marker used" default="105"/>
Expand All @@ -28,7 +31,14 @@
</node>

<!-- start the robot -->
<include if="$(eval arg('robot_dof')==7)" file="$(find xarm7_moveit_config)/launch/realMove_exec.launch">
<include file="$(find uf_robot_moveit_config)/launch/_robot_moveit_realmove.launch">
<arg name="dof" value="$(arg robot_dof)"/>
<arg name="robot_ip" value="$(arg robot_ip)"/>
<arg name="robot_type" value="$(arg robot_type)"/>
<arg name="kinematics_suffix" value="$(arg kinematics_suffix)"/>
<arg name="show_rviz" value="false" />
</include>
<!-- <include if="$(eval arg('robot_dof')==7)" file="$(find xarm7_moveit_config)/launch/realMove_exec.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<arg name="show_rviz" value="false" />
</include>
Expand All @@ -39,7 +49,7 @@
<include if="$(eval arg('robot_dof')==5)" file="$(find xarm5_moveit_config)/launch/realMove_exec.launch">
<arg name="robot_ip" value="$(arg robot_ip)" />
<arg name="show_rviz" value="false" />
</include>
</include> -->

<!-- start easy_handeye -->
<include file="$(find easy_handeye)/launch/calibrate.launch" >
Expand All @@ -51,7 +61,7 @@
<arg name="robot_base_frame" value="link_base" />
<arg name="robot_effector_frame" value="link_eef" />

<arg name="freehand_robot_movement" value="false" />
<arg name="freehand_robot_movement" value="$(arg freehand_robot_movement)" />
<arg name="robot_velocity_scaling" value="0.1" />
<arg name="robot_acceleration_scaling" value="0.1" />
<arg name="move_group" value="xarm$(arg robot_dof)" />
Expand Down

0 comments on commit 59f2a25

Please sign in to comment.