Keywords

1 Introduction

Perceiving the three dimensional world is an essential capability for reconstructing unstructured environments and for autonomous mobile robots operating within them. The complexity of tasks like mapping or traversability estimation is strongly influenced by the properties of the used sensors. The availability of a suitable sensor system may considerable simplify a certain task. For example, the advent of cheap and ready-to-use RGB-D cameras (most notably the Kinect) fostered the progress in areas like object recognition, indoor 3D reconstruction and mobile manipulation.

For large scale outdoor areas, the available RGB-D sensors are less useful due to their illumination sensitivity and limited range. In contrast, laserscanners (or LiDAR) work independently of the lighting conditions and provide depth information for large distances. 2D laserscanners are established sensor systems for indoor robots and several off-the-shelf systems are available. In contrast, only few ready-to-use systems are available for obtaining three dimensional laser-based measurements, most notably the Velodyne Footnote 1 laserscanners and multi-layer scanners developed for advanced driver assistance systems.

However, these systems are expensive and/or provide low vertical resolutions, e.g. 4–64 layers. To obtain high-resolution scans at lower budget, several research groups built custom solutions by moving an off-the-shelf 1D [1, 2] or 2D laser sensor [38]. Although, there are repeatedly used configurations, for none of these custom solutions all the necessary information for replication are available. Therefore, in this paper, we

  1. 1.

    Discuss properties of possible configurations including a comparison to available commercial solutions.

  2. 2.

    Provide all the necessary information required for building a customized 3D laserscanners with off-the-shelf components (i.e. a 2D laserscanner) and ROS support. Only a few parts, for which technical drawings are provided, require manufacturing.

  3. 3.

    Propose a simple optimization framework to find the best alignment of the laser’s rotation axis for the task at hand.

Finally, we will show example results of 3D reconstructions using the presented sensor system on a mobile robot in different indoor and outdoor environments. The technical details and an implementation of the optimization framework as well as further supplementary material like videos will be available from our websiteFootnote 2.

2 Available Solutions and Related Work

Perceiving the environment can be accomplished with different hardware. 3D laserscanners have been established due to their positive properties like high ranges and illuminance independence. There are only few ready-to-use 3D laserscanners available. By offering scanning rates of 5–20 Hz they are suited for highly dynamic environments like urban streets [9]. The most popular 3D laserscanners are the VLP-16, HDL-32 and HDL-64 by Velodyne. Due to their valuable properties for advanced driver assistance systems (ADAS) there are further more specific 3D laserscanners like the ibeo LUX seriesFootnote 3. However, since these systems are expensive (Velodyne: 8, 000$ to 75, 000$) and offer only a small number of layers (Velodyne: 16-64, Ibeo: 4-8) there are many custom-made 3D laserscanners.

Custom sensors are typically built by rotating either a 1D [1, 2] or a 2D sensor [38]. Since building custom solutions for fast rotating a 1D sensor around two axes is more complicated and error-prone than slowly rotating a 2D sensor, the latter solution is usually preferred.

Dependent on the application, an oscillating motion of the 2D scanner (e.g. tilting in the range \([15^{\circ }, -15^{\circ }]\)) or a continuous rotation may be preferable. Although the continuous rotation requires additional hardware (i.e. a slip ring, cf. Sect. 3.3), it enables e.g. a 360\(^{\circ }\) surround view. In contrast to at most 64 layers with ready-to-use 3D laserscanners, dependent on the arrangement, a continuously rotating 2D scanner can provide more than 1000 vertical layers (e.g., vertically rotating Hokuyo UTM-30LX: 1080). Such high-resolution sensors are particularly suitable for tasks like object recognition [10] and traversability assessment [11].

Rotating a 2D laserscanner can be done in many different ways, however, usually the sensor is simply rotated by rolling or pitching [12]. We present an optimization method similar to [13]. They improve the 3D laserscanner by pitching the 2D sensor. In this paper, we extend their approach by additionally optimizing the rolling angle of the 2D laserscanner and the complete orientation of the rotation axis, this is the servomotor. Supplementary, we offer a concrete mechanical setup including a slip ring allowing continuous spinning. This is advantageous since a constant turn rate reduces mechanical strain by avoiding accelerations and improves the measurements by keeping the turn rate always constant. Nevertheless, the spinning rate can be changed if necessary.

