Servers by jDrones

Differential Thrust Boat with ArduPilot

(Steven George) #1

For a project we’re working on, we’ve constructed a test rig with two motors, to represent a catamaran we’ll build later. We have a Taranis QX7 connected to the X8R, as well as a telemetry system to connect the Pixhawk to Mission Planner.

In trying to set the paramaters we’ve realised that we need to come up with a frame type for our boat. I’ve watched this video: https://www.youtube.com/watch?v=DVOU1fkrbeA

Does anyone have any advice for doing a skid steer?

Eventually we would like to load waypoints in a flight mode we’ve set as Auto, so that the boat can move autonomously. We’ve gotten as far as changing the paramater to Frame Class 2 in ArduRover, but are not sure how to proceed.

This is our first time using Mission Planner, and we’re not sure how to create a custom frame type (we can’t find a preselected frame type with two motors and differential thrust).

Any help would be hugely appreciated! :slight_smile:

Skidsteering boat
Differential thrust for twin engines
(Sebastian Schürmann) #2

Set the frame_class to 2 for boat and leave the frame_type at 0. Then set the servo outputs where the motors are connected to ThrottleLeft and ThrottleRight (function 73 and 74). That should be all for basic setup.

(Steven George) #3

Hi,

Thanks so much for your help, we’ve done that now and it seems to be working. We’ve gotten the motors to work by putting them into the pixhawk, and we’ve run the motor test in the Optional Hardware Section, and can run both the left and right motor seperately.

The next step for us is to be able to upload a mission with waypoints on the pixhawk, and have the boat move to those waypoints using skid steering.
We’d also like to be able to put it into manual mode and be able to drive it, and then switch it to auto mode, so that it can follow the waypoints. We’ve set the flight modes to correspond to one of the switches in the Taranis already.

We’ve run into a couple issues:

  1. First, while I’ve somehow armed the device, I can’t seem to unarm it, either with the Taranis control sticks, or even in the ardupilot Flight Data - Actions Section.

  2. Also, I can’t get the mixing right on the Taranis Q X7. I’ve set Channel 1 and Channel 3 to Thr, but it doesn’t operate the motors. The flight modes don’t seem to have an impact. At one point, moving any of the sticks would run both motors, but once I played with the mixing it now doesn’t seem to work at all.

  3. We’ve tried it just outside, uploading a mission with waypoints, but once the mission is uploaded, I can’t seem to get the motors running, are we missing a step? I’ve uploaded a picture of the flight data.

We’ve set the flight modes in Mission Planner all as Manual, except for 3 and 4 as Manual and Auto, and the same in the Taranis.

Any help would be greatly appreciated!

Thanks,
Steven

(Steven George) #4

We also get the alert Flight Mode Change Failed.

(Sebastian Schürmann) #5

@steven.george

  1. For boats and rovers it is best to arm/disarm them with a switch on the transmitter. With Ardurover 3.5 you can assign almost any function to any RC input channel. Search the “full parameter list” in MissionPlanner for “option”, the parameters are all in the format RCxx_OPTION and set the channel you like to use for arming to 41.

2.1. You need no mixing in the transmitter and if I understand correctly, you are now transmitting one value (thr) on two channels, which does not work. Ardurover expects a spring loaded throttle stick, because boats and rovers can go forwards and backwards. By setting servo_out to 73 and 74 (throttle left/right) you tell ardurover to mix throttle and steering input together, to get an output for each wheel/thruster. With the PILOT_STEER_TYPE parameter you can then adjust how the input should be interpreted, but the standard setting should work. You need one input for steering and one for throttle. Ardurover takes roll input for steering not yaw. Change the RC_MAP parameters, until the stick(s) you like to use, operate throttle and roll in the radio calibration screen.

2.2. As long as the EKF is not happy (red) only manual mode will be available. You can click on the EKF label to see which EKF component is not ready. The cure is (most of the time), to let everything get settled and have a good GPS fix (7 sats is not much for a modern GNSS receiver).

  1. No point in trying auto mode before manual, acro and steering are working. You have to make sure manual is working as it should (steering/throttle goes in the right direction), I always make sure my rovers go forward with PWM values over 1500us and backwards with values lower 1500us. Then with EKF settled you switch to acro mode and test, if it counteracts unwanted yaw movements, so that if you move the boat nose left by hand (not by transmitter input), the left thruster should run forwards and the right one backwards, to stop the boat from yawing.
1 Like
(rmackay9) #6

The (SAFE) on the HUD there may mean that the safety switch is engaged. So might need to either push the safety switch or set BRD_SAFETYENABLE = 0 to disable the safety switch.

(Sebastian Schürmann) #7

I knew, I forgot something! :grinning:

(Steven George) #8

Hi, thanks so much for the information. I’m still struggling with a few bits.
I managed to get the motors running, you guys were right, the pixhawk was not level with the ground, and once it was, the motors ran. This is when the GPS was connected.

  1. Thanks for the tip on the RCXX_OPTION. I’ve set the RC7_OPTION as 41, but when calibrating the radio, I can’t seem to get any of the radio options to change from 1494 PWM. I’ve attached what I see here. Do you know why this is? Also, if I do get that radio channel 7 working, how do I actually tie in one of the switches, for example the SF switch.

2.1 Ok I understand, there’s no need to mix anything in the transmitter. I’ve set servo_out to 73 and 74. The Pilot_Steer_Type parameter is set to 0. Using the right stick, the Roll and Throttle in the calibration screen move accordingly. When I set it in manual mode, I can finally move the motors, which is great.

