PINNED - Roboteq Controller - developing for powerchairs

Power wheelchair board for REAL info!

POWERCHAIR MENU! www.wheelchairdriver.com/powerchair-stuff.htm

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 13:43

OK

The A version, changed nothing. Same problem.

I think that the LOW boost is actually correct. And when there's some small turn input it boosts too much.
The HIGH boost is the thing that is wrong, it didn't happen until you fixed the turn/no acc thing.

Testing B version now.

OK...
Both appear to behave in similar fashion. Even from zero turn/straight ahead.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 14:46

The last few versions, have all given me this. Seemingly either due to the stick not being centralised, or randomly.

The first curv, has excessive accel that would spit me out.
The 2nd lower boost one, is correct. And is actually how the setting say it should be.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 16:17

I think that the "stop turning completely" before it takes off forwards, may be a bit extreme. And not feel very natural. It should really start to do both? Not sure till I try driving it...

As in it should depend on how much stick, how fast you do it etc?
Attachments
Capture.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 18:16

John, John, why do I have the feeling you're not listening? Every time I send you a new file you MUST follow the whole testing and adjusting protocol. Please re-read the descriptions of each step, do each one adjusting the single parameters indicated, and note the results. You are really managing to get me confused.

Nevertheless, I think there are a couple useful hints in your last couple posts. First,
I think that the LOW boost is actually correct. And when there's some small turn input it boosts too much.
The HIGH boost is the thing that is wrong, it didn't happen until you fixed the turn/no acc thing.

If that's the case, it's really the same cause, just at a different place in the code, that was giving the balking during acceleration. Given that we seem to have licked that by introducing a bit of hysteresis in the changeover from turn change to speed change, I think that changing a 0 to a 10 or 15 at the start of the turn boost routine will take care of the hyper-enthusiastic acceleration.

Second,
I think that the "stop turning completely" before it takes off forwards, may be a bit extreme. And not feel very natural. It should really start to do both? Not sure till I try driving it...
This was point 10 of the protocol and checklist. There's no user setting to adjust for this, but until you know whether the transition is too abrupt or not, I don't want to complicate things. I'm quite sure I can "mix" that transition if need be, but we don't yet really know whether it's needed.

On the other hand, the last curves you posted, at least the second and third in the series shown, actually show that what was done to avoid the balking during acceleration does already "soften" that transition: notice that as the turn ends just before forward acceleration begins, the yellow and red lines are not straight, but curved. We can make that as soft as we want, but at the cost of some turn continuing while the chair is slowing down.

In a bit, I will post yet another script. It will have the boost parameters turned down, but before you fiddle with them start with Accel (adjusted to get final acceleration that you find comfortable), and only then go on to PowerAccel to get the initial acceleration you want, then BoostLimit to get proper behavior mid-acceleration. Then do the same for Decel first (adjusted to get final deceleration, near stopping, that you find comfortable), then work on PowerDecel. Only after you've gotten those where you want them, start working on TurnAccel and TurnDecel. Once again, I really need your notes at each step of the procedure.

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 18:38

Next version to test. I have added another parameter:
'added TurnSpeedTransition, set to 0 will finish turn change before starting speed change,
'set to higher values will allow more overlap (at cost of some continuing turn during changes in speed)

For now, it is set at 20 and should be left there until the entire testing protocol is done.

Time for me to work some on Rachi's chair.

Ciao,
Lenny
Attachments
John 11-29-2015 temp6.zip
(43.54 KiB) Downloaded 169 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 19:11

Test in 40 mins...

In a bit, I will post yet another script. It will have the boost parameters turned down, but before you fiddle with them start with Accel (adjusted to get final acceleration that you find comfortable), and only then go on to PowerAccel to get the initial acceleration you want, then BoostLimit to get proper behavior mid-acceleration.


Accel will likely be the same 1500 as before.
The MIDDLE will still be the same 1500 Accel, because the BoostLimit must end at about 10% speed, since I need higher acc only at the very start. Do lose the wait on initial punch stick to go/wheelie. So that will likely end up exactly as before too. I do this with all the scripts but don't mention it if nothing changed.

But I will if it helps!
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 20:04

I do this with all the scripts but don't mention it if nothing changed.
But I will if it helps!


Yes, it will help me keep things straight and will help me get an idea of how the various parameters interact - they are definitely not independent.

