# CHARMIE: A Collaborative Healthcare and Home Service and Assistant Robot for Elderly Care
## 2 Materials and Methods
### Components
#### 2.2.2 Map Building and Self-Localisation  
To perform mapping of the environment, it is necessary to detect the points of interest known as keypoints. Additionally, to calculate travelled trajectory, it is necessary to quantify the movement occurred in-between frames. Rather than using all the pixels from an image to detect keypoints, the FAST [45] algorithm presents a computationally more efficient strategy than other similar solutions. This algorithm works by creating an adjustable bounding circle on every pixel that might resemble a corner. To be a corner, three nearby pixels inside the bounding circle must have a higher intensity than the fourth with a factor \(\mu\). Also, inside the bounding circle, there must be a set of collinear points with intensity higher than \(\mu\). These two conditions must be satisfied to consider this region a corner, and thus a keypoint. Next, to estimate the visual odometry using just the camera, since Microsoft Kinect does not have an IMU (Inertial Measurement Unit), the selected algorithm uses monocular odometry. It detects the keypoints using the FAST algorithm on consecutive frames and associates these between frames using essential matrix estimate through LMeds algorithm.  
The method selected to build the 3D map of the environment was using OctoMap [46], based on octrees to group all points. This method loses part of the detail, which translates into higher computational efficiency. For CHARMIE's purpose, it is more valuable to have  
Figure 7: CHARMIE’s sensorial description with all sensors’ location used on both the physical robot and the anthropomorphic implementation.  
a time-efficient algorithm than to have 3D mapping with great detail, since the robot only needs the map to safely navigate to the desired position. Figure 8 shows a point cloud converted into an OctoMap in three different perspectives representing an object on top of a table and a guitar next to the wall. Figure 9 shows an example of a complete indoor environment (office) mapped by CHARMIE.  
The mobile platform's self-localisation is done using Adaptive Monte Carlo Localization (AMCL) [47]. In this algorithm, the robot's pose is represented as a set of multiple hypotheses concerning a prior known map. AMCL combines the information from the mobile platform's odometry and the 2D LiDAR. It starts by performing global localisation, so it is immune to the initial position and, after knowing its location, only performs local tracking using adaptive particle filters.  
Figure 8: Three different perspectives (**a**–**c**) of the same two objects, a toy on a desk and a leaning guitar on a wall converted into an OctoMap to simplify mapping high detail objects.  
Figure 9: A complete map of an indoor environment, more precisely, an office. After some movement inside the office, CHARMIE created the OctoMap. In the middle of the image, a desk can be seen, two pillars on the bottom are speakers, and the remaining information is mainly regarding the walls. (**a**,**b**) demonstrate two different angles of the map.