Old Thruster Mixing - MRoboSub/mrobosub GitHub Wiki

Thruster Mixing

This module contains our custom flight controller code.

Code

thruster_node.cpp

  • ROS node for thruster mixing
  • Reads from output_wrench/{degree_of_freedom} for each of the 6 degrees of freedom
  • Parses params/fits.yaml for thrust to PWM conversion curve coefficients at different voltages
  • Parses params/thrusters.yaml for thruster position configurations
  • On topic callback:
    • Read updated value from message
    • Calculate the new normalized thrust matrix
    • Convert thrust matrix to pwm values
    • Publish to motor topic

ThrusterManager.cpp

  • Class methods for ThrusterManager Class
    • Calculate Thruster Matrices
    • Calculate Thrusts
    • Normalize Thrusts
    • Convert Thrusts to PWM values

Thruster.cpp

  • Class methods for individual Thruster Class
    • Calculate Thruster contribution to overall thrust
    • Convert thrust value to pwm value
    • Convert pwm value to thrust value
    • Bound pwm to valid range