## 3 On-Board-LiDAR-Sensor hTetro ROS Based System  
The proposed system is built on the ROS platform [23]. ROS provides the infrastructure and mechanism for ROS modules playing the roles as ROS nodes to communicate and control the hTetro hardware modules by ROS topics, ROS messages and ROS services. The ROS-based block diagram of the system is shown in Figure 4. The ROS master installed on Intel computer stick monitors the entire ROS system. Based on _/scan_ topics of LiDAR sensor node and prebuilt/map topics of map server node, path and shape planning node generates the _/plan_ topics. Using this _/plan_ topics, a navigation  
Figure 3: hTetro Single Block Dimension and morphologies. (**a**) Single Block Dimension, (**b**) seven hTetro morphologies, (**c**) I shape in vertical moving direction, (**d**) I shape in horizontal moving direction, (**e**) O shape. Figure 2: hTetro Hardware Architecture. node was created to achieve the smooth locomotion inside the prebuilt map. This ROS node will create plan commands denoted as _/plan_cmd_ and sends to Arduino controller. After receiving _/plan_cmd_, Arduino controls motor driver node by _/motor_control_ topics. The hTetro moving and morphology reconfiguration is based on _/path_plan_ and _/slape_plan_ topics, respectively. To navigate autonomously in ROS system, a map of the robot environment should be built. SLAM algorithm can do the mapping processes as Figure 5. Many SLAM methods have been proposed to achieve the purpose of building the map of robot environment. The first approach is based on monitoring the real-time position of the robot which is placed at any location of the environment during the map building process. The most commonly used method for this approach is the use of Gmapping [24; 25]. Odometry values that estimate the position of the robot can be obtained either by using data provided by the combination of a good sensor and a good computational algorithm or by the fusion of multiple sensors such as IMU, GPS or Encoders used in the motors. In most of the cases the robot pose in the Odometry frame gets drifted over the long run this is because of hardware defects and sensor noise, so it is not always advised to rely on the single sensor to estimate the robot pose. A filter algorithm such as adaptive Monte Carlo localization (AMCL) [26] can refine the Odometry information and maintain the relationship between the coordinates of global map and local map, Odometry, base link and robot block module frames in ROS systems. AMCL is the technique that uses particle filter in real-time filter out the noise in Odometry to estimate a more accurate position of the robot in the environment. In many robot platforms, the Odometry information is often difficult to compute accurately if it relies on the data provided by the wheel encoder because of the wheel slippage issues. To overcome this challenge, another approach that uses the high-speed and large range of view sensors to estimate and maintain the robot pose by matching the features of the positions derived from sensor data when the robot moves around the unknown area. The information about the translation, rotation and velocity of Odometry can be derived by using the feature detection and matching techniques. This approach is very similar to the construction of a panoramic view where  
Figure 4: ROS based system of hTetro. multiple partially overlapping view images are assembled to produce a large field of view image. One advantage of this method is that the real-time position information of the robot can be estimated from the matching features of visual sensor data without even depending on wheel encoders or imu sensors that often shows errors due to wheel slippage or interference in the external magnetic field. The disadvantage of this approach is that it requires a good quality laser sensor and the sophisticated real-time processes to detect the similarities between frames.