Took some time to get back to this, as responding meaningfully to this kind of detailed post takes a decent chunk of time.
That depends what you mean by “positive input”. ArduSub operates at the abstracted vehicle level, where the operator/pilot provides vehicle motion commands in the x/y/z/yaw/pitch/roll directions, and ArduSub converts those into relevant commands that are sent to the thruster ESCs. At the vehicle level, “positive input” corresponds to intended vehicle motions, and the signals that get sent to the ESCs depend on the active frame configuration and flight mode.
At the thruster level, the front of our thrusters is the more rounded side, where the cable comes in. ArduSub’s frame configurations are set up such that a thruster has positive contributions in the forwards direction of the thruster. Accordingly, if a thruster is pointing backwards relative to the vehicle then a “positive input” to that thruster will have a backwards effect on the vehicle motion, so the corresponding thrust factor (in the frame configuration) is negative.
At the ESC level, “positive input” just spins the motor in a particular direction. If that does not match the forwards direction for the thruster (which is what ArduSub intends, with our default frame configurations) then it can either be corrected for in hardware (by switching two of the thruster’s phase wires), or in software (by telling ArduSub to invert the signal it sends to that ESC).
Honestly I’m not certain, because
- we rarely operate without some form of feedback-based stabilisation/depth hold mode on,
- I don’t personally have much experience with a plain BlueROV2 Heavy,
- different revisions and variants (e.g. aluminium vs acrylic enclosures) of the vehicle will have slightly different mass and volume distributions, which moves the centers of gravity and buoyancy, and
- we tune to the water conditions and mass/volume distributions by adding and moving ballast weights on the bottom (e.g. salt water is more buoyant than fresh, so may need more ballast)
I expect this is an issue with the modelling, but it’s possible it’s a model simplicity problem rather than an incorrect application of the chosen model.
It’s worth noting that
- the ROV is designed (with buoyancy at the top, and weight at the bottom) to have a self-righting moment if it pitches or rolls unexpectedly
- there is more drag area near the top of the front face, which would contribute to some amount of upwards pitching force when moving forwards
- if the vehicle has forwards momentum but starts pitching then the top/bottom surfaces would increase the drag, which has a stabilising effect (but the most stable angle then depends on the speed)
- tether drag can also play a role
- fluid interactions between the thruster flows may also be relevant, and with asymmetrical thrusters like the T200s it may be non-negligible that the front thrusters are facing backwards, so when trying to move forwards there is more thrust coming from the rear of the vehicle
I’m not sure - it’s not something I’ve worked with. The only simulation-focused documentation I’m aware of is
I’m not aware of documentation for SIM_Submarine
specifically, beyond the comments in the source code files.
Unfortunately we don’t yet have decent documentation on the ArduSub components of the ArduPilot codebase, although that is something I’m planning to work on.
As a (brief) walkthrough of finding this particular information,
- ArduSub’s manual mode uses
motors.set_{motion}()
commands - searching for
set_roll
yields that it’s declared inlibraries/AP_Motors/AP_Motors_Class.h
, and sets an internal variable_roll_in
- searching for
_roll_in
we find that it is used withinAP_Motors6DOF.cpp
, which is where ArduSub’s thrust factors are defined (for frame configuration) - within that file it is used in three functions, the most relevant of which is
output_armed_stabilizing_vectored_6dof
(because the BlueROV2 Heavy is a 6DoF capable vehicle with vectored horizontal thrusters) - In that function, we find the motor mixing code
- note that it’s a bit unintuitive to follow, because ArduPilot was initially written for vehicles with no direct lateral control, so the extra motions have been somewhat shoehorned into the existing variables