Servers by jDrones

Thruster spinning after disarm / skid steer problems

After I built my first Arduboat (with normal thrust/steering) that went quite well, I have now set up a skid steer setup. But I just can’t solve the problems.

My Setup: Pixhawk 2.1, two T100 Thrusters with Basic ESCs, Radiolink T8fb TX/RX
Firmware: Rover beta 4.0.0-rc1 (because I need the new UTC-based delay)

Everything is set as described in the docs. Servo1 to 73, servo3 to 74, and so on. In manual mode I can drive the boat quite ok.
But when it comes to auto or acro, the boat goes like crazy. To reach a waypoint, it goes backwards first, then turning, then maybe in direction to the Wp, or maybe not. The speed is much higher than the cruise speed and wp speed.
And the strangest thing: after disarming, one thruster is still spinning slowly. I thought, disarming would cut off the motors in general?

I did read the posts regarding similar issues. Switching two of the motor connectors to reverse it and so on. Nothing solved the problem.

I uploaded the logfile of my last try (including some switching of connectors and even from left to right):

Would be really great to get some advice, I´m quite lost.

Thanks!
Denis

@3Denis

Hi Denis,

I had a look at the logfile and your RC_in values are “all over the place”.
You should redo the RC calibration and make sure all channels go from 1100 to 1900us, with 1500us middle position. I guess the thruster is running while disarmed, because the midpoint for RC_out Channel 1 is around 1470us, which might be beyond the input deadzone of the ESC.
You also should make sure, that both thrusters run forward with PWM values above 1500us and backwards with values below 1500us. Do this by changing the motor wires (change two of the three wires and the motor changes direction), not using channel reversing anywhere. This might not be 100% necassary, but it makes troubleshooting a lot easier and saves you from confusion during testing.
Starting tuning with an Auto mission, will lead to frustration, because the chances for the default PID values to be spot on are slim. You will also not be able to reuse the tuning values from the throttle/steering boat, because skid steering behaves differently.
Make sure everything is working in manual mode. The boat is running straight, weight is evenly distributed, so one side does not create more drag than the other and the waterline is right during standstill and acceleration/movement.
Then switch to acro mode and pick the boat up (if it is not to heavy) or yaw it by hand in the water. The thrusters should counteract the yaw movement. If they do nothing at all, ATC_STR_RAT_P might be zero or too low. Increase it a bit and see what the thrusters do. If they work with the rotation (they should not do that with correct PWM setup), you have to invert the RC_out channels they are connected to and the RC_in channels, too.
I think, this should get you started, if you have further questions, please ask!

Thanks a lot, Sebastian!
I´ll be at the lake tomorrow to try my best.
You were right regarding the rotating thruster in disarmed mode, there was the trim not centered.
A bit strange is the RC calibration with my Radiolink TX/RX. Everytime I redo the calibration, the midpoints are different and spread between 1485 and 1515 or so.
Another question, do the thrusters necessarily need to be CW+CCW? Or is that only for spin-related reasons?

@3Denis
I can not say anything about the quality of radiolink systems, but most cheaper radios use potentiometers to read the gimbal position. They drift with temperature and are sensitive to dirt. The gimbal mechanic itself may also not center reliably.
+/-15us is quite a lot. If you can not get a consistent calibration, you can adjust the deadzone for the rc input channels in the full parameter list.
Regarding the thruster rotation, using CW/CCW thrusters cancels out all torque and other asymmetric effects.
The torque may roll the boat to one side causing more drag on that side, which results in the boat not driving straight. How much this affects your boat, depends on the design.
You should be able to use the ATC_STR_RAT_I parameter to counter that effect. Using it with a skid-steering setup is problematic, because the calculations keep running with zero throttle (I do not know if it is still the case in ardurover 4.0) and the boat may start to move/turn by itself
in modes other than manual.

I´m back from the lake now. Sebastian, your advice was dead right! Both thrusters were setup right (forward/backward), but the steering was reversed.
To fix this, i reversed both channels at RCin and SERVOout, that was the golden advice,… it worked! I made a little mission, some zigzag routes, and the boat almost perfectly followed the path.
Then I started to tune the PIDs a bit, but just Turn_G_Max and Acro_Turn_Rate. The next mission was a complete fail. The boat didnt speedup in direction to the first waypoint,
but to the opposite direction, going backwards. I set the changed values back to the old setting, but still the boat always backed up wobbling like a snake, instead of going foward to the first waypoint.
summary: main problem solved, it worked great for one mission, now desperation again.
Really strange, what could cause the boat to go backwards? Everytime I switched to auto, the boat´s heading matched already with the first waypoint. So no need to even make a turn.
Manual and Acro still work great. The boat drives a straight line when no steering.

I uploaded the logfile here:

The sucessfull mission startet at around 12:25, lasting approx 5 Minutes, after that the strange behavior kicked in.

@3Denis
I looked at the new log and my first guess would be, that the ATC_SPEED_I is too high. I would try again with ATC_SPEED_I at 0. I also would set ATC_STR_RAT_I to 0.
See how it works and add a little bit I. The I-term should never (or in most cases) do the main work in a PID loop. It is there to remove the last bit of error that the P-term can not remove. So the method is to tune P until you get a reasonable well result, then add a little bit of I to make it “perfect”. The D-term is most likely not necessary in a boat or a rover. It is used for fast reactions to a changing error, but boats and rovers usually balance themselves and are to slow to benefit from that. (Two-wheeled selfbalancing rovers are an exception, of course)
I also noticed that the cruise speed is set really low. I would let the boat learn a higher cruise speed. I found that it works better to let ardurover scale down from a higher cruise speed, which is closer to what the boat/rover is capable of, than setting cruise speed and throttle really low.

I´m back from my testing of today and it seems to be that I found out what the problem is:
When I steer the boat while using throttle too, everything works as it should. It steers in the right direction. But when I steer without throttle, the steering is reversed. (manual and acro)
That might be the reason that yesterday it worked one time and then never again. If the very first action is throttle (the boat is exactly heading towards first WP, which is very unlikely) it works, but when it has to steer at first, everything goes wrong after that. Just my assumption.
Is there a way to invert steering, but only the steering on pivot?

Have a look at the PILOT_STEER_TYPE parameter. It controls the reversing behaviour and controller type for skid steer vehicles.
Sometimes the pivoting changes, because the throttle is slighty in the forward or backward range.

But that wouldnt explain the strange behavior when in auto mode, right?

Did you set ATC_SPEED_I and ATC_STR_RAT_I to 0?

I tried it out. But you know what? Oh man, that’s really embarrassing to me now. I mixed the ESC servo plugs up. Right thruster was on ch1, left thruster on ch3. That simple.
The reversing of RC_in and RC_out was able to compensate it until a certain point. Normal manual or acro drive worked fine. But when it came to turning on pivot, the reversing didnt work.
Thats all theoretical for now, because I´m at home, starring at rotating thrusters. :wink: Tomorrow at the lake i will see if I´m right.

Everything went pretty well now. Surprisingly precise following of the paths, just the turning will need some tuning. My cruise speed is set quite low, as you mentioned. But that is intended and needed for my project. Only turn rate has to fit now to the low speed.
Sebastian, thanks a lot for your time and patience! It was a great help. Even though it was my stupid mistake to mix up the channels, I learned quite a lot during the troubleshooting. Things I might need in the further progress of my project.
By the way, the mix up happend when I switched pilot_steer_type from 0 to 1 some days ago. I thought right stick should control right thruster and vice versa. But of course it should control the left thruster to turn to right.

Servers by jDrones