## 4 Optimization Methods of Base Placement
### Generation of Occupied Grid Map and Inverse Reachability Map
#### 4.2.2 Inverse Reachability Map (IRM)  
The inverse reachability map is a useful tool for evaluating the grasping ability of a robotic arm in a specific location in space, based on various base placements. To obtain the IRM, the accessibility of the robotic arm must be analyzed. This involves creating a unified robot description format (URDF) model of the robotic arm, which contains information about the arm's joints, links, inertial and geometric properties, and collision model. The workspace is then divided into grids, with each voxel grid being subdivided based on its  
Figure 5: Cartographer algorithm flowchart. Figure 6: SLAM results: (**a**) occupied grid map of the elevator room; (**b**) top view of the actual scene in the elevator room. Each pixel point represents 0.05 m in Figure 5a. orientation and joint span. This study uses a URDF model of the WMRA with seven links and six joints, and the workspace is divided into 144,000 grid units, with a grid interval of 0.05 m [17]. The joint space of the robotic arm is discretized within each joint's restricted range, with a selected joint span of 22.5\({}^{\circ}\). By combining the rotational range of each joint, the joint space is traversed and calculated. The forward kinematics of the robotic arm is computed for each set of joint angles to obtain the spatial pose of the end effector relative to the base placement. To efficiently calculate a large number of kinematic solutions, this study uses the CUDA-based robotic arm kinematic solution algorithm [18] developed by the University of Michigan. After obtaining 104,658 forward kinematic results, the results are categorized based on the grid partition of the workspace. The number of forward kinematic results associated with each voxel grid unit is examined to determine the number of forward kinematic results per voxel grid unit [19]. The voxel grids that received forward kinematic results are classified and marked with different colors (red, yellow, green, or blue) to represent different numbers of results received. The specific results and classifications are presented in Figure 7.  
Upon obtaining the description of the arm's reachable space, we utilized a visual plugin offered by the Spatially Aware Manipulation [18] package to display the outcomes in RVIZ. The RVIZ visualization displays each sphere as the center of a unit grid, while the four colors demonstrate the reachability of the arm for that unit grid. Blue grids signify positions with the most forward kinematic solutions, indicating that the arm can reach that position in more poses. Green and yellow grids demonstrate lower reachability, while red grids indicate that the arm faces difficulties reaching that position or that it is a singularity point of the arm [20]. The RVIZ visualization results are presented in Figure 8a. Subsequently, we constructed the inverse reachability map after obtaining the arm's reachable space description. Initially, we determined the target point (x, y, z) of the end effector, which is obtained through user interaction by clicking on the location information of the target object. Figure 7: Voxel classification results. Color represents different reachability. Based on the reachability space description, we obtained the forward kinematics results of the arm for each unit grid at the current base placement. Here, (\(x,y,z\)) represents the position of the tool center point relative to the global coordinates, with the global coordinate system centered on the center point of the four wheels of the WMRA, representing the center position of the WMRA. As each pose in the reachability map is a transformation matrix (T) starting from the robot's origin, we could obtain the grasping ability description of the arm for a certain point in space at different base placements by inverting each forward kinematic transformation matrix and storing it as the IRM. As the mobile base of the armchair robot can only move in SE(2) space, we projected the IRM onto a 2D plane to obtain the IRM facing the mobile base, as shown in Figure 8b.