I've just spent a couple hours adjusting the CAN version of the latest script on Rachi's chair and my checklist from this is attached.

Ciao,
Lenny
Attachments
checklist Rachi 2015_11_29.doc.zip
(45 KiB) Downloaded 231 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 21:35

Everything looking better! Working well.

One major issue -- god knows how either of us have missed this.

Turn while decelerating, should speed up one motor, and slow the other as deceleration continues. It doesn’t do that.
It accelerates one motor, and the slower motor maintains a constant deceleration rate. So you speed up! Or at least keep wiggling the stick and never decelerate.

On acceleration, the opposite happens.
If you accelerate away, then add some turn, one motor continues at normal rate, the other slows by a large amount. Keep steering left/right and acceleration cannot increase because of it.

In other words, all the steer command always goes to one motor.

Meaning that steering as you accelerate reduces acc. Steering as you decelerate increases acc…


Checklist document attached. Sorry about the name, I screwed it up! :oops:
Attachments
new.doc.zip
(43 KiB) Downloaded 235 times
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 22:02

I've looked through the checklist, but will read it again tomorrow after I've gotten some rest. Can you post some curves of what you're getting when you turn during acceleration and deceleration? It really seems to be acting backwards to what it should be doing, so there's a logic problem somewhere. Steer should initially take precedence. When decelerating it should slow one motor not speed up the other. Looks like the turn part of the routine thinks it's accelerating when it's decelerating and vice versa. I'm not sure seeing the curves will help, but it might, but tomorrow I'll run the simulation with lots of information listed while I make these maneuvers. Hopefully I'll be able to figure out what's backwards.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 22:34

While I'm trying to find the error that causes the reversed behavior in turning while decelerating or accelerating, if you have the time there's something you might try that would help me figure out if it's in the core logic, or in something I've done recently. I'd like you to reload two of the older scripts and check just this behavior. The two are:
John 11-23-2015 temp4
and
John 11-28-2015 temp5

Unless you tell me otherwise, I'll assume that you still have those files. If not, or if you can't find them in earlier posts, let me know and I'll re-post them.

Again, don't waste much time on these, and no need to fiddle with any settings. Just check whether it speeds up if you turn while decelerating and slows if you turn while accelerating.

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 22:54

100% Accel from zero.
At about 27% forward speed, apply steer at 45 degrees. And wait.
Then release stick.

As you see one wheel maintains the same acc rate. (it should increase.)
Other wheel slows by the full amount required for the turn. (Instead of half of that.)
Attachments
Capture.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 23:01

Cruising along at full speed.
Release stick, correct deceleration.
At about 2/3rds speed, full left stick. (One motor should slow and one should cease deceleration for a while).
As it slows both should cross the 0mph point with one above and one below zero -- which it does.
Release stick. Turn stops.
Attachments
Capture.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 23:04

Those two files also show the same problem.

John 11-23-2015 temp4
and
John 11-28-2015 temp5
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 29 Nov 2015, 23:33

Thanks for the curves. They show the same thing I'm seeing with the numerical simulation. Take the turn-during-acceleration case. The chair is not actually slowing down when the turn starts, rather it stops accelerating until the turn is (nearly) completed, then resumes acceleration at the original rate. The outside wheel is continuing to speed up, and the inside wheel is slowing down - neither is holding at a steady speed.

Exactly the converse is true for a turn during deceleration. Barely after the turn starts (after only speed decays by a further 2% as now set), the chair momentarily stops decelerating, the turn is nearly completed (to within 2% PPM of final turn rate) and the deceleration resumes. The inside wheel continues to slow down, and the outside one speeds up until the turn is completed, but the chair is going at a constant speed during the turn - neither motor is holding a steady speed.

For the moment, try increasing TurnSpeedTransition from 20 to 40 or even 60 and see what happens.

If this hesitation (not actually a speed up nor slow down) is too troublesome, we can deal with it.

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 29 Nov 2015, 23:45

Well it is going to be troublesome unfortunately. It means it stops decelerating at all if you turn left/right for eg. Or doesn't acc as expected doing the same as you try to follow a path. Its going to be very non intuitive. Or as you stop turning while accelerating it kicks back in.

Other than this it behaves perfectly as far as I can tell and I thought it was cracked!