3 Hardware Selection

This section presents the required hardware components to build a 3D laserscanner using a continuously rotating 2D scanner. In particular these are a 2D laserscanner, a servomotor, a slip ring, and the components for the mechanical linkage. In the following, we will present selected solutions for each component based on the experiences from our experiments. Additionally, available ROS drivers and a ROS package for 2D scan accumulation are referred which we use in our system.

3.1 2D Laserscanner

A 2D laserscanner consists of a spinning laser beam transceiver returning the distance to an obstacle by measuring the time of flight. Building an own 2D laserscanner is a challenging task due to the high rotation speed (e.g. 40rps), consequently, we highly recommend to use a purchasable sensor. There are different well suited commercial scanners. We have gained good experience with two different laserscanners from the manufacturer Hokuyo Footnote 4. Depending on the tasks, we can recommend both Hokuyo URG-04LX and Hokuyo UTM-30LX (see Table 1). Each sensor can be simply attached to a computer with USB2.0 and an external power supply. The Hokuyo URG-04LX is a low budget scanner (\(\sim 2,000\)$), however, it has a range of \(\le 4\) m which constrains its usage to small range tasks like indoor navigation. In contrast, the Hokuyo UTM-30LX (\(\sim 5,000\)$) promises a range of around 30 m, though, in our experience we noticed practically a smaller range of around 15 m to 20 m depending on the environment. Larger distances result in NaN-values (Not a Number). Nevertheless, this range can be considered sufficient for the most indoor applications and for many outdoor tasks, especially in semi-structured scenarios. Other often used 2D laserscanners are offered by SICK Footnote 5. A comprehensive characterization of the mentioned Hokuyo scanners can be found in [14, 15], and for the SICK LMS 200 in [16]. Of course, there might be other suited 2D laserscanners from different manufacturers. For running the 2D laserscanners in a system, there are drivers as ROS-packages for all newer ROS-versions, i.e. ROS hokuyo_node Footnote 6, ROS sicktoolbox Footnote 7.

Table 1. Technical details of two Hokuyo 2D laserscanners

3.2 Servomotor

Basically, a self-made 3D laserscanner can apply every rotating motor with a position sensor. However, a good solution is a servomotor which enables the laserscanner to target a direction and to receive the corresponding exact angle or rotation speed, respectively. For the application of rotating a laserscanner, we recommend the Robotis Footnote 8 Dynamixel series. Especially, we have gained good experience with the Dynamixel AX-12A and the Dynamixel MX-64R (see Table 2). Both servomotors can rotate in a Joint Mode which enables the user to control the angle, and in a Wheel Mode enabling the user to control the rotation speed. The Dynamixel AX-12A is low priced (\(\sim 50\)$) and possibly sufficient, but it tends to oscillate in Joint Mode. In contrast, the Dynamixel MX-64R (\(\sim 300\)$) showed to work stable and has a higher angular resolution, which is better for high distances. A corresponding ROS driver, providing a convenient interface, is ROS dynamixel_controllers Footnote 9.

Table 2. Technical details of two Robotis Dynamixel servomotors

3.3 Slip Ring

A slip ring enables the 3D laserscanner to rotate continuously. There are many different products at different prices and with different connections. However, we have chosen the SenRing Footnote 10 SNU11-P0210 (\(\sim 130\)$) which is a slip ring for USB2.0 and power supply.

Fig. 1.
figure 1

Left: The proposed 3D laserscanner setting. Right: The mechanical drawing of the proposed 3D laserscanner. The complete drawing can be found at our website. 1: servomotor Robotis Dynamixel MX-64R, 2: shaft servo - 2D laserscanner, 3: linkage servo - slip ring, 4: slip ring SNU11-P0210, 5: linkage shaft - 2D laserscanner, 6: Hokuyo UTM-30LX

3.4 Mechanical Linkage

For the mechanical linkage of 2D laserscanner, servomotor, and slip ring, we require at least three parts (Fig. 1): linkages between servomotor and slip ring (Fig. 1 number 3), servomotor and 2D laserscanner (Fig. 1 number 2), and a component to align the 2D laserscanner in a preferred angle in relation to the rotation axis (Fig. 1 number 5). You can find the mechanical drawings at our website.

3.5 A Complete 3D Laserscanner Setting

