Skip to content

Px4#4

Open
Tuxliri wants to merge 2 commits intoduckietown:mainfrom
Tuxliri:px4
Open

Px4#4
Tuxliri wants to merge 2 commits intoduckietown:mainfrom
Tuxliri:px4

Conversation

@Tuxliri
Copy link
Copy Markdown

@Tuxliri Tuxliri commented Dec 17, 2025

This pull request adds support for custom integrators to the Multirotor and PX4Multirotor classes, allowing users to provide their own integration routines instead of always using scipy.integrate.solve_ivp. This enables more flexibility and potential performance improvements, such as using fixed-step integrators like RK4. The default behavior remains unchanged unless a custom integrator is provided. Additionally, a test tolerance was slightly relaxed.

Custom integrator support:

  • Added a custom_integrator parameter to the Multirotor class, allowing users to specify a callable for state integration; if not provided, the default remains scipy.integrate.solve_ivp. The integrator function is now selected during initialization. [1] [2] [3] [4]
  • Updated the PX4Multirotor class to accept and forward the custom_integrator parameter, enabling custom integrators for PX4-based vehicles as well. [1] [2] [3]

Testing:

  • Relaxed the numerical tolerance in the test_batched_operators test from 2e-2 to 3e-2 to accommodate minor differences, possibly due to new integration options.

@Tuxliri Tuxliri marked this pull request as ready for review December 17, 2025 04:48
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