# Shared eHMI: Bridging Human-Machine Understanding in Autonomous Wheelchair Navigation
## 3 Our Method
### Autonomous Wheelchair Simulation Platform  
To comprehensively evaluate the usability and practicality of the interaction design, we developed a dedicated autonomous driving simulation platform for conducting user tests and quantitative assessments. Our endeavor commenced with the modification of a consumer-grade electric wheelchair, culminating in the creation of an autonomous wheelchair simulation platform specifically tailored for user interface and interaction testing. Central to the simulation platform's control mechanism is a wheelchair smart board, which is essentially an ESP32 microcontroller. The host computer, communicating through a local area network, dispatched instructions pertaining to the rotation direction and velocity of the wheels to this microcontroller. In response, the microcontroller generated pulse width modulation (PWM) signals. After these signals were amplified by high-power MOS tubes, the output voltage reached 24 V. Variations in the duty cycle were employed to adjust the output voltage, consequently steering the wheel motors and harnessing differential control to facilitate wheelchair's movement for navigation. The primary software, conceived and operationalized within the Unity platform, ran seamlessly on a Windows computer. Leveraging the ultra-wideband (UWB) indoor positioning system [67], it ascertained the wheelchair's spatial coordinates. Concurrently, the system's orientation was derived from an IMU, effectuating a comprehensive closed-loop control over the wheelchair's positional and angular parameters. The experimental environment in Unity was meticulously architected with predefined wheelchair waypoints, coordinates for obstacles, and pedestrians' positions and trajectories to correspond directly with the real-world scenarios of wheelchair navigation. Upon initiating navigation, dynamic navigation route is generated based on the current position of the wheelchair, the waypoints, and the destination points set in the experiment. Wheelchair motion is categorized into two distinct states: linear motion and turning. If the angular difference between the wheelchair's current alignment and the immediate forward direction of the planned navigation route remains under a set threshold, the wheelchair perpetuates its linear motion, adjusting the differential wheel speeds to ensure path fidelity. Surpassing this threshold triggers the wheelchair into a turning state, momentarily halting forward motion. The wheels rotate in opposite directions until alignment is re-established, reverting the wheelchair back to its linear motion state. Navigation data, operational speeds, and other salient information are manifested as user interface components within Unity and projected onto the ground using a wireless mini-projector affixed to the wheelchair's side. The autonomous wheelchair simulation platform is shown in Figure 5, a demo video of the working simulation platform and its interactive behavior can be viewed in the supplemental file. Both the user interface and interaction design were sculpted within the Unity ecosystem. User interface components were crafted using Unity's canvas, with logic injections facilitating their dynamic visibility. In the algorithm implemented for the navigation path, the Unity built-in NavMesh component is utilized to calculate the path from the wheelchair through waypoints to the destination. The LineRenderer component is used to visualize the path. The DataExchanger component receives external data, such as position and angle, to update the wheelchair's position and rotation. Position updates are smoothed to avoid sudden movements. Additionally, dynamic adjustments to LineRenderer and the corresponding shader are made. These adjustments alter the visual effects of the navigation path based on the wheelchair's speed and automatically update the path according to the distance between the wheelchair and the waypoints.