Figure 1 shows the complete 3D laserscanner using a Hokuyo UTM-30LX 2D laserscanner, a Robotis Dynamixel MX-64R servomotor, a SenRing SNU11-P0210 slip ring and the mechanical linkages depicted in Fig. 1 leading to an overall cost of around 5, 500$ (Velodyne HDL-32 \(\sim 30,000\)$). The hardware requires two USB connections as well as a 12V power supply. You can find the details for construction at our website. Feel free to download, rebuild, and modify it depending on your needs. In order to accumulate the 2D scans of the running system to get a full 3D scan, the ROS laser_assembler packageFootnote 11 can be used. The required bandwidth and processing power are similar to 2D scan acquisition, however, the resulting 3D point clouds are much larger.

We want to emphasize that the design of the linkage which aligns the 2D laserscanner in a specific angle (part 5 in Fig. 1) has important influence on the resulting distribution and density of distance measurements. Finding an optimal design is the content of the following section. Finally, Sect. 5 will show example results that can be obtained with the presented hardware setup.

4 Optimization of the Alignment

Basically, it is sufficient to rotate a 2D laserscanner in any possible alignment to acquire a 3D scan of the environment (except if it rotates around the scan plane normal). The two most applied alignments are the so called Rolling Scanning and Pitching Scanning [12] which can be considered as standard alignments using simple \(90^\circ \)-angles. As you can see in Fig. 2, the result is a 3D scan with one or two focus points, respectively. In these focus points, there is a higher measurement density (a locally higher angular laser beam resolution). For other directions, a lower measurement density is obtained.

While the total number of laser beams per rotation is constant, the particular setup of the angles in the mechanical linkages from the previous section strongly influence the distribution of the measurements. Dependent on the task at hand, a different setup may be preferable. E.g., think of a mobile outdoor robot that may not be interested in many distance measures towards the sky but could benefit from a particularly high density on the ground ahead. This is particularly interesting regarding the fact that a better distribution of measurements allows for faster rotation of the laser and thus higher scan rates.

In this section, we present a simple approach to find an optimal configuration for a particular task: Given a task specific target distribution of distance measurements (the user has to tell the system in which directions measurements are particularly important or not), we incorporate simplifying assumptions to allow an exhaustive search over the resulting configuration space. For each configuration, the laser scan density is computed and evaluated based on the target distribution for this task.

Fig. 2.
figure 2

Two simulated 3D scans with point cloud (top) and corresponding density map (bottom). Left: Rolling Scanning. Right: Pitching Scanning

However, it should be mentioned that, on the one hand, the Rolling Scanning is the only setting which enables the 3D laserscanner to return a complete 3D scan already after \(180^\circ \) rotation. On the other hand, every non standard alignment has the property that the scan lines cross each other avoiding large connected blind spot areas. The advantage is illustrated in Fig. 3: With crossing scan lines we can nearly not miss thin objects even for fast rotation speed of the servomotor, since we exploit the fast frequency of a 2D laserscanner in combination with its high angular resolution.

Fig. 3.
figure 3

Comparison of crossing and non-crossing scan lines. The complete \(360^\circ \) scan was acquired with a Hokuyo UTM-30LX 2D laserscanner (40 Hz frequency). Left: high resolution scan. Middle: 3D scan with crossing scan lines, acquired in approx. 2 s. Right: 3D scan with parallel scan lines, acquired in approx. 2 s - the red arrows mark an almost missing (left) and a missing object (right). (best viewed at high resolution) (Color figure online)

First of all, transformations (TF’s) inside the 3D laserscanner have to be defined. As one can imagine, low shifts in any direction inside the alignment has only a small influence on the resulting 3D scan in relation to rotations. Accordingly for simplification, we assume that each part is only rotated and not translated, since this accelerates the optimization by reducing the number of parameters. Consequently, all rotation axes have to cross in one point. However, the transformations can be easily modified by extending the rotation matrices R with translation vectors t. Accordingly, we define two rotation matrices:

  1. 1.

    \(R^{\text {world},\text {rot}}\) - Orientation of the spinning axis from the servomotor in relation to a world frame, called rotation frame. By definition, the servomotor rotates around the z-axis.

  2. 2.

    \(R^{\text {rot},\text {laser}}\) - Orientation of the scan plane from the 2D laserscanner in relation to the rotation frame, called laser frame. The x-axis points to the front of the scan plane, and the z-axis is parallel to the scan plane normal.

