Home        Store        Docs        Blog

Custom Thruster|Frame configuration

Hello, I have a custom frame and presently running QGC 3.5.2 & ArduSub 3.5.4. My frame is presently running as a BlueROV-Heavy 6DOF Vectored with 8 thrusters. Everything is operating fine other then my placement of Trusters #7/#8 during ascent/descent causes greater aft thrust then #5/#6. I am attempting to reduce the amount of thrust to just 7-8 during ascent/descent while leaving all other operations untouched. I modified the ‘libraries/AP_Motors/AP_Motors6DOF.cpp’, changing the factor from -1.0f to any other amount (-0.5f, even 0), compiled and uploaded, but appears to not have any affect. I have tried changing both the SUB_FRAME_VECTORED_6DOF & adding a custom (unsure how to QGC change to the custom). Am I missing a step or going about this incorrectly?
case SUB_FRAME_CUSTOM:
add_motor_raw_6dof(AP_MOTORS_MOT_1, 0, 0, 1.0f, 0, -1.0f, 1.0f, 1);
add_motor_raw_6dof(AP_MOTORS_MOT_2, 0, 0, -1.0f, 0, -1.0f, -1.0f, 2);
add_motor_raw_6dof(AP_MOTORS_MOT_3, 0, 0, -1.0f, 0, 1.0f, 1.0f, 3);
add_motor_raw_6dof(AP_MOTORS_MOT_4, 0, 0, 1.0f, 0, 1.0f, -1.0f, 4);
add_motor_raw_6dof(AP_MOTORS_MOT_5, 1.0f, -1.0f, 0, -1.0f, 0, 0, 5);
add_motor_raw_6dof(AP_MOTORS_MOT_6, -1.0f, -1.0f, 0, -1.0f, 0, 0, 6);
add_motor_raw_6dof(AP_MOTORS_MOT_7, 1.0f, 1.0f, 0, -0.5f, 0, 0, 7);
add_motor_raw_6dof(AP_MOTORS_MOT_8, -1.0f, 1.0f, 0, -0.5f, 0, 0, 8);
break;

Video of present vertical dive that attempting to adjust

1 Like

Additional note: when I select Custom frame and reboot, the unit does not appear to be loading my custom entry, as it only spins single thrusters. If I modify the SUB_FRAME_VECTORED_6DOF, ./waf clean, ./waf configure --board=px4-v4, ./waf sub. Any changes appear to have no affect after installing the compiled firmware.
Note: I am installing the Pixhawk firmware via the companion computer system tab.

Here is output from compiling: pastbin

Output from companion upload of firmware:
attempting upload from file /tmp/data/ArduSub-v4.px4
Stopping mavproxy
Flashing Pixhawk…
Loaded firmware for b,0, size: 792344 bytes, waiting for the bootloader…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
Timed out trying to catch bootloader!
Please try again.
Waiting to restart mavproxy…
Restarting mavproxy
Complete!

pi@raspberrypi:~/companion/scripts $ ls /dev/serial/by-id
usb-3D_Robotics_PX4_FMU_v2.x_0-if00
usb-FTDI_FT231X_USB_UART_DM022A9J-if00-port0

pi@raspberrypi:~/companion/scripts $ ls /dev/tty*
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyACM0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyAMA0
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyprintk
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS0
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/ttyUSB0
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61

pi@raspberrypi:~/companion/tools $ screen -ls
There are screens on:
28574.mavproxy (11/11/19 19:57:04) (Detached)
920.bridgemanager (11/11/19 19:25:42) (Detached)
910.wldriver (11/11/19 19:25:42) (Detached)
900.nmearx (11/11/19 19:25:42) (Detached)
884.file-manager (11/11/19 19:25:42) (Detached)
869.audio (11/11/19 19:25:42) (Detached)
854.commrouter (11/11/19 19:25:42) (Detached)
840.webterminal (11/11/19 19:25:42) (Detached)
822.webui (11/11/19 19:25:42) (Detached)
810.video (11/11/19 19:25:42) (Detached)
10 Sockets in /var/run/screen/S-pi.

Realizing my companion computer isn’t flashing the Pixhawk, hrm, thoughts? So trying to avoid taking it apart to direct usb to it each time I make an adjustment to the firmware.

Try power-cycling the ROV and see if you have issues flashing the firmware again, then it should work after you set the FRAME_TYPE parameter to custom.

If flashing doesn’t work again, please post a log from the download button at the bottom of the companion system webpage.

webui.log (738.5 KB)

I power cycled the ROV and tried again, attached is the log.

I Found the Error!! the tools script was pointing the port to "/dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v2.x_0-if00,/dev/autopilot ", my system does not have a symlink for /dev/autopilot, changed to /dev/ttyACM0 and starting doing something!

IT WORKED!!! some reason I do have the /dev/autopilot sym link but changing it to use the port directly some reason did the trick.

1 Like