粗标定
realsense和雷达外参的粗标定,也就是laser
坐标系和camera_color_optical_frame
之间的相对位姿,但如果realsense是低着头,竖直和横向的相对位姿的测量误差就大了。
使用realsense检测贴在墙上的二维码,获得距离,同时使用雷达检测到墙的距离,让雷达尽量正对二维码位置。
雷达到前方距离: 1.288,对应realsense的z值: 1.119,二者差 0.169
用直尺测量高度的差: 0.125
横向: realsense在雷达左侧 0.035
如果laser
为父坐标系,二者的变换矩阵为
但realsense的坐标系体系是 camera_link
—-> camera_color_frame
—-> camera_color_optical_frame
,其中1
2
3
4
5camera_link camera_color_optical_frame
- Translation: [0.000, 0.015, 0.000]
- Rotation: in Quaternion [-0.498, 0.502, -0.498, 0.502]
in RPY (radian) [-1.571, 0.008, -1.570]
in RPY (degree) [-89.992, 0.476, -89.975]
所以不能直接建立laser
坐标系和camera_color_optical_frame
的父子关系,要建立laser
和camera_link
的。
使用变换矩阵的计算,已知 , 。 计算
结果转为tf格式,应当为 <node pkg="tf" type="static_transform_publisher" name="laser_camera_broadcaster" args="0.169 0.02 -0.125 0 0 0 laser camera_link 100"/>