Conversation
|
✅Static analysis result - no issues found! ✅ |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new adrc component providing Active Disturbance Rejection Control utilities: a Han tracking differentiator and four ADRC controllers (linear and Han nonlinear, first- and second-order), together with an example application and the corresponding documentation and CI wiring.
Changes:
- New
components/adrccomponent (header-only logic inadrc.hppplus stub.cpp, CMake, manifest, README, example). - Documentation added:
doc/en/adrc.rst,doc/en/adrc_example.md, Doxyfile entries, and index entry. - CI wiring:
build.ymlmatrix entry andupload_components.ymlupload entry.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| components/adrc/include/adrc.hpp | Core ADRC classes (TD + 4 controllers) |
| components/adrc/src/adrc.cpp | Empty translation unit including the header |
| components/adrc/CMakeLists.txt | Component registration requiring base_component |
| components/adrc/idf_component.yml | IDF component manifest |
| components/adrc/README.md | Component-level overview |
| components/adrc/example/CMakeLists.txt | Example project cmake |
| components/adrc/example/README.md | Example overview |
| components/adrc/example/main/CMakeLists.txt | Example main component registration |
| components/adrc/example/main/adrc_example.cpp | Simulated plants exercising all 4 controllers |
| doc/Doxyfile | Adds adrc header and example to Doxygen INPUT/EXAMPLE_PATH |
| doc/en/index.rst | Adds adrc entry to docs toctree |
| doc/en/adrc.rst | Long-form ADRC documentation and tuning guide |
| doc/en/adrc_example.md | Includes the example README |
| .github/workflows/build.yml | Adds ADRC example to CI matrix (esp32) |
| .github/workflows/upload_components.yml | Adds ADRC to component upload list |
Comment on lines
+165
to
+170
| /// Get the most recently computed state. | ||
| /// @return Current differentiator state. | ||
| const State &get_state() const { | ||
| std::lock_guard<std::recursive_mutex> lk(mutex_); | ||
| return state_; | ||
| } |
Comment on lines
+172
to
+177
| /// Get the active differentiator configuration. | ||
| /// @return Current configuration. | ||
| const Config &get_config() const { | ||
| std::lock_guard<std::recursive_mutex> lk(mutex_); | ||
| return config_; | ||
| } |
Comment on lines
+302
to
+307
| /// Get the current controller state. | ||
| /// @return Current state. | ||
| const State &get_state() const { | ||
| std::lock_guard<std::recursive_mutex> lk(mutex_); | ||
| return state_; | ||
| } |
Comment on lines
+309
to
+314
| /// Get the active configuration. | ||
| /// @return Current configuration. | ||
| const Config &get_config() const { | ||
| std::lock_guard<std::recursive_mutex> lk(mutex_); | ||
| return config_; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
How has this been tested?
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.Hardware