In the following subsections we describe the necessary steps in order to optimize the 3D laserscanner alignment

  1. 1.

    Simulating a 3D Laser Scan - Given a set of all possible parameters, a 3D scan has to be simulated for each combination.

  2. 2.

    Assessing a 3D Laser Scan - After simulating a 3D scan, it has to be assessed by a density map which represents the measurement point distribution.

  3. 3.

    Choosing the Optimal Alignment - In a last step, the density maps have to be transferred into assessment values \(J_k\in \mathbb {R}\). The minimal value represents the best alignment.

4.1 Simulating a 3D Laser Scan

The matrices \(R^{\text {world},\text {rot}}\) and \(R^{\text {rot},\text {laser}}\) are concatenations of the basic rotations \(R_x(\alpha )\), \(R_y(\alpha )\) and \(R_z(\alpha )\) around the axes x, y and z. With these basic rotations, we can define

$$\begin{aligned}&R^{\text {world},\text {rot}} = R_x(\alpha _\text {rot}) \cdot R_y(\beta _\text {rot}) \cdot R_z(\gamma _\text {rot}) \\&R^{\text {rot},\text {laser}} = R_z(\gamma _\text {laser}) \cdot R_y(\beta _\text {laser}) \cdot R_x(\alpha _\text {laser}) \end{aligned}$$

Accordingly, we receive six parameters \(\alpha _\text {rot}\), \(\beta _\text {rot}\), \(\gamma _\text {rot}\), \(\alpha _\text {laser}\), \(\beta _\text {laser}\), and \(\gamma _\text {laser}\). However, \(\gamma _\text {rot}\) describes the angle of the rotation of the servomotor, respectively, this angle is set for the simulation from \(0^\circ \) to \(360^\circ \) with \(T \cdot f\) steps, whereby T is the time for a full 3D scan and f is the frequency of the 2D laserscanner - e.g. Hokuyo UTM-30LX: \(f = 40\) Hz. We found a good choice for T to be 18 s in our specific setting. Furthermore, \(\gamma _\text {laser}\) is a redundant parameter as it follows a rotation around the z-axis although itself rotates around the z-axis, too. So, this parameter is not necessary and can be omitted.

In order to get single laser beams, a direction vector for each beam has to be computed. This can be done by rotating the concatenated rotation matrices around the scan plane normal by

$$\begin{aligned} R^{\text {world},\text {beam}}&= R^{\text {world},\text {rot}} \cdot R^{\text {rot},\text {laser}} \cdot R^{\text {laser},\text {beam}}_z(\gamma _\text {beam})\\&= \begin{bmatrix}{\varvec{n}}_x&{\varvec{n}}_y&{\varvec{n}}_z\end{bmatrix} \end{aligned}$$

The resulting rotation matrix \(R^{\text {world},\text {beam}}\) contains in its first column the direction vector \({\varvec{n}}_x\) which describes the laser beams. With these preliminaries a spheric 3D scan can be simulated as depicted in Fig. 2 by projecting the single laser beams onto a spheric surface by varying the parameters \(\gamma _\text {rot}\) and \(\gamma _\text {beam}\).

4.2 Assessing a 3D Laser Scan

Above, it is shown how a 3D laser scan can be simulated. The result is a point cloud projected onto a spheric surface. In the next step, this cloud can be transformed into a density map \(d = f(\theta ,\varphi )\) which contains the number of points per surface. This density map \(d(\theta ,\varphi )\) is calculated as follows. In a first step, the 3D scan is overlaid with a measurement grid defined by

$$\begin{aligned} {\varvec{x}}_\text {grid} = \begin{bmatrix} r \cdot \sin \theta \cdot \cos \varphi \\ r \cdot \sin \theta \cdot \sin \varphi \\ r \cdot \cos \theta \end{bmatrix} \end{aligned}$$

with

$$\begin{aligned}&r \ldots \text {radius sphere} \\&\theta \in \left[ 0^\circ \ldots 180^\circ \right] \ldots \text {vertical angle} \\&\varphi \in \left[ 0^\circ \ldots 360^\circ \right] \ldots \text {horizontal angle} \end{aligned}$$

