# Center of Mass

{% hint style="info" %}
The center of mass significantly impacts the robot's maneuverability. Make sure to consider its effect on each subsystem *during the design stage*, rather than addressing it after the robot is built.
{% endhint %}

The [center of mass](https://en.wikipedia.org/wiki/Center_of_mass) (COM) or center of gravity (COG) of a robot is the mean location of all the mass of a robot.

<figure><img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2FYF8S4IBi8RoRNvyGTp4M%2Fimage.png?alt=media&#x26;token=39426210-5600-4d70-a81c-54540b358c0a" alt="" width="375"><figcaption><p>Robot in 3D Cartesian Coordinate System</p></figcaption></figure>

## Measuring COM Position

* Model the robot in CAD, and use a "measure"-type tool.]
* Lift the robot by the chassis using 2 fingers. When the robot balances on your fingers, the XY location of the COM will lie in the line formed by your 2 fingers.&#x20;
* [Hang](#hanging) the robot, and observe how the robot tilts to settle.

## Vertical COM Position (Z)

When a robot brakes, the friction between the wheels and the floor rapidly decelerates the robot (velocity is in the opposite direction of acceleration in this case). This creates a torque around the center of mass of the robot, jerking the back of the robot up. In many cases, the rear wheels lose grip with floor as well.

<figure><img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2F2Z9WTz5X5PcKRLcvCNSn%2Frobot_jump_v7.gif?alt=media&#x26;token=aa1c15bb-e717-4608-a7ee-e41430175e21" alt=""><figcaption><p>Example from <a href="https://youtu.be/AgGbRVwO2mA?si=g-fssw963Eb_-3xF&#x26;t=40">6105C Blackout Robotics Tipping Point</a></p></figcaption></figure>

To mitigate jerking ...

* lower the height of the COM off the ground
  * use lighter materials in the upper sections of the robot (ex. 1x1 L channels on arms, plastic screws / nuts)
  * use heavier materials in the lower sections of the robot
* decrease the max acceleration available to the driver
* implement motion profiling and other motor [control techniques](https://wiki.purduesigbots.com/software/control-algorithms)

<figure><img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2FEWYVEFUtmZtewYiy0LUe%2Fcom%20drawing%20v2.png?alt=media&#x26;token=cc6521fe-2838-402e-8bae-9ca264b6f46e" alt="" width="352"><figcaption><p>The magnitude of the <a href="torque">torque</a> is proportional to the height and magnitude of the braking/slowing force.</p></figcaption></figure>

## Horizontal COM Position (XY)

### Turning

<figure><img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2Ff72uyZIODrgk36wuk4Is%2Fimage.png?alt=media&#x26;token=6856e44b-ef4f-4769-9845-d8da26e257d3" alt="" width="375"><figcaption></figcaption></figure>

The [turning center](https://wiki.purduesigbots.com/software/odometry#tracking-theory-aka-odometry) of the robot is less predictable if the COM (in the horizontal plane) is far from the midpoint of all the wheels. Keeping the COM centered side-to-side and front-to-back ensures more stable and predictable turning.

### Hanging

| Robot Hanging                                                                                                                                                                                                                                                                                                                                                    | Simplified Diagram                                                                                                                                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2Frdxly4NMTmdqvNuLKFNC%2Fimage.png?alt=media&#x26;token=179416a6-9af1-4c96-9859-973563ddfae5" alt="" data-size="original"><br><a href="https://youtu.be/IVRtz8LhicI?si=SgqCc8fkVBB924wO">RI3D for Over Under by JHAWK</a></p> | <img src="https://3510336827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7yGVyBrcpSR8SDSikj%2Fuploads%2FXw7s19EwFzeK7BfcDHXs%2Fimage.png?alt=media&#x26;token=9ae4873e-874a-4ae3-ab45-7a66315cfab9" alt="" data-size="original"> |

The end effector used during a hang is typically implemented with a joint. If the horizontal COM is offset from the point where the robot hangs, the robot will tilt until the COM aligns directly beneath the hanging point.

### Control

To control the position of the COM in the XY plane ...

* place towers optimally after building the chassis
* add/remove weight selectively around the robot
