Mixed Reality Coaching for Barbell Squats
SquatMaster was an entry at the Meta Reality Labs Presence Platform Hackathon Event in London 24-27 April 2023, from a team comprising:
- Diarmid Mackenzie
- Tom Henchman
- Trimikha Valentius
The submission for the event consisted of
- a build of the code labelled v0.0.1 in this repo, published at https://squatmaster.netlify.app
- a video showing the app in action: https://youtu.be/MqmyWagB1O8
- an accompanying slide deck: https://shorturl.at/OQUV1
This entry placed in the top 5 (of 15 entries) at the event in London.
Barbell squats are an inherently risky activity, particularly when performed with heavy weights.
Performing barbell squats while wearing a Mixed Reality headset creates additional risks, as vision can potentially be compromised while using the headset
SquatMaster is a prototype, not a product, and has not been through any formal safety or risk assessments.
If you wish to use SquatMaster, we recommend for your safety that:
- if you are not already experienced with barbell squats, you seek advice on correct form from a knowledgeable coach, before beginning this exercise
- you only use SquatMaster with an empty bar, or light weights that you are very comfortable lifting
- you lift with safety bars in place, set at a suitable height to catch the bar without injury to you
- you ensure that your headset has high battery level (when the headset runs out of battery, passthrough will be disabled, leaving you unable to see without removing the headset)
- you lift with a spotter present, who can assist if you get into trouble.
However, even if following all these recommendations, it remains the case that:
git clone https://github.com/diarmidmackenzie/squatmaster.git # Clone the repository.
cd squatmaster && npm install # Install dependencies.
npm start # Start the local development server.
And open in your browser http://localhost:5000.
To build:
npm run build
A couple of URL parameters are available to control the experience:
Parameter | Effect |
---|---|
vr | Set to 'true' to show a virtual rack. Useful if you want to test the application and you don't have a real squat rack available. |
skip | Skips the calibration phase of the app, setting to typical default values, which may be suitable for some (but definitely not all) users. |
So for example:
https://squatmaster.netlify.app?skip=true&vr=true will skip calibration and show a virtual squat rack.
Events generated by bar-monitor. Listen for these on <a-scene>
Event | Description | Detail |
---|---|---|
entered-rack | Lifter has entered the rack | None |
exited-rack | Lifter has existed the rack | None |
reached-hooks | Lifter has reached the hooks (shoulders beneath bar, head beyond the bar) | None |
left-hooks | Lifter has moved away from the hooks. They may have left the bar on the hooks, or shouldered it. | None |
shouldered-bar | Lifter has taken the bar onto their shoulders | None |
returned-bar | Lifter has returned the bar to the pins | None |
hit-top | Lifter has reached the top of a rep (or reached the start position for the first rep of a set) | None |
lowered-from-top | Lifter has begun the downward movement from the top (either beginning a rep, or returning the bar to the hooks) | None |
hit-target-depth | Lifter has hit target depth | None |
upwards-from-target-depth | Lifter is moving upwards after hitting target depth | None |
below-safety-pins | Lifter has gone below the safety pins. This indicates the end of the rep. For safety reasons, the app must insist very clearly that they now abandon the rep, unload the bar, and return it to the hooks. If the lifter doesn't follow these instructions, the app will have an incorrect view of whether they have the bar on their shoulders, which could be a serious safety issue. | None. |
bailed-out | Lifter has left the bar down on the safety pins. Note that app makes an assumption that the user has bailed out, and has not re-shouldered the weight after going below the safety pins. The app must make it very clear that the lifter should not be continuing with the bar on their shoulders, and must unload the bar, and return it to the hooks. | None |