Skip to content

How exactly is the PWM output of the PolynomialThrusterCurveController consumed by a hardware interface? #66

Answered by evan-palmer
SpaceSoarer90 asked this question in Q&A
Discussion options

You must be logged in to vote

The thruster hardware interface that you mentioned receives PWM commands and forwards these commands to ArduSub via MAVROS. Here is the relevant method. If you aren't using ArduSub and have direct control over the thrusters, you could implement an alternative hardware interface that directly applies the PWM commands.

The PWM is converted into an int here so that the hardware interface doesn't need to make any decisions regarding how to post-process the command. Functionally, this implementation achieves the same result as converting it into an int in the hardware interface; however, leaving the fractional part of the command may be confusing to users who expect to receive an int.

With reg…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@SpaceSoarer90
Comment options

@evan-palmer
Comment options

@SpaceSoarer90
Comment options

@SpaceSoarer90
Comment options

Answer selected by SpaceSoarer90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants