Skip to content

Decouple core data types from ROS#4

Open
OliverWu515 wants to merge 1 commit into
masterfrom
refact-decouple
Open

Decouple core data types from ROS#4
OliverWu515 wants to merge 1 commit into
masterfrom
refact-decouple

Conversation

@OliverWu515

@OliverWu515 OliverWu515 commented May 22, 2026

Copy link
Copy Markdown
Owner

Split the monolithic ommpc_controller package into two independent packages:

  • ommpc_core: ROS-free MPC core (controller [reference setting & thrust normalization], MPC wrapper & solver, types, math)
  • ommpc_ros: ROS adapters (MAVROS interface, param loading, FSM example)

Also improve the FSM design example with: (the complete FSM document is in misc/state_machine.txt)

  • has_takeoff_/has_land_ guards to prevent duplicate takeoff/land
  • consecutive_failures_ counter to prevent state bounce after MPC failure
  • Offboard mode check with safe fallback in takeoff/land transitions
  • Idle safe command (zero bodyrates + min thrust) when not in offboard
  • Trigger auto-reset at end of each callback cycle
  • Ctrl+C graceful shutdown via ros::ok() checks
  • Thrust estimation gating during TAKEOFF and LAND

Split the monolithic ommpc_controller package into two independent
packages:
- ommpc_core: ROS-free MPC core (controller, MPC wrapper, types, math)
- ommpc_ros:  ROS adapters (MAVROS interface, param loading, FSM example)

Also improve the FSM design example with:
- has_takeoff_/has_land_ guards to prevent duplicate takeoff/land
- consecutive_failures_ counter to prevent state bounce after MPC failure
- Offboard mode check with safe fallback in takeoff/land transitions
- Idle safe command (zero bodyrates + min thrust) when not in offboard
- Trigger auto-reset at end of each callback cycle
- Ctrl+C graceful shutdown via ros::ok() checks
- Thrust estimation gating during TAKEOFF and LAND

Document the complete FSM in misc/state_machine.txt.
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