acc + turn
Capture.GIF





dec + turn
Capture2.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 30 Nov 2015, 00:13

What's the difference between these latest two curves and the two that you'd posted previously? These two seem to be closer to what you want, with one motor at constant speed and the other doubling its accel or decel so that the chair continues to accelerate or decelerate during the turn. But I don't know how you got them.

It's not going to be easy to program that as far as I can see at the moment. Lot's of head scratching coming.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 01:18

An old script.
Do you want a copy?
Attachments
John 10-21-2015 temp2 mod good by rc LOADED.mbs.zip
(40.54 KiB) Downloaded 175 times
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 30 Nov 2015, 10:01

Good morning John,

I was up most of the night trying, unsuccessfully, to deal with the turn while accel or decel problem in the last script and am quite fuzzy-headed at the moment. I want to clear up a major confusion, however.

When I started on this a few weeks ago, you had reported two problems (and perhaps a sub-problem):

(1) Ramping of acceleration or deceleration from too slow to too fast (when accelerating from 0, or decelerating from speed).
and
(2) Continuation of turning during deceleration from a moving turn.
and
(1 + 2 sub-problem) hesitation starting a turn-in-place

We do now have a working solution for (1), but the attempt to deal with (2) lead to the problem of turn-change stopping speed-change.

However, in the second curve you posted last night, generated with "John 10-21-2015 temp2 mod" there doesn't seem to actually be a problem with stopping a turn when decelerating from a moving turn, so maybe I've been "solving" a non-existent problem with the series of unintended consequences I've then tried to solve one by one.

Am I reading that plot correctly? Is turn during deceleration actually behaving the way one wants in that graph? Was the impression of excessive continuation of turn during deceleration really just a side-effect of reluctant initial deceleration (that is, if the base Decel is too low, the mixed decels will also be too low so the turn continues)?

For the moment, I'm going to assume that this is so and work on putting the functional accel/decel boost into "John 10-21-2015 temp2 mod" for you to test. Might still have to deal with turn-in-place as well, but that would be in a second moment. However, if you think I'm off on a bad tack, i.e if you think I've mis-read what's in that last graph, do stop me!

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 10:18

Will test today in a few hours. But I think you are correct.

From memory the problem was that from a zero turn, and then forwards, one motor continued forwards at constant speed until the other one had stopped reversing and then changed direction and cought up. You then said you had a better way and it was a fundamental problem.

Theres a screenshot here somewhere. I will look.

This post has the problem and screenshots, that we were trying to cure.

viewtopic.php?f=2&t=2436&start=1980#p73551

Let me check in a couple of hours.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 30 Nov 2015, 11:56

Looking at viewtopic.php?f=2&t=2436&start=1980#p73551, the curve that shows what you "EXPECT" to see is what is happening right now with
"John 11-29-2015 temp6" -- turning stops first, then acceleration happens. The curve above, that you didn't like, corresponds to what you do want to happen if you start or end a turn during acceleration - one motor holds a constant speed and the other's acceleration or deceleration rate is increased to start/end the turn while acceleration or deceleration continues.

It really seems that we can't have it both ways, but maybe the problem isn't with the response you didn't like there, but how slowly turn rate changes when the chair isn't moving (near stall) or when it is already moving very fast (lots of inertia to fight). Perhaps what we really have to do is stick to the old mixing routine, but boost acceleration/deceleration during initial turn start and initial turn end just as we now know how to boost acceleration/deceleration during initial acceleration and initial deceleration. The turning boost should act only if we're NOT already Accelerating AND NOT already Decelerating - don't want to boost a boost, that might be wild)

Later today, or tomorrow, I'll have something for you to try along these lines, but I will be surprised if the calculation of the turn boost will be correct in my first try.

Till later,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 12:22

What the newest script does great around zero speed, turn then go, etc. and the acc boost at the start, dec boost is good. The latest script was everything we needed. Until... Moving, at that point it seems to change, and then steer only affects one wheel affecting forward acc or decal.

I like what it does around zero turn... It behaves as it should.

As you say.

I am not sure boosting turn rate when you acc is the answer though.
Maybe need more thinking than typing for a bit.

