Method for detecting attitude of unmanned vehicle in tunnel

文档序号:551873 发布日期:2021-05-14 浏览:2次 中文

阅读说明:本技术 一种无人驾驶车辆隧道内姿态检测方法 (Method for detecting attitude of unmanned vehicle in tunnel ) 是由 田光兆 郑奎 夏丹青 朱双双 党安佳 于 2021-04-08 设计创作,主要内容包括:本发明涉及无人驾驶车辆技术领域,尤其是一种无人驾驶车辆隧道内姿态检测方法,通过机器视觉的方式检测水平激光线在地面的投影,间接计算车辆与左右隧道壁的距离以及车辆纵轴与道路中心线的夹角,本发明方法容易实施,不受外界环境干扰,且可靠性和精度较高。(The invention relates to the technical field of unmanned vehicles, in particular to a method for detecting the posture of an unmanned vehicle in a tunnel.)

1. A method for detecting the posture of an unmanned vehicle in a tunnel is characterized by comprising the following steps: comprises the following steps of (a) carrying out,

(1) the camera is arranged right above the vehicle head, and the shooting direction is horizontal forward;

(2) mounting a horizontal laser instrument at the geometric center of the top of the vehicle, and projecting two criss-cross horizontal and vertical laser lines on the tunnel wall in the left front;

(3) adjusting the positions of the two laser lines to enable the camera to shoot the intersection point of the two laser lines;

(4) acquiring an RGB image through a camera, and generating a disparity map by utilizing a tool carried by the camera;

(5) carrying out straight line Hough transformation on the RGB image, detecting a horizontal laser line and a vertical laser line in an image space to obtain a straight line equation of the RGB image, and calculating an image coordinate of an intersection point O;

(6) in the image space, taking a point A on a horizontal laser line and taking a point B on a vertical laser line;

(7) substituting the image coordinates of the points O, A and B into the disparity map, and converting the three-dimensional space coordinate P of the point O through the disparity mapOThree-dimensional space coordinate P of point AAAnd three-dimensional space coordinates P of point BBThe origin of the space coordinate is at the optical center of the main lens of the camera, the horizontal right direction is the positive direction of an x axis, the horizontal forward direction is the positive direction of a y axis, and the vertical upward direction is the positive direction of a z axis;

(8) connection POAnd PBTo obtain a straight line POPBThe three-dimensional space equation of (a);

(9) a straight line POPBRespectively rotating along x, y and z axes to enable the axes to be completely vertical to an xy plane, and obtaining a rotation matrix T;

(10) to eliminate errors, P is addedAAnd PORespectively correcting by using rotation matrixes T to obtain corrected space points P A=T×PA,P O=T×PO

(11) Two points P in space AAnd P OConnect to obtain a straight line P AP OThe equation of the three-dimensional space,according to the three-dimensional space equation, projecting the space straight line to the xy plane to obtain a straight line f on the plane1

(12) In the xy plane, the position of the geometric center of the vehicle is known, and the geometric center is calculated to a straight line f1A distance of d1,d1I.e. the distance of the vehicle from the left tunnel wall, calculating a straight line f1The included angle with the y axis is a1,a1The included angle between the longitudinal axis of the vehicle and the left tunnel wall is obtained;

(13) by adopting the same method, the distance d between the vehicle and the right tunnel wall can be obtained2Obtaining the included angle a between the longitudinal axis of the vehicle and the right tunnel wall2

(14) The included angle a between the longitudinal axis of the vehicle and the center line of the lane can be approximate to a = (a)1+a2)/2。

2. The tunnel interior attitude detection method for the unmanned vehicle according to claim 1, characterized in that: the camera adopts a binocular vision camera.

Technical Field

The invention relates to the technical field of unmanned vehicles, in particular to a method for detecting the posture of an unmanned vehicle in a tunnel.

Background

When the unmanned vehicle runs in an open-air place, the attitude information can be acquired through the satellite positioning device. However, when the vehicle runs into the tunnel, the position and posture of the vehicle cannot be accurately acquired without the satellite signal. In this case, collision accidents are very likely to occur; at present, the conventional method is to approximately judge the position of a vehicle by measuring the distance between the vehicle and the left and right walls of a tunnel through a laser radar, but the relative included angle between the longitudinal axis of the vehicle and the central line of a road cannot be accurately detected, the state of the vehicle cannot be estimated in advance due to the lack of the parameter, and the occurrence of accidents is also possibly caused.

