Hello @MakanH420, which ESC are you using to control thrusters? If you are using one of the BR ones, like this one, here are the timing specifications:
Command | time μs |
---|---|
Initialize/Stop | 1500 μs |
Max forward | 1900 μs |
Max reverse | 1100 μs |
To command the thrusters for this ESC, you can use a fixed frequency and just change the duty cycle to match the desired timing. For more information, see how we did to command a custom servo here: Navigator Lib - PWM Outputs C++ - #4 by RaulTrombin
If you are using BlueOS with Navigator board, you can install the JupyterNotebook extension and run motor control example there.
If you are using different library and hardware to generate PWM, you’ll need to check how it’s setting the frequency, enable output, and check if duty cycle is correct.*
*Have you tried to swap this reverse_min/max values?
def test_thrusters(channels, forward_min=1500, forward_max=1900,
reverse_min=1100, reverse_max=1500, step=50):