Servers by jDrones

Skidsteering is behaving strange

(Sebastian Schürmann) #1

If I put the direction control input (aileron stick) full to one side, both wheels start to turn in different directions. That´s good.
If I then move the speed control input (pitch stick) just a little bit forwards or backwards, the wheel that would be on the outer side of the turn immediatly goes full speed forward or backward.
I hope, my explanation is understandable. If needed, I can make a video of the problem.

My setup:

RPi 3 with Navio2
Ardurover 3.2-rc1
Sabertooth 2x12 motorcontroller

(Khancyr) #2


Yes, that should’nt be the case, could you post a dataflash log of both operation ?

(Sebastian Schürmann) #3

Here is a short dataflash log showing the issue. I am using Channel 2 and 3 for input and output. If you graph RC_IN 3 and RC_OUT 3, you can see the input changing gradually, while the output is jumping from min to max and back. (925.2 KB)

(Sebastian Schürmann) #4

I had a look at the source and there is a if/else condition in AP_MotorsUGV.cpp, which checks for turning on the spot without moving forward/backwards and turning while moving. The problem seems to be the 0.5 scaling factor for pivot turning. This causes a doubling of the output to one motor when the condition changes. This is not noticable with small inputs, but causes a jump in throttle output, when steering input is at its max.

I am no programmer at all, but I think it would be good to have a normal “elevon” mix for skid steering and make the scaling a configurable parameter. This way a wider range of vehicles would work. There are vehicles like the Dagu Wildthumper, which require a lot of throttle to do a pivot turn, or on the other hand, robots with two powered wheels and a free pivoting third wheel, which turn easily.

(Engineering) #5

Hi, I made a simple rover with a left and right wheel (separate motors) and a single swivel wheel to simulate and test the system. Everything is working fine, manual driving, auto mode, RTL and guided mode. But I can’t get pivot turning to work except in manual mode. It will do “normal” turns just fine but changing PIVOT_TURN_ANGLE doesn’t seem to be doing anything for me.

I’m using skid steering (like a tank) on the transmitter and it works great except for a small “glitch” much like @count74 described in the first comment. Before seeing this thread I figured it was some kind of mathematical condition when the combined thrust of the left and right motor was exactly 100% and something was divided by zero or something…
For instance 40% forward thrust on left motor and 60% reverse thrust on right motor. Could this be related to me not being able to pivot in auto or can someone confirm that they have pivot turning working in auto mode on Rover 3.2.0 rc1 with SKID_STEER_IN = 1 ?

(Sebastian Schürmann) #6

My rover does also only pivot turn in manual.
In all other modes, it only turns while moving forwards, which negates the advantage of having a skid steer vehicle.
It is even worse than with a conventional vehicle, because you can not see where the wheels are pointing.

(Khancyr) #7

Hello, thanks for reporting this. I am sorry I don’t have time to look deeply on this for now. You may expect new beta with fix on octobre or before if someone do it before me.

(Engineering) #8

Thank you for that info @count74 and @khancyr. Really appreciate it.
Is there a way for us to tweak that code in any way? We’re porting the autopilot over to the boat tomorrow morning for a field test and the “normal” turn radius on that beast is huge… I think it would pretty much go straight forward on our catamaran.

If there’s anything I can do, let me know. We’ll be testing all day.
Will downgrading to stable work or did it even have skid steering?

(Engineering) #9

To be specific in my case when turning: full speed forward on one motor and full speed reverse on the other will do just fine for us. Might not be pretty but it will work. The boat is heavy and wants to go straight so in manual we go full sticks on every pivot.

(Sebastian Schürmann) #10

Ardurover 3.1.2 has skid steering too. It has two parameters, skidsteer_in and skidsteer_out to be set. Skidsteer_in is still there in 3.2, but skidsteer_out was replaced by the new servoX_function scheme, that is used by copter and plane.
The problem is, 3.1.2 and 3.2 both have the 0.5 factor on steering output, so if you need full power pivot turns, 3.1.2 will not help you either. My Dagu Wildthumper used to just sit there humming, while trying to do a pivot turn.
It should be relativly easy to remove the 0.5 factor from the code, but that will not solve the pivot turns only in manual mode problem.