I’m assuming RCMAP_THROTTLE (set to 3) is correct, as that moves the motors. I’ve also set RCMAP_ROLL to 3 as well, which allows us to move it forward and backward. However, No setting fro RCMAP_ROLL makes the Roll in Radio Calibration move when I move the right stick laterally. But, when I put RCMAP_ROLL in 1 or 3, it moves with Throttle when I move the right stick vertically. Am I missing something, or is there another way to account for the steering?

2.2 Ok understood, thank you.

3 Duly noted, we will make sure manual is working properly before anything else.

Thanks again for taking the time, you’ve been so helpful. It seems like right now the main issue I’m having is getting the controls on the transmitter to operate the boat properly.

(David Boulanger) #9

Mine is set up as follows:

RCMAP_PITCH 2
RCMAP_ROLL, 1
RCMAP_THROTTLE, 3
RCMAP_YAW, 4

This is for a Mode 2 Transmitter using the right stick for throttle and steering

(Steven George) #10

Hm that’s weird, I had the same settings and moving the right stick left to right did not change anything. When you do the radio calibration, does the roll move as you move the stick left to right, or up and down?
Do you have any idea what else could be wrong?

Also, is your set up for a rover or for a boat? If so, did you manage to get it to run auto missions in the end?

Thanks for your help!

(David Boulanger) #11

It’s for a boat. Roll moves as stick is moved left and right. I do a lot of survey grids and other auto missions with it. It works very well. I’m not familiar with a Taranis Tx but maybe something is set up wrong in there. Can you post a full parameter list

(Steven George) #12

That’s awesome! I’m hoping we get to that stage soon as well.

I’ve attached the full parameter list here.
Differential Thrust Boat v5.param (13.3 KB)

Is this the appropriate format? Please let me know what you think.

Thanks,
Steven

(Sebastian Schürmann) #13

According to your previous posts you played around with the channel/stick assignments of your Taranis. I suspect the roll stick is not assigned to an output channel anymore. By default only channel 1 to 4 are assigned to the sticks. Assigning switches or sliders etc. to the other channels must be done by you.

(David Boulanger) #14

It’s in a good format. I don’t see anything very strange. I think it is getting the Taranis set up properly. The radio calibration screen is great to view if you have sticks and switches set up good in the Tx.

(Steven George) #15

Ok sounds good, I will double check my channel/stick assignments on the Taranis tomorrow. Thanks for checking over the parameter list.

(Steven George) #16

Awesome, thanks guys, just changed some of the channel/stick assignments on the Taranis and it worked!

Since the end goal is to be able to switch it from manual to auto, and load a waypoint mission, I need to be able to arm/disarm from the transmitter, and also be able to switch the flight mode.

  1. As for the arming disarming, I’ve set Channel 7 to switch SF in the Taranis, which now changes the PWM values in the Radio Calibration (from 982 to 2006), so I’ve set the RC7_MIN to 950 and RC7MAX to 2050. The RC7_OPTION is 41, as suggested previously, but flipping the switch does not arm/disarm the device in the Flight Data section.

  2. I’ve set the flight modes in the taranis to correspond to the flight modes in Ardupilot (2: Manual 3: Hold: 4: Auto). For Channel 8 in the mixer, I’ve set the switch as SA. How do I change the paramater RC8_OPTION to reflect the changes in flight mode? Is this the right way to go about this?

  3. Also, right now when the motors go, they go much faster than we need them to go, how do we adjust the throttle %? I’ve set the CRUISE_THROTTLE to 30%, but I believe that’s only for auto mode.

  4. Also, how do we change how “skiddy” the skid steering is? I think if we were to put this in the water right now, I believe the movements would be too jerky, how can we make the system smoother?

Thanks again so much for your guys’ help.

(Sebastian Schürmann) #17

Great that you are making progress. You really should read through

http://ardupilot.org/rover/docs/gettit.html

Most of the tuning for rovers also apllies to boats.

There are tutorials online about how to setup OpenTX to get 6 flightmodes on one channel with two switches ( 2 and 3 pos)
Here is a video about it:

(David Boulanger) #18

MODE_CH, 8 should tell the flight controller that ch 8 is for flight modes

MOT_THR_MAX is for throttle percentage in manual.

Regarding tuning I think you will find that the NAVL1 PERIOD parameter is equally as important as the ATC_STR_RAT parameters.

I have a 18 pound catamaran with Blue Robotics thrusters that may have parameters that would apply to you. At least somewhere in the general range.

The best thing to do is test it and then post a dataflash log.

(Steven George) #19

Awesome thanks guys,I’ve gotten it to change flight modes via the transmitter which is perfect.

MOT_THR_MAX works for manual mode, but is there a way to do it for AUTO? Or do the paramaters do that when it’s calibrated?

We’ll be waterproofing it and putting it in the water soon, and will try and post a daaflash log.

For a rc boat maybe 0.5m long, what would you suggest for the NAVL1 PERIOD paramater? or should we test it in the water and see? It’s set as 8 right now.

Our main problem right now is that somehow it is permanently armed, straight from when it’s plugged in. Trying Disarm via the computer gives me ERROR: Command Rejected by MAV. I would have assumed that if it was due to one of the prearm checks, it wouldn’t arm in the first place, and I can’t see what could be stopping it from disarming. Do you guys have any idea what could be done?

(David Boulanger) #20

ARMING_REQUIRED is set to 0. I think this is causing the boat to not be allowed to disarm. When in Auto Mode the boat uses CRUISE_SPEED or WP_SPEED for its speed. CRUISE_THROTTLE is also somewhat important. Most likely the NAVL1_PERIOD will be in the mid teens. My particular boat has an ATC_STR_RAT P and I of .5. ATC_STR_RAT_FF of 1 and a NAVL1_PERIOD of 16. See video

.