# Research on Visual Positioning of a Roadheader and Construction of an Environment Map
## 2 Positioning Foundation of the Roadheader and Modeling  
### Definition of Coordinate System and Pose  
The positioning problem of a roadheader is transformed into a state estimation problem in this paper; that is, to solve the optimal pose. To accurately describe the pose of a roadheader in three-dimensional (3D) space, a series of coordinate systems need to be established, an earth coordinate system \(\rm{O_{e}Xe_{x}Y_{e}Z_{e}}\), roadway coordinate system \(\rm{O_{t}X_{t}Y_{t}Z_{t}}\), world coordinate system \(\rm{O_{w}X_{w}Y_{w}Z_{w}}\), and camera coordinate system \(\rm{O_{c}X_{c}Y_{c}Z_{c}}\). The \(\rm{O_{e}}\) system is fixed on the earth, which is the basis of the design of the roadway; the \(\rm{O_{t}}\) system is the absolute reference of the location in the roadway, and its position is determined by the structure of the roadway; the O\({}_{\rm w}\) system is the reference frame for the pose description of an airborne camera when it is moving, and the O\({}_{\rm c}\) and O\({}_{\rm w}\) systems are related to rotation and translation. As the input device of visual SLAM, an RGB-D camera can be installed in the sensing system of a roadheader through intrinsic safety technology. Considering that the camera is connected to the roadheader body, the pose of the roadheader's body is expressed by the pose of the RGB-D camera relative to the O\({}_{\rm w}\) system. If the absolute pose of the roadheader body in the O\({}_{\rm t}\) system or the O\({}_{\rm e}\) system is required, it can be obtained using Euclidean coordinate transformation. In addition, the pose of the cutting head of a cantilever roadheader can be solved according to the Denavit-Hartenberg model and forward kinematics in robotics [21]. In sum, the pose acquisition of a roadheader body in the O\({}_{\rm w}\) system is the basis for realizing other functions. At the initial moment, it is stipulated that the O\({}_{\rm c}\) and O\({}_{\rm w}\) systems are coincident. The X\({}_{\rm w}\) axis of the O\({}_{\rm w}\) system is located in the horizontal plane and is perpendicular to the roadway midline, pointing to the right of the heading direction. The Y\({}_{\rm w}\) axis is located in the horizontal plane and is parallel to the roadway midline, pointing to the heading direction; the Z\({}_{\rm w}\) axis is perpendicular to the horizontal plane and points to the roadway roof. After the roadheader moves, the pose of the O\({}_{\rm c}\) system changes relative to the O\({}_{\rm w}\) system, and the pose of the roadheader body (camera) is described by axis deflection angles \(\alpha\), \(\beta\), and \(\gamma\), and axis displacements \(t_{\rm x}\), \(t_{\rm y}\), and \(t_{\rm z}\), as shown in Figure 2. \(\alpha\) is defined as the included angle between the projection of the axis in the tunneling direction on the O\({}_{\rm w}\)X\({}_{\rm w}\)Y\({}_{\rm w}\) plane and the Y\({}_{\rm w}\) axis, namely the yaw angle (Figure 2a). \(\beta\) is defined as the included angle between the projection of the axis in the tunneling direction on the O\({}_{\rm w}\)Y\({}_{\rm w}\)Z\({}_{\rm w}\) plane and the Y\({}_{\rm w}\) axis, namely the pitch angle (Figure 2b). \(\gamma\) is defined as the included angle between the projection of the transverse axis of the roadheader on the O\({}_{\rm w}\)X\({}_{\rm w}\)Z\({}_{\rm w}\) plane and the X\({}_{\rm w}\) axis, namely the roll angle (Figure 2c); \(t_{\rm x}\), \(t_{\rm y}\), and \(t_{\rm z}\) are, respectively, the displacement of the roadheader body in the direction of X\({}_{\rm w}\), Y\({}_{\rm w}\), and Z\({}_{\rm w}\) axes (Figure 2d-f). Figure 2: Pose parameters of roadheader body (camera). According to rigid body kinematics, the motion of a roadheader can be decomposed into rotation and translation. The rotation of the body (camera) in the O\({}_{\rm W}\) system is described by rotation matrix \(R\); \(R_{\rm cw}\) means the rotation transformation from the O\({}_{\rm W}\) system to the O\({}_{\rm c}\) system.