In order to accurately detect the vehicle posture (including the included angle between the longitudinal axis of the vehicle and the central line of the road and the distance between the vehicle and the left and right tunnel walls) in the tunnel, the invention adopts a horizontal laser instrument to project two horizontal and vertical white laser lines to the tunnel walls as marks, detects the projection of the horizontal laser lines on the ground in a machine vision mode, and indirectly calculates the distance between the vehicle and the left and right tunnel walls and the included angle between the longitudinal axis of the vehicle and the central line of the road.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: the invention provides a method for detecting the posture in a tunnel of an unmanned vehicle, which aims to solve the problems that the relative included angle between the longitudinal axis of the vehicle and the central line of the road in the prior art can not be accurately detected, the parameter is lacked, the state of the vehicle can not be estimated in advance, and accidents can be caused at the same time. The method is easy to implement, is not interfered by the external environment, has higher reliability and precision, and effectively solves the problems.

The technical scheme adopted by the invention for solving the technical problems is as follows:

a method for detecting the posture of an unmanned vehicle in a tunnel comprises the following steps,

(1) the camera is arranged right above the vehicle head, and the shooting direction is horizontal forward;

(2) mounting a horizontal laser instrument at the geometric center of the top of the vehicle, and projecting two criss-cross horizontal and vertical laser lines on the tunnel wall in the left front;

(3) adjusting the positions of the two laser lines to enable the camera to shoot the intersection point of the two laser lines;

(4) acquiring an RGB image through a camera, and generating a disparity map by utilizing a tool carried by the camera;

(5) carrying out straight line Hough transformation on the RGB image, detecting a horizontal laser line and a vertical laser line in an image space to obtain a straight line equation of the RGB image, and calculating an image coordinate of an intersection point O;

(6) in the image space, taking a point A on a horizontal laser line and taking a point B on a vertical laser line;

(7) substituting the image coordinates of the points O, A and B into the disparity map, and converting the three-dimensional space coordinate P of the point O through the disparity mapOThree-dimensional space coordinate P of point AAAnd three-dimensional space coordinates P of point BBThe origin of the space coordinate is at the optical center of the main lens of the camera, the horizontal right direction is the positive direction of an x axis, the horizontal forward direction is the positive direction of a y axis, and the vertical upward direction is the positive direction of a z axis;

(8) connection POAnd PBTo obtain a straight line POPBThe three-dimensional space equation of (a);

(9) a straight line POPBRespectively rotating along x, y and z axes to enable the axes to be completely vertical to an xy plane, and obtaining a rotation matrix T;

(10) to eliminate errors, P is addedAAnd PORespectively correcting by using rotation matrixes T to obtain corrected space points P A=T×PA,P O=T×PO

(11) Two points P in space AAnd P OConnect to obtain a straight line P AP OThree-dimensional space equation, according to the three-dimensional space equation, projecting the space straight line to xy plane to obtain straight line f on the plane1

(12) In the xy plane, the position of the geometric center of the vehicle is known, and the geometric center is calculated to a straight line f1A distance of d1,d1I.e. the distance of the vehicle from the left tunnel wall, calculating a straight line f1The included angle with the y axis is a1,a1The included angle between the longitudinal axis of the vehicle and the left tunnel wall is obtained;

(13) by adopting the same method, the distance d between the vehicle and the right tunnel wall can be obtained2Obtaining the included angle a between the longitudinal axis of the vehicle and the right tunnel wall2

(14) The included angle a between the longitudinal axis of the vehicle and the center line of the lane can be approximate to a = (a)1+a2)/2。

Specifically, the camera adopts a binocular vision camera.

The invention has the beneficial effects that: the invention provides a method for detecting the posture of an unmanned vehicle in a tunnel, which detects the projection of a horizontal laser line on the ground in a machine vision mode, and indirectly calculates the distance between the vehicle and the left and right tunnel walls and the included angle between the longitudinal axis of the vehicle and the central line of a road.

Drawings

The invention is further illustrated with reference to the following figures and examples.

FIG. 1 is a schematic view of the horizontal and vertical laser line positions of the present invention.

In the figure: LA. horizontal laser line, LB. vertical laser line, e.

Detailed Description

The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic views illustrating only the basic structure of the present invention in a schematic manner, and thus show only the constitution related to the present invention.

The general idea of the implementation of the invention is as follows: detecting the positions of two laser lines in an image space, and converting the positions into a three-dimensional space through visual calculation; obtaining a rotation matrix of the vertical laser line LB through posture adjustment in the resetting process of the vertical laser line LB; and correcting the space coordinate of the horizontal laser line LA by using the rotation matrix, projecting the horizontal laser line LA to an xy plane after the correction is finished, and finally calculating the distance from the geometric center of the vehicle to the tunnel wall and the included angle between the longitudinal axis of the vehicle and the center line of the lane in the xy plane.

The method comprises the following specific implementation steps:

(1) the binocular vision camera is arranged right above the vehicle head, the shooting direction is horizontal forward, and a damping device can be additionally arranged to avoid shooting smear;

(2) the horizontal laser instrument is arranged at the geometric center of the top of the vehicle, two crossed horizontal and vertical white laser lines are projected from the tunnel wall in the left front direction, and the horizontal laser instrument can project two horizontally and vertically crossed laser lines due to gravity;

(3) adjusting the positions of the two laser lines to enable the two lenses of the binocular vision camera to shoot the intersection point of the two laser lines, and enabling the intersection point to be in the center of the image as much as possible;

(4) acquiring RGB images by using a binocular vision camera, and generating a disparity map by using a binocular vision camera with a tool;

(5) carrying out straight line Hough transformation on the RGB image, detecting a horizontal laser line LA and a vertical laser line LB in an image space to obtain a straight line equation of the RGB image, and calculating an image coordinate of an intersection point O;

(6) in the image space, a point A is arbitrarily selected on a horizontal laser line LA, a point B is arbitrarily selected on a vertical laser line LB, and in order to avoid the influence of distortion, the positions of the two points AB are not suitable to be too close to an image edge E;

(7) substituting the image coordinates of the points O, A and B into the disparity map, and converting the three-dimensional space coordinate P of the point O through the disparity mapOThree-dimensional space coordinate P of point AAAnd three-dimensional space coordinates P of point BBThe origin of the space coordinate is at the optical center of a main lens of the binocular vision camera, the horizontal right direction is the positive direction of an x axis, the horizontal forward direction is the positive direction of a y axis, and the vertical upward direction is the positive direction of a z axis;

(8) connection POAnd PBTo obtain a straight line POPBThe straight line is theoretically completely vertical to the xy plane, but the straight line possibly has slight deviation due to the influence of installation errors and needs to be manually eliminated;

(9) a straight line POPBRespectively alongRotating the x, y and z axes to enable the axes to be completely vertical to the xy plane to obtain a rotation matrix T, wherein the rotation matrix T is used for correcting errors of a horizontal laser line LA space equation;

(10) to eliminate errors, P is addedAAnd PORespectively correcting by using rotation matrixes T to obtain corrected space points P A=T×PA,P O=T×PO

(11) Two points P in space AAnd P OConnect to obtain a straight line P AP OThree-dimensional space equation, according to the three-dimensional space equation, projecting the space straight line to xy plane to obtain straight line f on the plane1

(12) In the xy plane, the position of the geometric center of the vehicle can be obtained through measurement, and the geometric center is calculated to a straight line f1A distance of d1,d1I.e. the distance of the vehicle from the left tunnel wall, calculating a straight line f1The included angle with the y axis is a1,a1The included angle between the longitudinal axis of the vehicle and the left tunnel wall is obtained;

(13) by adopting the same method, the distance d between the vehicle and the right tunnel wall can be obtained2Obtaining the included angle a between the longitudinal axis of the vehicle and the right tunnel wall2Theoretically, the left tunnel wall, the right tunnel wall and the lane center line are parallel, a1=a2But due to error effects, they are not equal;

(14) therefore, the angle a between the longitudinal axis of the vehicle and the center line of the lane can be approximated as a = (a)1+a2)/2。

In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:定位方法、装置及设备、以及自动驾驶定位系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!