Yuxuan’s Status Report for 04/29/2023

This week I mainly worked with Xiao to do the testing. My main focus is on latency. Previously the testing method is inserting time.time() before sending and after receiving the request and find the time difference divided by 2. However, this method seems to have some flaws since it isn’t necessary that send and receive times are equal.  Therefore, we again used the slow motion camera to measure the time the button is pressed and the time input changes on the screen.  The result hovers around 116-125ms which is around 6 times worse than our design requirement of 20ms. A few improvements we later discussed can be reducing the response message length to minimum and removing all the prints on the screen. We also make sure that the latency should be tested at different distances.
Next week, we will refine our testing and start working on the poster and final report. I will also try to invite 3 users to test our product.

Team Status Report for 04/22/2023

This week we’ve been integrating hardware, gyro algorithm, and software pieces together into a runnable game controller. Xiao has 3D printed a steering wheel case that encloses all the hardware components and wirings of the controller. Qiaoan has been working on the gyro tuning and refining the algorithm. There were some subtle bugs in our implementation of the  Magwick algorithm which Qiaoan fixed this week. Yuxuan has been working on the lagging game data issue and was able to fix it by writing the data first into a file and reading them separately.

So far, we have a running mobile steering controller that controls the car via Bluetooth when buttons are pressed and when the steering wheels are rotated. The short demo video can be found at https://www.youtube.com/watch?v=I0n3i1ka-VY.

Since we are still working on our final presentation so we haven’t done any quantitative tests yet, but the details of the test procedure will be included in the presentation. Next week’s focus will be following the test procedure and gathering quantitative test results. We also need to start working on the final report early to ensure its quality.

Yuxuan’s Status Report for 04/22/2023

This week I’ve been focusing on solving the lagging game data that I encountered last week when I was trying to let PC send car outgauge data to the dashboard connected to the Pi. I fixed the issue by separating the data reading and writing logic on PC side. There is a program that specifically writes game data to a file without blocking. Then, there is another program that reads the data continuously from the file and then sends them back to the Pi.

In addition, I updated the readme file on the github repo that includes the workflows for running the dashboard programs. Though I haven’t gathered quantitative data, from my personal experience in testing, the dashboard on Pi reacts much more quickly to speed changes in the game than last week. 

As shown on the screenshot, when the speed is at 39 km/h, the needle on the dashboard is also pointing at a bit under 40.

Next week, I will work with other team members to debug the system and implement codes for testing.

Team Status Report for 04/08/2023

 

This week we’ve been working on the remaining features of our mobile controller after the interim demo. We discussed our remaining tasks to focus on and updated the Gantt chart.

On the hardware part, Xiao has been working on modeling a new case that can fit existing electronic components into it. On the gyroscope system side,  Qiaoan has been making efforts to implement and test the Madgwick filter to make the readings more accurate. On the rest of the software part, Yuxuan has been working on integrating the dashboard GUI onto the display connected to our RPi controller.

Next week we are going to continue working on these pieces which we are going to put together the week before the final presentation. We need also need to discuss the testing and validation requirements for the final presentation.

 

 

Yuxuan’s Status Report for 04/08/2023

This week I’ve been focusing on reading the data from the game and updating the data on display.  So far, I’ve been successful in reading car data such as speed and rpm from the game through it’s outgauge protocol. On the display side, I’ve found a car dashboard template implemented in HTML, CSS, and Javascript that changes once keys are pressed. I’m working on integrating the template into our own project such that when car data is received from the PC on Pi, a JS function will be triggered to refresh the dashboard page.

I’m currently on schedule as now my focus will be adjusting the GUI for the display on the controller. Next week I will continue to work on the integration and test the display effects on the second screen we bought last week.

Yuxuan’s Status Report for 04/01/2023

This week I’ve been focusing on integrating the Bluetooth connection module with the emulator mappings. RPi and laptop can now use Python via Bluetooth by sending JSON packets that encode the raw button input format. On the PC side, after receiving the packets, the program can decode the value and maps the keys in JSON to the emulator which presses or releases a button based on the values of the raw button input in the JSON packet.  I also updated the README on Github which details how to pair RPi to the laptop.

The next step for this weekend is to continue to work with my team members to integrate the hardware part, especially the button reading section into the program. Once the real button values are encoded in JSON packets and sent to laptop, we will have a full pipeline for interim demo.

Team Status Report for 03/25/2023

Last week all the team members are continue designing and implementing both hardware and software. Our team members also gathered together to discuss what we have learned from the ethics assignment and considered worst-case scenarios when our product is used badly.

The hardware system part has made progress in wiring and is expected to be finalized by this weekend. The gyroscope system has generated the design on processing raw data from angular velocity and accelerations to degree output. For now the workflow of geroscope system is finished with design part, the next step will be start testing once the hardware system is ready. The program on RPi works well for now but there are still some issues with the packages on the PC that needs to be resolved. We are all working on our pieces so a reasonable prototype can be put on during the interim demo.

Our team is still a bit behind schedule as the interim demo is approaching. We need to have more meetings next week to synchronize our progress and discuss in what way we should present our progress during the interim demo.

Yuxuan’s Status Report for 03/25/2023

This week I’ve successfully installed and tested the Bluetooth module on Raspberry Pi. It’s able to act as a Bluetooth client or a server. However, I’m still struggling to get the Bluetooth module to work on windows PC. The program will have OS errors only when calling certain functions. I’ve spent a significant amount of time following the solutions online, including installing Windows 10 SDK and installing build tools from Visual Studio to compile C++ code, but the error still exists for now. Some progress is made when testing with the controller emulator as the Xbox tester program can accurately detect the emulator’s input from the tester program as shown below.

https://drive.google.com/file/d/1a4xpNfXjKo9RPMEPMMTBzyBwYentaU0O/view?usp=share_link (Couldn’t upload images for some reason)

Next week, the primary focus will still be making sure the Bluetooth connection can be established. I’ve just found another solution that simply uses the socket library with Python 3.9+ on Windows 10 to establish a Bluetooth connection. There are only a few discussions about it online but still worth a try. The next step will be talking with Xiao and Qiaoan so we can agree on the data format to be sent between RPi and PC. My initial plan is to use json. I’m still a little behind the schedule due to the problems with bluetooth package on PC. I will catch up as much as possible to make sure the Pi can control the game on PC before interim demo.

 

 

 

 

Yuxuan’s Status Report for 03/18/2023

This week I spent some time reading the ethics papers and finishing the ethics assignments. I received the Windows PC this weekend and was trying to run the demo programs using the packages specified in the design. I also ordered a second RPi for pure sensor and software testing purposes. The PC also matched the minimum requirement to power up the game. I’m a bit behind the schedule this week as projects in other classes due this week took an unexpected amount of time. For next week, I will spend more time catching up on running and developing the programs based on the demo program on PC so that it can establish the Bluetooth connection and read data from the game.