Skip to content

FEAT: new actuator class for roll, throttle, and thrust vector control#965

Draft
zuorenchen wants to merge 11 commits into
RocketPy-Team:developfrom
ARRC-Rocket:enh/actuator-merge-rocketpy
Draft

FEAT: new actuator class for roll, throttle, and thrust vector control#965
zuorenchen wants to merge 11 commits into
RocketPy-Team:developfrom
ARRC-Rocket:enh/actuator-merge-rocketpy

Conversation

@zuorenchen

@zuorenchen zuorenchen commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Pull request type

  • Code changes (features)

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

New behavior

  • A new Actuator base class is added.

    • This class follows the implementation of air_brake
    • The actuator range can be clamped to limit
    • The actuator will be saturated to the rate limit (if the actuator demand_rate (a.k.a. sampling_rate) is discrete)
    • The actuator dynamics is modelled as a 1st-order low pass IIR filter (if the actuator demand_rate (a.k.a. sampling_rate) is discrete)
  • Inheriting the Actuator base class are

    • throttle: an actuator that applies a throttle gain value on top of motor thrust.
    • roll: an actuator that applies a magic / hand-of-god roll torque on the rocket
    • thrust vector: actuators that gimbal the motor thrust vector on x and y axis
  • New files:

    • actuator classes in new /actuator folder
    • prints for actuators
    • test_actuator (generated by copilot)
    • example applied on halcyon_flight_sim
  • Modified files:

    • rocket.py: implement add_actuator methods
    • flight.py: apply actuators on the ODEs

known issue

  • Throttling doesn't change the propellant mass flow. It is essentially throttling the ISP of motor.

Breaking change

  • Yes
  • No

Additional information

co-authored-by: RickyRicato rickywang44@gmail.com @chichunwang

…uash for RocketPy PR) (#7)

* Merge RocketPy 1.12 and add updates for balloon popping challenge (#8)

* Add actuator dynamics in TVC and ThrottleControl
authored-by: RickyRicato <rickywang44@gmail.com>

* Refactor actuator_tau parameters to use None as default in TVC and ThrottleControl
authored-by: RickyRicato <rickywang44@gmail.com>

* Add actuator dynamics to RollControl
authored-by: RickyRicato <rickywang44@gmail.com>

* Move actuators to a new actuator folder and rename actuator classes

* Refactor roll, throttle, and thrust vector acutator with a new actuator class

* Add pytest for all actuators

* Update rocket.py and flight.py for actuator class update

* Fix actuator class calls

* Update active control example with new actuator class

---------


Co-authored-by: RickyRicato <rickywang44@gmail.com>
@zuorenchen

zuorenchen commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

TODO:

  • Docs
  • Support rate_limit and time_constant in continuous controller ENH: Discrete and Continuous Controllers #946
  • Refactor air_brakes with Actuator class
  • Interact with multiple Actuator in a single controller
  • Implement in 3-DoF sim

@Gui-FernandesBR @giovaniceotto do you want this in a continuous improvement approach (leave the TODOs in future PRs), or complete all TODOs in one PR?

Feel free to send PRs to branch: /enh/actuator-merge-rocketpy in fork: ARRC-Rocket/ActiveRocketPy/ if you want to contribute more on this topic.

@zuorenchen zuorenchen changed the title ENH: new actuator class for roll, throttle, and thrust vector control FEAT: new actuator class for roll, throttle, and thrust vector control Jun 7, 2026
@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.28346% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.13%. Comparing base (9cf3dd4) to head (d6787a8).
⚠️ Report is 74 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/rocket/rocket.py 18.18% 27 Missing ⚠️
rocketpy/simulation/flight.py 54.83% 14 Missing ⚠️
rocketpy/prints/roll_actuator_prints.py 92.85% 1 Missing ⚠️
rocketpy/prints/throttle_actuator_prints.py 92.85% 1 Missing ⚠️
rocketpy/prints/thrust_vector_actuator_prints.py 92.85% 1 Missing ⚠️
rocketpy/rocket/actuator/actuator.py 97.87% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #965      +/-   ##
===========================================
+ Coverage    80.27%   81.13%   +0.86%     
===========================================
  Files          104      121      +17     
  Lines        12769    14806    +2037     
===========================================
+ Hits         10250    12013    +1763     
- Misses        2519     2793     +274     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zuorenchen zuorenchen force-pushed the enh/actuator-merge-rocketpy branch from a3472bc to d6787a8 Compare June 14, 2026 22:47
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.

1 participant