Skip to content

Implement actuator module#8

Open
chichunwang wants to merge 22 commits into
developfrom
enh/actuator
Open

Implement actuator module#8
chichunwang wants to merge 22 commits into
developfrom
enh/actuator

Conversation

@chichunwang

Copy link
Copy Markdown

Summary

This PR implements the actuator-related features and prepares them for the active control simulation workflow.

Main changes

  • Added actuator implementation
  • Updated actuator dynamics and operating limits
  • Prepared actuator module for simulation integration

Testing

  • Existing tests should be checked
  • Actuator behavior should be verified in simulation

Branch

Source branch: enh/actuator
Target branch: develop

Copilot AI review requested due to automatic review settings June 9, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.actuator module (base Actuator + Roll/Throttle/TVC actuators, including rate limiting and first-order dynamics).
  • Updated Rocket/Flight to use the new actuator objects and renamed TVC integration to thrust_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.

Comment thread tests/unit/rocket/test_actuators.py Outdated
Comment thread tests/unit/rocket/test_actuators.py
Comment thread tests/unit/rocket/test_actuators.py Outdated
Comment thread tests/unit/rocket/test_actuators.py Outdated
Comment thread tests/unit/rocket/test_actuators.py
Comment thread rocketpy/rocket/actuator/thrust_vector.py Outdated
Comment thread rocketpy/rocket/actuator/thrust_vector.py
Comment thread rocketpy/rocket/actuator/roll.py
Comment thread rocketpy/rocket/actuator/roll.py Outdated
Comment thread rocketpy/rocket/actuator/thrust_vector.py
@zuorenchen zuorenchen mentioned this pull request Jun 14, 2026

@zuorenchen zuorenchen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • Fixed comments from copilot
  • Fixed pylint
  • Fixed pytests (PR in #9)

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.

3 participants