ADDED. Just tested. That older script does exactly that. So the link to the previous graphs was correct.
The zero turn continues because the forward going wheel continues at the same rate instead of slowing when you shove the stick to 100% forwards. Increasing turn acc/dec generally will help of course. But cant ever remove it. I already have it high. That script however does seem really good. Much better than the ones we used before turn acc/dec boost added.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 30 Nov 2015, 19:48

Here I am again with another script for you to test. It uses the basic acceleration mixing routines from "John 10-21-2015 temp2 mod", the initial acceleration and deceleration boost from "John 11-28-2015 temp5" and a boost for turn-in-place similar to the initial acceleration and deceleration boost (and using the same PowerAccel and PowerDecel settings).

The structure and user settings are rather different from what you've been testing recently, so the procedure to follow will be a bit different (and simpler).

The relevant user settings and the values set in the attached file are:
Code: Select all
Accel = 1200
Decel = 1100
AccelMix = 400
DecelMix = 400
'boost of accel/decel proportionate to difference between MotorCommand and MotorPower at beginning of acceleration
'and beginning of deceleration or during turn-in-place (i.e. at speeds below BoostLimit when neither accelerating nor decelerating)
PowerAccel = 200
PowerDecel = 200
BoostLimit = 100
BackStickBraking = 140


I seem to recall that you mostly had AccelMix and DecelMix (or whatever they were called when you last adjusted them) set to 800, and the same for both. So maybe that's the first thing to adjust.

Then adjust Accel and Decel based on final part of acceleration or deceleration.

Adjust PowerAccel and PowerDecel so there's no lag when starting to accelerate from zero or starting to decelerate from full speed.

Adjust BoostLimit so there's no "sag" in acceleration just after the initial part of acceleration. (Although you think something less than 100 looks right on the graph, I suspect that once on wheels with real inertia to deal with, it will need to be higher. Remember that the boost goes down linearly from the beginning until BoostLimit, so if set to 200, the boost is halved at 100 and gone at 200.)

Then just try it in every way you can think of, especially paying attention to whether turn rate changes in quickly enough when going from center stick to a high speed turn, or going from a high speed turn back to center stick.

Copious notes and lots of graphs would be welcome.

Ciao,
Lenny

P.S. As far as I recall, none of us have ever used different values for AccelMix and DecelMix. If that continues to be the case I will simplify the code by changing it into just one parameter for both (just as I did when I changed M1Accel and M2Accel to just Accel). Small changes in AccelMix and DecelMix really make so little difference anyway that even if the ideal values for the two could hypothetically be different, in practice I doubt that we'd ever feel any difference at all. PowerAccel and PowerDecel will probably end up set to different values as starting a motor from zero RPM is rather different from slowing it from high RPM.
Attachments
John 11-30-2015 temp2 revised.mbs.zip
(44.33 KiB) Downloaded 174 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 20:25

Looking now.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 21:29

Initial thoughts...
Tried what you said, and many settings... I have deceleration set as high as I dare because it slows rather too fast in practice as we know. that's 6 seconds for acc and dec (0 to 16 to 0).

This:
TurnDecelBoost = 250
Is gone! That was what made that script work.


So without that turn boost, initial turn accel (in place left/right) is now very, very slow. Needs to be approx. 2x faster.
Turn decel in place is faster. But still a little slower than needed. Needs to be 1.5x faster? See image.

Zero turn, then gun it forwards:
And if you look at the screenshot, as soon as you move stick from "full turn" to "full ahead" the turn deceleration is much slower now than doing it in place. So takes a long while for the reversing wheel to stop, before accelerating hard once it begins to rotate in the right direction.

Acc and dec boost work as expected.

Increasing the accelmix weight to high figures makes turn acc/dec fast only while accelerating forwards. (or backwards). This is at 600 both.
Attachments
Capture.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 21:33

For above image:
Turn in place and release. In the first turn above OK. If a little slower turn acc than needed. (about 1/2 second? Maybe a bit more)

Turn and release and gun it straight ahead, in the 2nd turn above, shows reduced turn deceleration? Compared to ZeroTurn, Taking a full second to stop turning. Then increased boosted acceleration above zero line.

As soon as you hit the gas, turn acc and dec rates reduce for reversing wheel?
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 21:43

Code: Select all
SpeedPotPin = 5          'analog input pin used for SpeedPot
LeftCurrentSensorPin = 7      'analog input pin
RightCurrentSensorPin = 8    'analog input pin
AlarmPin = 6                        'digital output pin used for low voltage alarm

