[solved] Reversed esc in gui results in incorrect motor bias




Due to our wiring installation, we had to reverse one of the horizontal thrusters via the GUI. We thought this was no problem as was mentioned in the construction guide. Well fast forward almost a year of troubleshooting this little guy for all sorts of issues, and now I think we have identified another software bug.

The amount of math done against the thrusters seems to lead to problems. I think it would be simpler to just pass through the command from the Cockpit to the Arduino but I guess OpenROV have their reasons.

Our latest problem is that in forward or reverse directions, one motor spins roughly twice as fast as the other. This makes flying the ROV almost impossible. By code and github issue inspection, I can see that you are doing some biasing to get a more linear response from the motors. OpenROV are already aware that this needs to be adjustable (issue #325) but another problem seems to be that this is applied backwards if the ESC is reversed in the OpenROV configuration.


Here is a video demonstration. You can see that for the starboard thruster, forward is slow and reverse is fast. The port thruster is the opposite, forward goes fast and reverse is slow. Try to ignore that one of our motors has a bearings problem and sounds horrible.


My plan is to copy the hardcoded bias from https://github.com/OpenROV/openrov-software/blob/462591babb844d922ee4f77b67043932e3850031/src/lib/config.js#L35 to /etc/rovconfig.json and hack on it until the motors sound right. I'm thinking that I just need to transpose the 1s and 2s for our starboard thruster.

I'd like to know what you think.



Hey Danny,

The motor bias configs are stored in the /etc/rovconfig.js file. You can manually change them there and then restart the cockpit process so send them down to the Arduino.

A lot of simplification to the motors has taken place in the latest released code. Are you on the latest release right now?


Hi Brian. Thanks for the quick reply!

I started playing with /etc/rovconfig.js but not sure that I got the syntax correct. Once I started testing, I noticed that I couldn't set any of the ESCs to reverse via the Diagnostics page. That is now the pressing issue.

When checking the software versions to write this reply, I see that the arduino is on 2.5.2 but Dashboard and Cockpit are on 2.5.1. Could that have something to do with my inability to effect reverse on the starboard thruster?

openrov-arduino-firmware 2.5.2-master.130.e59b0d6
openrov-cockpit 2.5.1-rc1-87
openrov-dashboard 2.5.1-59.2c0356

I'm seeing the reverse setting show up in /etc/rovconfig.json but the propeller still spins the same direction. I tried reversing the other thrusters as well, no joy. I also tried wiping out the rovconfig.json file and restarting the Dashboard.

How do I look at the settings sent to the arduino, to make sure that part is working? Or is my version mismatch enough of a problem to warrant a re-flash?


Hey Danny,

That is odd, but there are no changes in the 2.5.2-master repo so that won't be a factor. That said, that version should not be showing up on your ROV. Is this from the final version of the 2.5.1 software that was released last week?

The motor biases as received by the Arduino are supposed to get echoed back to the telemetry stream. It should show up as:

  • mtrmod1.00,-1.00,1.00,2.00,-2.00,2.00


I flashed a new microsd with the 2.5.1 release and reversing the thruster now works. The bias also looks good when one or more thrusters are reversed (reverse is slow on both as expected).

Thanks again for the quick replies!

I suspect that something I did along the way got the software into a weird state where the arduino firmware was no longer updated and out of sync with the ROV code. I have to apply some trim adjustments to the IMU code due to the way we mounted our sensor. Could that cause the arduino firmware to no longer be updated by the ROV software?

closed #6