Background: We are attempting to remap the default joystick axes so the BlueROV2 Heavy can be controlled like an RC airplane or helicopter when in “Roll/Pitch” mode. We believe this is the most intuitive and versatile control configuration, as it allows for rapid controlled dives with full downward visibility when deploying from a boat.
Here is a diagram of our desired controller config in standard mode, and in Roll/Pitch toggle mode.
We tried modifying the “joystick.cpp” file in ardusub to redefine the control mappings, but after building our modded version of ardusub, these edits broke Roll/Toggle functionality. (After switching into Roll/Pitch mode, the vertical thrusters all immediately start pushing downward.)
Here’s our modified joystick.cpp file: joystick.cpp.txt (25.8 KB)
Blue Robotics Engineer Jacob also attempted to modify the joystick configuration, and sent us this ArduSub binary to try: ArduSub-v2.px4 (715.3 KB) But unfortunately, this binary behaved identically to ours above. The Roll/Toggle button caused all the vertical thrusters to begin pushing down simultaneously. (I never saw Jacob’s edits to the source, so I’m not sure if the problem was introduced in the same way by both of us.)
This thruster behavior doesn’t make sense to me. We’re just redefining control axes. Is there any other code within QGroundControl or elsewhere that interprets how the joystick control inputs are interpreted? Could editing the axes in joystick.cpp file also redefine them within the ardusub stabilization code, resulting in the runaway thruster behavior?
This is a frustrating issue. It seems so simple on the surface, but nothing can be easy…