> For the complete documentation index, see [llms.txt](https://www.ctrlaltftc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.ctrlaltftc.com/homeostasis-by-thermal-equilibrium/what-is-homeostasis.md). Agents can also search and read this documentation through its [MCP server](https://www.ctrlaltftc.com/~gitbook/mcp).

# What is Homeostasis?

Introduction to the Homestasis library by FTC #19376 Thermal Equilibrium

Homeostasis is a library in development by FTC #19376 Thermal Equilibrium. Homeostasis aims to provide an easy way to rapidly implement advanced control techniques with as slight a headache as possible. The end goal for Homeostasis is to provide a one size fits all solution to control and state estimation in *FIRST* Tech Challenge.

We identified that, for the most part, one could very elegantly abstract most code for FTC control systems away, and with Homeostasis, we aim to provide a controls library that plays nicely with the majority of programming paradigms used in FTC, such as that of the [state machine](https://gm0.org/en/latest/docs/software/finite-state-machines.html) and [command-based](https://docs.ftclib.org/ftclib/command-base/command-system) paradigms.

Currently homestasis provides the following features:

* Implementations of many controllers
  * PID Control
  * Full State Feedback
  * Bang Bang Control
  * Basic, Gravity, and Arm Feedforward
* Estimation algorithms to improve sensor readings:
  * Low Pass Filter
  * Least Squares + Kalman Filter
* Many useful utilities such as the WPILib Motion Profile and functions to deal with angles.
* Systems to easily utilize the aforementioned algorithms in a unified way.
  * BasicSystem
    * A combination of an Estimator, Feedback, and Feedforward Controller
  * PositionVelocitySystem
  * A combination of (2) Estimators (one for position, one for velocity), (2) feedback controllers (one for position, one for velocity) and (1) Feedforward.

{% hint style="danger" %}
Currently homeostasis is in Beta and while in many cases it's algorithms have been confirmed to work very well, in some edge cases they could still potentially fail. Please let us know or create a github issue / PR if you encounter any issues at: <https://github.com/Thermal-Equilibrium/homeostasis-FTC>
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.ctrlaltftc.com/homeostasis-by-thermal-equilibrium/what-is-homeostasis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
