Skip to content

adding raptor control policy - #29

Merged
spencerfolk merged 4 commits into
spencerfolk:mainfrom
Sheng-Cheng:raptor
Mar 7, 2026
Merged

adding raptor control policy#29
spencerfolk merged 4 commits into
spencerfolk:mainfrom
Sheng-Cheng:raptor

Conversation

@Sheng-Cheng

Copy link
Copy Markdown
Contributor

We implemented the raptor control policy from a recent paper titled "RAPTOR: A Foundation Policy for Quadrotor
Control"
.

Simply install raptor with
pip install foundation-policy==1.0.1
and run the example code:
python3 /examples/basic_usage_raptor.py

@spencerfolk
spencerfolk self-requested a review October 22, 2025 15:43

@spencerfolk spencerfolk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sheng-Cheng thanks so much for implementing Raptor in RotorPy. This is very cool and can't wait to try it myself.

I've added a few comments in the review on some changes required before merging. Nothing major.

Comment thread examples/basic_usage_raptor.py
Comment thread rotorpy/controllers/raptor.py

@spencerfolk spencerfolk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@spencerfolk

Copy link
Copy Markdown
Owner

Tests are failing because the raptor policy is not installed in the test environment. I need to figure out if certain scripts in examples should be ignored or if there is another better solution.

@Sheng-Cheng

Copy link
Copy Markdown
Contributor Author

Tests are failing because the raptor policy is not installed in the test environment. I need to figure out if certain scripts in examples should be ignored or if there is another better solution.

Perhaps add "foundation-policy==1.0.1" in pyproject (after stable_baselines

'stable_baselines3',
), that should solve the problem in my opinion, without the burden of having it as a hard dependency for users. In addition to adding it to the "testing" group maybe it would also make sense to add a "raptor" group that contains the "foundation-policy==1.0.1" dependency as well, such that users can do pip install rotorpy[raptor] instead of having to manually do "pip install foundation-policy==1.0.1".

@spencerfolk

Copy link
Copy Markdown
Owner

Yep I think what you proposed makes sense. I'm trying to be a bit more cautious with adding more specialized dependencies into rotorpy, just to reduce the dependency burden for ppl just looking for a lightweight python uav sim. I'll work on modifying the pyproject.toml file in the next week and we should be good to merge.

@spencerfolk
spencerfolk merged commit 957c29d into spencerfolk:main Mar 7, 2026
4 checks passed
@spencerfolk

Copy link
Copy Markdown
Owner

@Sheng-Cheng sorry that this took an embarrassingly long time to resolve. Your PR caught me right before my phd defense and I took a long break before taking another look at this tonight. Happy to have raptor as an option in rotorpy and if you have any other requests or things you want to implement feel free to let me know or open a PR!

@Sheng-Cheng

Copy link
Copy Markdown
Contributor Author

No worries, @spencerfolk ! Congrats on your PhD and thanks for the managing the PR! Best wishes to your future endeaver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants