Remapping Joystick Axis for BlueROV2 Heavy: UPDATE

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…

Have you had any luck since your last post?

No, unfortunately I haven’t had any more luck. I think that there is something outside of the joystick.cpp file that controls how control inputs are interpreted. But I’m not familiar enough with the codebase to know where to go from here.

It’s too bad. The current pitch/roll toggle implementation is so close to what we need. It just toggles the wrong stick.

As it is, the pitch and roll capability of the BlueROV Heavy are mostly useless.

I’m trying to do something similar… I don’t want to do any toggling. I want complete live 6-axis control with 2 sticks in my hands. One stick rotates in 3 dimensions, the other moves in 3 dimensions. To do that, I managed to fuse the input from two 3-axis joysticks, making a single 6-axis virtual device. This works fabulously under windows and in games. (The method is vJoy + UCR. Tutorials are easily found on youtube).

QGroundControl recognizes my 6-axis joystick device and picks up input from each of the 6 axes correctly, under “Axis Monitor” to the right. It shows all six axes numbered 0-5 literally right there, and they all move the sliders independently like they’re supposed to. But when I hit “calibrate”, it asks me only about 4 of them, 3x rotation, and 1x “throttle”.

Could it really be that there is no way to assign my remaining 2 axes to the “strafe” and “climb” directions?