(Engineering) #11

Thanks, guess I will stick with 3.2.0 then until a fix is out.

(Engineering) #12

Hmm, just to clarify: Isn’t it possible to to PIVOT turning in 3.1.2 at all albeit with reduced power?
We have two systems, a test rover for land use (so we don’t have to swim as much…) and the boat itself.
We are doing field tests every day and we really need to implement pivot turning on the boat in auto mode. The land rover has a much smaller turn radius when skid turning only, less than 1m, so we get away with that during testing (it does PIVOT turning on the spot in manual). The boat is a catamaran and the turn radius with skid turning only is closer to 50m! With pivot turning (like we do in manual) it turns on the spot.

Again, I really appreciate the feedback and I will be more than happy to test any firmware and share photos, videos and info. If there was a way for me to edit the code somehow I would do that but I’m not sure if that is possible? I’m talking basic stuff like tweaking a few numbers and maybe inserting a few if-statements and then save and upload.

(Sebastian Schürmann) #13

You can pivot turn in 3.1.2 with 50% throttle/speed.
There are guides in the ardupilot wiki about how to compile the code on/for different plattforms. I only have done this for the Emlid Navio on the Raspberry Pi (sloooowww…) and cross compiling with bash on windows. If you follow the instructions, it should be no problem. The 0.5 factor is in AP_MotorsUGV.cpp in line 272 and 273.

(Engineering) #14

Awesome, I will reload 3.1.2 and test on the land rover. I’ll keep you posted later this evening when I have the results (7-8 hours ++ maybe). Maybe it’s possible to cheat a bit with with the ESC’s calibration limits in order to get some extra thrust.

That compiling thing is not something I’m too familiar with. Will have a look at it anyways for sure!

(Andrés Ábrego) #15

as far as I know the dev team (specially @khancyr ) are considering to implement a “speed pivot turning” parameter, as seen on other topics like this one

(Engineering) #16

Ok, tested 3.1.2 and it pivots (kinda slow) in auto mode, great! Problem now is getting the steering to work properly in manual mode. Setting skid_steer_in doesn’t seem to be doing much and I find that a bit strange…

Sorry for the detailed explanations but in my search for information I’ve come across so many outdated and “wrong” comments. My test rover has two wheels with separate ESC’s and motors. It also has a single caster wheel in the front.

In manual mode, rover 3.1.2 with skid_steer_in and skid_steer_out both enabled : I now have “normal car” steering with the left stick adjusting forward and backwards speed (both wheels) and the right stick for steering (both wheels). Right after powering on it operates in “tank mode” like I want it to but it changes to “normal car steering” when it auto-arms.
I want the left stick to only operate the left motor only and the right stick to operate the right motor only; just like a tank.

(Esa Attia) #17

Guys I’m struggling to get skid steering working on my tank rover.

I’ve set RC skid steering input to 0

I’m using a mode 1 transmitter (using elevator for throttle and aileron for differential steering )

but don’t know what setting I should set for servo X output.

currently the robot is doing some weird behaviour with the RC mapping

I can see the output on CH 1 and 3 on the output.

What I would like to see is when I push the elevator forward I’d like to see both ch 1 and 3 move to value 1900
and if I push it back both ch 1 and 3 move towards 1100

and when I move the aileron left or right the output on ch1 and and 3 should move in a differential manner


(Sebastian Schürmann) #18

You have to set servoX_function to 73 and 74, throttle left and throttle right. This replaces the old skidsteer_out parameter.

(Sebastian Schürmann) #19


I had a bit spare time today and changed the AP_MotorsUGV. First, I removed the 0.5 factor, but that made matters worse. Changing from pure pivot turning to a little bit of forward or backward throttle almost ripped my rover apart.
I then commented out the whole if/else construction and simply added a normal differential mixer (elevon, skid steering).
Now it works as I would expect it. Stick full left/right, motors go full throttle in opposite directions. Stick in the corners, one motor goes full throttle, the other one stops and smooth transitions in between.

(Khancyr) #20


Sorry I wasn’t much around! I just check on SITL, and you are right skid_steer_in seams broken in 3.2 . I will fix that quickly !