Home        Store        Learn        Blog

Custom joystick axis functions for BlueROV2 Heavy

Is it possible to customize the joystick axis assignments in Qgroundcontrol? I’ve got a heavy model, and I would like the controls to function like an RC aircraft (which is an extremely intuitive flight control mode.)

Here are the assignments I would like.

How can I assign these?

You can use the transmitter mode radio buttons in the upper right hand corner of the joystick setup page to remap some axes.

forward/lateral will always correspond to roll/pitch though, you can’t have the throttle axis interchanging with the forward axis.

I saw that. But unfortunately none of the predefined options are giving me what I want.

Is there any way to define my own mapping?

You can ignore the text and pictures, and just move the sticks that you want when it asks you about the axis assignments.

I experimented with this in the pool this morning, but I’m still not able to obtain the desired result. The Roll/Pitch toggle always switches the “forward” command with “pitch down.” So no matter what, I can’t pitch down and then accelerate forward simultaneously.

This is exactly opposite of how the pitch/roll toggle should be configured.

The ideal config for the Heavy BlueRov would be:
Left Stick: Always forward/reverse/yaw.
Right stick toggles between Pitch/Roll and Throttle/Lateral.

(I have seen the pitch-lock feature in stabilize mode, but the control configuration above is far more elegant and intuitive.It is has been used by R/C Airplanes and helicopters for decades.)

My goal is to quickly dive 100+ feet and locate a small artificial reef on the seafloor before we drift away from it. Diving nose first gives us the best speed, visibility and maneuverability. Here’s a example video of our typical dive profile.

Will we need to modify the code in Ardusub to do this with BlueROV Heavy?

Hi @StrikeLines, this is the way it works. I agree it might be more useful if it worked the way you want. Unfortunately, yes it will require modifying ArduSub and compiling it.

We modified the ArduSub source code in order to create a proper joystick configuration for the BlueROV2 Heavy, mentioned here.

We modified the joystick module code to toggle pitch/roll with throttle/Lateral on the right joy stick (Channels 2/3). Our modified (but untested) sub joystick.cpp file is here. (Our edits starting at line 91): https://codeshare.io/2WJR4E

Now that the code is edited, I’m having trouble getting it to build successfully. I followed the instructions here for setting up the build environment on Windows, but I’m getting errors when trying to build with Eclipse on Windows 7.

eclipse%20error .

Is Windows 10 required to build this? What else could be the issue?

I can send you a binary this week that will do what you want. You have selected the wrong base branch for this (not stable), and you will not have a great time trying to compile this on windows.

1 Like

Thank you. That would be great.

Is the ardusub-3.5 branch the correct one to fork? Also, for future reference, what is the preferred development environment for Ardusub? We’ve got Ubuntu and Mac machines in the office also.

Hi Travis,

Mac or Ubuntu should be fine, for windows you should use the WSL instructions.
The correct branch for development should be ArduSub-Stable, please rebase your changes over it if they are not rebased.
Since ArduSub uses an old compiler version, the instructions of ardusub official website are not valid anymore, we are working to update it soon, but if you install ARM gcc 4.9.2 it should be fine.

I did a small tutorial in a previous post, probably this can also help you:

ArduSub-v2.px4 (715.3 KB)
try this.

Thank you, but that one didn’t work. Upon toggling to roll/pitch mode, (in manual mode) the motors spin full speed vertical down despite the position of the right stick.

I’m sorry that didn’t work. How have you gotten along in the meantime?