Brake1Pin = 1                     'digital output pin ??
Brake2Pin = 0                     'digital output pin, 0 of only 1 brake pin used

'JOYSTICK AND SPEEDPOT SETTINGS
Damping = 1                      'number of joystick readings to moving average
SpeedPotInstalled = TRUE  'Is speed potentiometer installed?
SpeedPot = 100                 'default if bSpeedPotInstalled = FALSE; 90 allows some headroom for steer/mixing
SpeedPotLowFault = 30     'chair speed used if pot fails giving too low voltage
SpeedPotHighFault = 60    'chair speed used if pot fails giving too high voltage

SpeedPotFwdMax = 100    ' percent speed at highest pot setting, set <100 for lower top
                                       ' speed or if headroom needed for turning
SpeedPotFwdMin = 15
SpeedPotRevMax = 26
SpeedPotRevMin = 15
TurnPotFwdMax = 18
TurnPotFwdMin = 14
TurnPotRevMax = 16
TurnPotRevMin = 10
TurnAtFullSpeed = 100     '100=no reduction of turn rate with speed, 0=turn rate goes to 0 at full speed

' DRIVING CHARACTERISTICS
'the following override the settings in the Roboteq configuration
Accel = 1700
Decel = 1700
AccelMix = 600         '0 = no effect of M1-M2 motor power on accel/decl, 100 = full effect
                               'if 100 is not enough, it's OK to try values > 100
DecelMix = 600         '0 = no effect of M1-M2 motor power on accel/decl, 100 = full effect
                               'if 100 is not enough, it's OK to try values > 100
'boost of accel/decel proportionate to difference between MotorCommand and MotorPower at beginning of acceleration
'and beginning of deceleration
PowerAccel = 300
PowerDecel = 300
BoostLimit = 100        'currentSpeed ar which efffect of PowerAccel and TurnAccel is reduced to zero.  (During
                                 'deceleration refers to change of currentSpeed from speed at moment when deceleraton
             'begins.)
             '100 corresponds to 10% of max speed, 200 to 20% and so on.
' BACK STICK BRAKING
BackStickBraking = 140          'percent of added deceleration to use if Throttle crosses 0.
                                            'effect of this is proportional to how far past 0 the stick is moved.

MotorResistance = 50       'MOTOR COMPENSATION. (SETTING THIS TOO HIGH IS DANGEROUS)
                                       'Set to less than motor mohms and then adjust based on chair response
UseCurrentSensors = TRUE
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 30 Nov 2015, 22:05

The Old script with turn acc boost (but no acc/dec boost) before you just modified it.

Can we just add acc/dec boost to this one?

For comparison. This turns when told. It also stops turning faster, and then goes...
But it still doesn't do it quite right, but if it does it wrong fast enough you get less of a problem! I am sure you know what I mean.
Attachments
Capture.GIF
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 30 Nov 2015, 22:52

I'll work on it tomorrow. Will at least need to add separate boost parameters for turn in place and turn when beginning decel, but I agree with something you said earlier - need to think before writing.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 01 Dec 2015, 10:09

Zero turn, then gun it forwards:
And if you look at the screenshot, as soon as you move stick from "full turn" to "full ahead" the turn deceleration is much slower now than doing it in place.
It sure dues, and the reason was obvious as soon as I looked at the code. In order to not apply one boost on top of another, the turn boost only happened
Code: Select all
IF ((NOT Accelerating) AND (NOT Decelerating)) THEN
So, of course, as soon as you move the stick forward, the turn slows massively. A duh.

As I suspected, however, just removing that condition does lead to boost of a boost when accelerating and turning (inside the BoostLimit window) and things get wild. Haven't figured out how to deal with this yet, so you'll still have to wait a bit before the next file arrives. I will also put back separate TurnAccel and TurnDecel parameters (and take them out later if the usable values turn out to be the same as for PowerAccel and PowerDecel.

Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 01 Dec 2015, 10:18

Well in the past I had different values for those.
User avatar
Burgerman
Site Admin
 
Posts: 71117
Joined: 27 May 2008, 21:24
Location: United Kingdom

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: fishinjunky, JazzyBand, snaker, swalker, Yennek and 547 guests

 

  eXTReMe Tracker