Animation and User Interaction

The animation of the steering wheel, speedometer, and tachometer was handled by ControlRig, which is an animation object inside Unreal Engine. It was set up with the skeleton that came with the Car Configurator project. To reduce the latency due to separation between input and output on client and server, a Flask server was developed on the client machine to transmit status data in real-time. When driving the vehicle, the steering wheel angle and vehicle velocity are sent to CARLA as JSON via REST API and VaRest, an Unreal Engine plugin for handling REST server communications. After receiving the JSON, the values are extracted, multiplied by a corresponding scaling factor, and applied to the ControlRig object, which results in the steering wheel, speedometer, and tachometer animation.

Since the speedometer tick is not displayed linearly, the value shown on the speedometer can be inaccurate. To indicate the user with the most-accurate velocity, a velocity display was added at the center of the speedometer and tachometer panel. Because the UI components inside Unreal Engine do not support stereo rendering, users can only see the left eye of the headset displaying the velocity using UI components. To overcome this limitation, text mesh was used to display the velocity. It was also used at the central control panel of the vehicle to display the status of autonomous driving, which can also be set by JSON from REST API.

The vehicle can produce dynamic engine sound as the velocity changes. The original sound wave was extracted from the Car Configurator project and edited using Audacity and FL Studio to get derived audio files for different states, such as accelerating and idle. Then, the audio of different states was mixed using SoundCue, an audio profile object inside Unreal Engine, as the velocity changed in real-time.