For each grid point, we search all points within the 3D scan which are close to this point \({\varvec{x}}\) by applying a ball search. Thereby, we receive a density map \(d(\theta ,\varphi )\), an example can be seen in Fig. 2.

4.3 Choosing the Optimal Alignment

In order to optimize the alignment of the 3D laserscanner, for all K existing parameter settings a density map \(d_k(\theta ,\varphi )\) can be computed. Subsequently, the K density maps are transferred into an assessment value

$$\begin{aligned} J_k = \sum _{\forall \theta , \forall \varphi } g(d_k(\theta ,\varphi ), w(\theta ,\varphi )) \end{aligned}$$

The function \(g(\cdot )\) can be any reasonable function for summarizing the density map. We chose a logarithm in order to avoid sparse and extremely dense regions. By weighting the density map d with a weight function \(w(\theta ,\varphi )\), a desired field of view of the 3D laserscanner can be preferred. Finally, we chose the optimal assessment value and its parameters by

$$\begin{aligned} J_{opt} = \min _k J_k \end{aligned}$$

5 Results and Discussion

We use the presented 3D laserscanner on two of our autonomous mobile robots (Fig. 4). The sensors are applied for different navigation tasks like localization, mapping, and drivability assessment. The matched point clouds in Fig. 1 are solely acquired by the presented 3D laserscanner in combination with an ICP matching (iterative closest point).

Building a custom-made 3D laserscanner comes always along with small distortions. However, in order to get accurate 3D scans the system needs to know its exact alignment. Therefore, a calibration is necessary. Discussing this would be beyond the scope of this paper, however, you can refer to calibration publications for both rotating 2D laserscanners and 3D laserscanners [18, 19]. Furthermore, it could be interesting for some applications to add color information to the point cloud [2022].

Another important aspect one should be aware is the distortion of the 2D laser scans during a continuous rotation of the 2D laserscanner. A possible simple mathematical solution can be found in [23]: By combining alignment, rotation speed of the servomotor, and measurement frequency of the 2D laserscanner, the 2D scan can be rectified easily.

Fig. 4.
figure 4

3D point clouds acquired with the presented 3D laserscanner setup. The first row shows our mobile robots each equipped with the 3D sensor during a robot challenge called SpaceBot Camp 2016 [17], and a single 3D scan showing an indoor laboratory environment. From the second to the last row three semi-structured and unstructured environments are shown with their corresponding 3D point cloud. Each 3D scan was acquired with the presented 3D laserscanner and matched to the map with an ICP matching. Corresponding videos can be found at our website.

The advantages of a rotating 2D laserscanner compared to the available ready-to-use 3D laserscanners are the lower price as well as a wider vertical field of view (fov) and a higher vertical resolution achieved by using much more layers (Velodyne HDL-64/Hokuyo UTM-30LX: \(26.8^\circ \)/\(180^\circ \) vertical fov, \(0.4^\circ \)/\(0.25^\circ \) vertical resolution, 64/1080 layers). However, 2D laserscanners generate this number of layers by rotating a 1D laser beam transceiver whereas purchasable 3D laserscanners use multiple laser beam transceivers concurrently. Applying multiple distance measurements at the same time enables the ready-to-use systems to spin much faster with multiple scans per second. Depending on the horizontal resolution, a rotating 2D scanner may require several seconds – however, if a lower resolution is sufficient, e.g., for relocalization in a given map or observing a particular part of the world, higher update rates are possible. Hence, a system with rotating 2D laserscanner should not move during the scanning time, otherwise the resulting 3D scans are distorted if there is no accurate robot motion estimation. Accordingly, purchasable 3D scanners are suited for highly dynamic scenarios like urban street scenes, whereas spinning 2D scanners are well suited for perception tasks with the requirement of high accuracy and measurement density like traversability assessment or object recognition.

6 Conclusion

In this paper, we aim to accelerate the process of designing a custom-made 3D laserscanner, as this is done usually by different groups. Therefore, we offered a list of well suited hardware in combination with a mechanical drawing for the linkage which can be found at our website. Since it is important to target measurement points to an area of interest, we presented an approach to optimize the rotation axis orientation as well as the 2D laserscanner orientation. The explained method is offered as Matlab toolbox at our website, too. In the final section, some results achieved with our 3D laserscanner were shown. Again, supplementary videos are accessible at our website.