Implement actuator module#8
Open
chichunwang wants to merge 22 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new actuator abstraction and concrete actuator implementations (roll, throttle, and thrust vector control) to support active control workflows in RocketPy, replacing the previous standalone TVC/throttle/roll control classes and wiring the new actuators into Rocket and Flight.
Changes:
- Added a new
rocketpy.rocket.actuatormodule (baseActuator+ Roll/Throttle/TVC actuators, including rate limiting and first-order dynamics). - Updated
Rocket/Flightto use the new actuator objects and renamed TVC integration tothrust_vector_control. - Added unit tests for actuators and updated the active-control example notebook accordingly; removed legacy control classes and their print helpers.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 26 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/rocket/test_actuators.py | Adds unit tests for the new actuator classes and dynamics/validation. |
| rocketpy/simulation/flight.py | Updates flight dynamics and reset logic to use thrust_vector_control and new actuator interfaces. |
| rocketpy/rocket/rocket.py | Switches rocket control-component creation to actuator classes; introduces add_thrust_vector_control and updated roll/throttle control creation. |
| rocketpy/rocket/actuator/actuator.py | Adds the shared actuator base class (range limiting, rate limiting, optional 1st-order dynamics). |
| rocketpy/rocket/actuator/roll.py | Adds roll actuator implementation built on the new base class. |
| rocketpy/rocket/actuator/throttle.py | Adds throttle actuator implementation built on the new base class. |
| rocketpy/rocket/actuator/thrust_vector.py | Adds 1D and 2D thrust-vector actuator implementations. |
| rocketpy/rocket/actuator/init.py | Exposes actuator types at the package level. |
| rocketpy/prints/thrust_vector_actuator_prints.py | Adds print helpers for the thrust vector actuator. |
| rocketpy/prints/throttle_actuator_prints.py | Adds print helpers for the throttle actuator. |
| rocketpy/prints/roll_actuator_prints.py | Adds print helpers for the roll actuator. |
| rocketpy/rocket/tvc.py | Removes legacy TVC component (superseded by actuator module). |
| rocketpy/rocket/throttle_control.py | Removes legacy throttle control component (superseded by actuator module). |
| rocketpy/rocket/roll_control.py | Removes legacy roll control component (superseded by actuator module). |
| rocketpy/prints/tvc_prints.py | Removes legacy TVC print helper. |
| rocketpy/prints/throttle_control_prints.py | Removes legacy throttle control print helper. |
| rocketpy/prints/roll_control_prints.py | Removes legacy roll control print helper. |
| docs/examples/halcyon_flight_sim_active_control.ipynb | Updates the active-control example to the new API (add_thrust_vector_control, new actuator behavior/plotting). |
Comments suppressed due to low confidence (1)
docs/examples/halcyon_flight_sim_active_control.ipynb:524
- Notebook kernel metadata is environment-specific; other example notebooks use a generic display name (e.g., "RocketPy"). Keeping this consistent reduces noisy diffs.
Open
zuorenchen
approved these changes
Jun 14, 2026
zuorenchen
left a comment
Member
There was a problem hiding this comment.
- Fixed comments from copilot
- Fixed pylint
- Fixed pytests (PR in #9)
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.
Summary
This PR implements the actuator-related features and prepares them for the active control simulation workflow.
Main changes
Testing
Branch
Source branch:
enh/actuatorTarget branch:
develop