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 » 16 Oct 2015, 21:56

It may actually be better to increase accel/decel for turn in place by the same amount at all turn rates, declining only as speed increases. It certainly would be simpler to code, but try the one I've done first.


I agree... To almost zero delay! Because when chair is set to low speed its still a problem. And that reduces steer command too. To around 14% at full stick.

I need chair on blocks to test this I suspect. So monday!
Thanks.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 18 Oct 2015, 01:48

John,

Hold off for a few days on testing the file I sent you. I'm putting this stuff into the CAN version so that I can test it in Rachi's chair (with her not in it). \

Two reasons: (1) it's the only way I can actually test it, and (2) because I specified EXPLICIT in the CAN script, it will make sure I don't use the same variable name for two different things - and I've already found one case of that in the file I sent you. With EXPLICIT every variable has to be declared with a DIM statement or it won't compile, and if you attempt to put in two DIM for the same variable it won't compile. Makes for a bulky file with a long series of DIM at the top, but since all variables are global in MicroBasic (that is, they are seen in every part of the program) it's the only way to make sure there are no conflicting uses in different places.

But, we have guests here now so I may not get any time with Rachi out of the chair until Tuesday.

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

Re: Some thinking and questions about Roboteq

Postby Burgerman » 18 Oct 2015, 10:08

OK. Will do, cant do much without someone here that can help anyway. So no hurry.

It behaves, in the 12, 3, 6, 9 o'clock positions as if the stick or set to low acc/dec and instead of controlling speed of forward or turn speed, it controls quite low acc rates, that build over time.
The other 4 "corner" stick positions, are quite sharp and instant even from a standstill.

An example of this is when accelerating from standstill. Full stick, no wheelie, and gentle smooth takeoff after say .3 of a second. Accelerates harder over time until it tips you out at about 8mph or so! Thats the opposite to a PG system, where initial acc is quite instant and acc is fast (wheelies from standstill), and acceleration decreases with time/speed as the motor starts to pull less amps due to RPM.

If you decelerate from full speed, by releasing stick, a PG system, almost instantly decelerates at constant RPM/SEC rate. Deceleration is constant. Roboteq shows a relatively slow initial "delay" then increasing deceleration as you slow down, chair slows and the tyres start to get noisy. It makes it smooth! But laggy, and hard to set correct acc/dec rates. And it does the same thing with turning on the spot. But its slower to acc/dec because you are using much lower motor pulsewidth at full stick.

The other four 45 degree (mixed input) corners, show quite fast sharp response. Steering at speed is reasonably predictable (steermixacc set to 600) but gets worse at slow speeds. To the point of being very unpredictable at low speed, and dangerously so on zero turns.

Doing this for eg (link below) as I do all day, is not remotely impossible with the roboteq at the moment, as it responds too slowly initially on forward acc. And too slow to initiate turns at the "ends of the run". Worse, it doesent stop turning after doing the 180 degrees to point the opposite way, as I then centre the stick and gun it forwards again. The result is I will hit a wall because I end up going 15 to 20 degrees more than 180 I expected to get! I know this isnt what most people expect to do but it highlights the control difference issue.
http://www.wheelchairdriver.com/gopro/control.mp4 (PG control)

This is as clear as I can describe it!

The result is it feels a bit unsafe and unpredictable compared to a zeroed out non delay PG system. And feels like one with accelerations/decelerations built in in north/south/east/west stick movements. But not in the corners!
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby BounderGimp » 18 Oct 2015, 16:33

Burgerman wrote:OK. Will do, cant do much without someone here that can help anyway. So no hurry.

It behaves, in the 12, 3, 6, 9 o'clock positions as if the stick or set to low acc/dec and instead of controlling speed of forward or turn speed, it controls quite low acc rates, that build over time.
The other 4 "corner" stick positions, are quite sharp and instant even from a standstill.

An example of this is when accelerating from standstill. Full stick, no wheelie, and gentle smooth takeoff after say .3 of a second. Accelerates harder over time until it tips you out at about 8mph or so! Thats the opposite to a PG system, where initial acc is quite instant and acc is fast (wheelies from standstill), and acceleration decreases with time/speed as the motor starts to pull less amps due to RPM.

If you decelerate from full speed, by releasing stick, a PG system, almost instantly decelerates at constant RPM/SEC rate. Deceleration is constant. Roboteq shows a relatively slow initial "delay" then increasing deceleration as you slow down, chair slows and the tyres start to get noisy. It makes it smooth! But laggy, and hard to set correct acc/dec rates. And it does the same thing with turning on the spot. But its slower to acc/dec because you are using much lower motor pulsewidth at full stick.

The other four 45 degree (mixed input) corners, show quite fast sharp response. Steering at speed is reasonably predictable (steermixacc set to 600) but gets worse at slow speeds. To the point of being very unpredictable at low speed, and dangerously so on zero turns.

Doing this for eg (link below) as I do all day, is not remotely impossible with the roboteq at the moment, as it responds too slowly initially on forward acc. And too slow to initiate turns at the "ends of the run". Worse, it doesent stop turning after doing the 180 degrees to point the opposite way, as I then centre the stick and gun it forwards again. The result is I will hit a wall because I end up going 15 to 20 degrees more than 180 I expected to get! I know this isnt what most people expect to do but it highlights the control difference issue.
http://www.wheelchairdriver.com/gopro/control.mp4 (PG control)


Are you thinking of making a wheelchair for diving? Can't get link to work. Your bm3 is looking good!
BounderGimp
 
Posts: 134
Joined: 12 May 2012, 18:19

Re: Some thinking and questions about Roboteq

Postby Burgerman » 18 Oct 2015, 18:07

Driving?

Link works now! My bad...
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 18 Oct 2015, 19:53

John,

I did get some time to try the CAN version of the revised script on Rachi's chair so here's an updated script to try. You will have to go through the user settings section, including defining the brake1pin. The parameters to play with are, the accel and decel values which should be seriously lowered, and the new ones TurnAccelBoost and TurnDecelBoos which I've set at 100 as that's what I've tested on Rachi's chair.

What they do is boost accel/decel during turning, especially turn in place, with this effect going away as forward or reverse power go up and the mixing already in the script gives proper turn performance. I have changed the routine from the first version so that they are effective for even smaller turn values. To give you an idea of how effective this is -- accel and decel on Rachi's chair had been set at 5000 to get decent turn-in-place. With TurnAccelBoost and TurnDecelBoost at 100, I reduced accel and decel first to 2500, then to 1500, and finally to 500 (fully 10-fold less than where it was) and turn in place is still snappy; in fact better than with accel/decel=5000 without this boost. I really can't feel any great difference in fore-aft acceleration to the low speeds we go, but it seems a more uniform process from start to end. This was, however, just for a speed I could feel comfortable with in our living room. Tomorrow afternoon I'll see how it feels going up to 3 or 4 mph, but I do feel safe having Rachi (and you) use the chair with this programming.

Ciao,
Lenny
Attachments
John 10-16-2015 temp2.mbs.zip
(39.3 KiB) Downloaded 236 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 18 Oct 2015, 20:21

Will test on blocks Monday and on Wednesday will alter seating angle and hopefully test wed evening.

Thanks!
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Burgerman » 19 Oct 2015, 16:05

On blocks.

Speed pot set to min, or max on my setup results in 14 or 18 % turn command. So both very similar.

OK, new script, or existing one.
I push stick "right" (3 o'clock) suddenly, and it takes a almost a full wheel revolution to reach full turn rate (wheel speed). It doesent just follow the stick. So turn is accelerating over about 1/2 second. It needs to be instant or almost so. Or I dont turn when, or as hard as I wanted, and then jam more in in panic! Much like a commercial chair!

Likewise, when doing a zero turn on blocks, I release the "right" stick, the slowly contra rotating wheels take about a half revolution each before it smoothly stops. That means the chair continues to turn for about 90 degrees seen from above... I need it (the wheels) to stop almost dead when turn is released, so I can punch the forwards stick and go towards the door/gap I am aiming at.

Now, I dont know why but I do not think the new turn acceleration / dec increase when set to 100 does anything at all. And I then tried figures up to 10,000! The wheel still rotates after I release the stick in a zero turn.

So something is wrong I think. Its not doing anything I can detect, and in fact "seems" worse than before. But its not easy to compare on blocks.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 19 Oct 2015, 18:44

I wonder if it would slow down faster under load. However, the effect of these new parameters may also be obscured if you don't lower the basic accel/decel values. 100 for these boosts will double acceleration for turn-in-place, so I'd start by halving the base accel/decel values. Putting in a number like 10,000 for these makes no sense at all - haven't checked, but it might even be exceeding 32 bits at some points in the calculation, which will end up giving a negative number! I think that you are going to have to try this on the wheels, preferably via RC and with some sand bags in the seat. Weight might not make as much of a difference on yours as on Rachi's which has heavily loaded rear casters, but the feel is quite different if she's in or not in the chair and she only weighs ca. 30 kg. In both cases, turn in place on hers stops instantly, just a bit more hesitant starting with her weight on board. Do a bit more testing and if it's not working at all, I'll go over the math and logic again.
Ciao,
Lenny
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 19 Oct 2015, 19:34

I wonder if it would slow down faster under load. However, the effect of these new parameters may also be obscured if you don't lower the basic accel/decel values.


I lowered them to 500 from 2400. Acceleration and deceleration is really slow. Turn acc/dec seems to be exactly the same. Its made to feel more extreme, because the four 45 degree corners are pretty much lag free, so feel very instant.

What is needed is something that means that there's no delay at all on turn axis. Because even with my 13 stone carer sat in it, and me driving it by RC on my drive, (safer than sandbags because there a kill button!) it shows the same behaviour as I see on blocks.

What's needed, is for its steer axis to be as instant as possible. Any amount of acc/dec or delay is wrong. Needs to be like a car steering wheel.
Because even 1/4 of a wheel revolution delay in either turning, or not turning, or stopping turning after I release the stick, is very much noticeable. The chair takes off in the wrong direction. Its not as noticeable when moving - but really noticeable when manoeuvring in tight areas, or trying to fly around through doorways and doing U turns like a lunatic in the house. I cant!

The steer axis, should only control wheel speed directly, and its acceleration should be as short as it can be. It should achieve the turn rate I pick with the joystick, instantly. Or at least as fast as my fingers on the joystick. Because I can get it to keep turning left while I have got a lot of throttle and some right stick in as I accelerate away! Hence the door frames are going to get it. Turn rates (not acceleration rate) must keep up with the joystick directly to maintain directional control.

If the steer axis has double the acceleration/dec of the forward/reverse, when set to 100, then its a great many times too slow.
It takes 5 seconds to get to 16mph. But it needs to take, 0.1 sec max to achieve the turn (rotation) speed you desire.
That's a difference of 50x ?

I bet you wish I was still on my bed! :?
This has been worrying me for a bit, but I presumed I could dial it out somehow, and never got around to testing because of people, and my dog dying, a mass of problems with local authority care budget cuts and assessments and arguments, and a 5 week session stuck on my bed amongst a load of other stuff... Makes me wonder how will hasn't had these problems. I suspect that he hasn't experienced a properly programmed chair, and so thinks its good, because its better than his permobil etc. But there's a fundamental control issue here somewhere I think.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 19 Oct 2015, 21:10

John,

Here's another version to try. Again, you have to go through the user settings and make them match what you want. There are two things different in this one:

(1) The turn-in-place accel/decel boost becomes fully effective at 1/20th of TurnPotMin (corresponds to 5% stick travel with the pot actually at min, less than that if the pot is at max).

(2) I put in a couple print statements that will run once every 100 times through MainLoop (about once every 100 msec) and will list base and boosted accel and decel values for both motors. To be of any use, you will have to "drive" the chair with your PC connected and Roborun in the console tab. Start a turn in place, bring the stick to neutral and save the listing to a file with some notation of what you were doing for those data. Then do the same for any other stick movements you want to try. Since you are seeing the same behavior up on blocks or on its wheels, it may be best to do this up on blocks as you will have to be paying attention to the PC. It might be worthwhile to try this with several different base accel/decel settings.

Eventually we'll get this working right.

Ciao,
Lenny
Attachments
John 10-16-2015 temp2 mod.mbs.zip
(39.63 KiB) Downloaded 222 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 19 Oct 2015, 21:37

I have absolute confidence!
Will do this asap. But will have to be tomorrow now because a freind just turned up to go to the pub across the road...

Thanks for your efforts!
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Williamclark77 » 20 Oct 2015, 01:43

The attached script does none of that behavior. This is what I am using. As close to zero lag as possible. It's instant enough that I will wheelie up onto one rear wheel from the centrifugal force if I go full forward stick while zero turning (if the accel pot is up high enough).

You don't need to add anything to correct the behavior. I believe it started back when the joystick averaging was added. I honestly just have not had time to thoroughly test before bringing it up and having Lenny try to "correct" something that was not a problem but a result of my not testing settings. Apparently it wasn't settings, but I haven't had the opportunity to see. Just find what addition caused the regression backwards.

As is with this script, my Willchair is more responsive than a maxed out Rnet.
Attachments
4-11-15 to test.zip
(34.41 KiB) Downloaded 232 times
User avatar
Williamclark77
 
Posts: 1183
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: Some thinking and questions about Roboteq

Postby Williamclark77 » 20 Oct 2015, 03:02

Just guessing by the way it felt, but possibly AccelSteerMixWeight and DecelSteerMixWeight are being canceled out. I haven't had a chance to look closely.
User avatar
Williamclark77
 
Posts: 1183
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: Some thinking and questions about Roboteq

Postby Burgerman » 20 Oct 2015, 09:43

The attached script does none of that behavior. This is what I am using. As close to zero lag as possible. It's instant enough that I will wheelie up onto one rear wheel from the centrifugal force if I go full forward stick while zero turning (if the accel pot is up high enough).


Same here but not in the direction intended. The four 45 degree quadrants are responsive. And this may be disguised on yours since you have 3x the aceleration settings. I cant do that because while it makes it better around the house at slow speeds it becomes unbelievably wild when acc builds as speed increases.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby Williamclark77 » 20 Oct 2015, 11:53

Burgerman wrote:
it becomes unbelievably wild when acc builds as speed increases.


Mine does not do that.
User avatar
Williamclark77
 
Posts: 1183
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: Some thinking and questions about Roboteq

Postby Burgerman » 20 Oct 2015, 12:31

Strange . Maybe because yours is brushless it behaves differently.

Set to acc/dec 2400 it will accelerate gently at first, with a little lag, then build up until it tries to flip, at about 8mph and the application of back stick to drop the wheels is also very sluggish. So it gets too high and then either tips you out or slams down hard. On slowing, the rate of deceleration increases over time. Not speed, but the rate of deceleration.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 20 Oct 2015, 14:16

I am still baffled by all this, but perhaps I can clear up one thing - there is a major difference between the meaning of accel/decel for brushed and brushless. For brushed, it is the rate of increase of PWM, but even if PWM goes immediately to 100% the chair obviously can't really accelerate that fast and as load decreases it is likely to get faster much more quickly. For brushless, it's the rate of increase in motor RPM, and the feedback from the Hall sensors probably ensures that acceleration will be pretty constant as long as the motors have enough torque to not stall.

Today has been a very bad day for me for other reasons and I'm not up to thinking clearly, so I'll probably not try to work on this any until tomorrow.

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

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 20 Oct 2015, 14:57

Well, I can't quite stay away even though I feel pretty non-functional from a combination of a herniated disc, hassles with the Italian bureaucracy, dog barfing in the car, and a pounding headache.

I took a look at the file Will just posted and compared it to the one he's sent when I started to work on the joystick rolling average. They are identical. The one that John sent me then was dated 6-19-2015 and I've attached a copy in case you don't still have it. Could you download that one and confirm whether or not it also had the NSEW turning and ramping acceleration problems?

I think it would be a mistake trying to design a fix for something created when the averaging routine was added, so how I'll need to work on this depends on whether this is an old problem or a (relatively) new one.

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

Re: Some thinking and questions about Roboteq

Postby Williamclark77 » 20 Oct 2015, 15:21

Burgerman wrote:Set to acc/dec 2400 it will accelerate gently at first, with a little lag, then build up until it tries to flip, at about 8mph and the application of back stick to drop the wheels is also very sluggish. So it gets too high and then either tips you out or slams down hard. On slowing, the rate of deceleration increases over time. Not speed, but the rate of deceleration.

Mine does neither. I'll try to do this and graph it tonight when I get home. The graph on mine is a long, steady, straight line from 0 to 4100ish rpm and back to 0. Changing the accel or decel rate only alters the steepness, as it should. It doesn't get steeper as rpm climbs. Nor does load affect it confirming by butt feel and watching my speedo. A smooth climb from stopped to 12ish mph and back to stopped. (I lowered the gearing from 15+ mph).

Back stick is immediate and easily drops a wheelie at slow or high speeds. Same with forward/back stick while zero turning. It reacts faster than the chair can physically be moved - ie - tires spin or wheelie crooked as it tries to go forward while centrifugal force is still trying to turn it. I'll attempt to video but doubt I get in before it's too dark.

Lenny, I hope your issues get sorted out. Don't feel any pressure to work on the script on my behalf. I'll attempt to try the attached version tonight. I want to any way. I don't get home until 7ish pm central US time. Cramming cooking supper, a 6 year old's homework and bedtime routine, my pets, honey-do list, my ongoing house build, etc etc etc in before it's very late (4am comes early every morning) with time to do anything extra, like chair stuff, rarely happens.
User avatar
Williamclark77
 
Posts: 1183
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: Some thinking and questions about Roboteq

Postby Williamclark77 » 20 Oct 2015, 15:23

Lenny, no file to try is attached to your post.
User avatar
Williamclark77
 
Posts: 1183
Joined: 21 Mar 2013, 01:18
Location: South Mississippi, United States

Re: Some thinking and questions about Roboteq

Postby Burgerman » 20 Oct 2015, 16:16

Its an old pre averaging / damping problem.

I always noticed this, but presumed I could dial it out.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 20 Oct 2015, 16:49

Will, attached now. It's John's older script, so not set up for your chair, and he's just answered the question anyway - the problems he's having were present even with that one.

John, then go ahead and try the file John 10-16-2015 temp2 mod.mbs that I posted yesterday, and send me a copy of the serial output.

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

Re: Some thinking and questions about Roboteq

Postby Burgerman » 20 Oct 2015, 17:33

Will try to do it tonight.
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 20 Oct 2015, 21:11

Boy, I am out of it. Once again forgot to attach the file!
Attachments
John 6-19-2015.mbs.zip
(33.71 KiB) Downloaded 222 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby ex-Gooserider » 21 Oct 2015, 08:00

Burgerman wrote:Is there a link? I may be interested.


Google gives me http://www.sleepnumber.com/ Presumably that is a US site... I don't know if they sell in the UK or if there is a UK site....

ex-Gooserider
User avatar
ex-Gooserider
 
Posts: 6232
Joined: 15 Feb 2011, 06:17
Location: Billerica, MA. USA

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 21 Oct 2015, 19:16

Ouch, did it again!

All of the files I posted of late (other than John's old one) had at least one mistake, and the last one had two!

The mistake common to all of these is that my equations referred to TurnPotForwardMin, or TurnPotForwardMax -- but those are NOT the names of the user setting variables at the top of the script, so will just have the value 0. Result, the added code will do NOTHING AT ALL, or might actually throw an error because it may divide by 0. (Next time around, I'm going to put EXPLICIT at the top of the script so that every variable needs to be declared with a DIM statement, and I'll get a compile error if I do this kind of stupidity. REAL languages - i.e. I think every programming language except basic - always require declaration of variables, at least while debugging.)

So, here are two more versions to try:

(1) The first, John 10-21-2015 temp2, boosts turn-in-place with the boost reaching maximum when the turn power = TurnPotFwdMin. It does not have the diagnostic print lines in it. What this should do is boost accel and decel as follows:
1% turn rate - 7% boost
10% turn rate - 71% boost
>=14% turn rate - 100% boost
all of which go down as speed goes up, becoming zero when speed = SpeedPotFwdMin

(2) The second, John 10-16-2015 temp2 mod, rises to full boost right away from 1% turn rate, falling off again as speed increases to SpeedPotFwdMin. This one does have those serial print lines if further diagnosis is needed.

I would try (1) first to see how it feels, and then (2) only if a stronger boost is needed at small turn rates or to get the printout if things don't work right.

PLEASE DO NOT USE THE CHAIR, EVEN ON BLOCKS, WITH THE SCRIPTS THAT MIGHT (AT SOME STICK POSITIONS) GIVE A DIVIDE BY 0. I just don't know how Roboteq MicroBasic deals with that kind of error. (BTW, if you ever get in the situation of having an Autorun script that is bad and that you can't get out of, let me know and I'll send detailed instructions about how to kill a script that's so bad that Roborun can't cope.)

Ciao,
Lenny
Attachments
John 10-21-2015 temp2.mbs.zip
full boost at TurnPotFwdMin
(39.29 KiB) Downloaded 254 times
John 10-21-2015 temp2 mod.mbs.zip
full boost at 1% turn rate plus diagnostic print lines
(39.59 KiB) Downloaded 232 times
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

Re: Some thinking and questions about Roboteq

Postby Burgerman » 21 Oct 2015, 20:15

So many names and scripts I am getting confused! Since yesterday I am trying to fix my computer. It locks up for no reason. And its not software because I tested several backups going back over a month. I suspect its a power supply, or something. So am a bit frustrated and cant do much at the moment. Its in bits now. What do I do first once up and running? I will start with these two scripts. I don't know how to save, print data?

(1) The first, John 10-21-2015 temp2, boosts turn-in-place with the boost reaching maximum when the turn power = TurnPotFwdMin. It does not have the diagnostic print lines in it. What this should do is boost accel and decel as follows:
1% turn rate - 7% boost
10% turn rate - 71% boost
>=14% turn rate - 100% boost
all of which go down as speed goes up, becoming zero when speed = SpeedPotFwdMin


I really think it needs a LOT more boost, (so there's zero lag noticeable by a human on turn at all) than 7% or 71% or 100. 100 is just twice as fast? That will not do it. It needs to be as fast as humanly possible on the turn axis. It needs to reach full turn RATE as soon as you choose it by stick position. And delay here feels horrid and inaccurate -- at least compared to what I am used to.
It should stop turning on a zero turn instantly too. When the stick hits the centre when released the wheels should be stopped turn rate zero. And start instantly as you add turn. And reach the chosen turn rate instantly. Obviously everything has mass. So in reality it wont actually be instant.

Is this what you hope this will do?

(2) The second, John 10-16-2015 temp2 mod, rises to full boost right away from 1% turn rate, falling off again as speed increases to SpeedPotFwdMin. This one does have those serial print lines if further diagnosis is needed.


Sounds better but can it be much faster? So the turn rate (0 time acc/dec) is directly proportional to stick position? At every speed?

I may be able to do this on blocks Thursday. Chair in wrong room no bodys here to lift... Its not safe to sit in?
User avatar
Burgerman
Site Admin
 
Posts: 71115
Joined: 27 May 2008, 21:24
Location: United Kingdom

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 21 Oct 2015, 21:11

Yes, start with these latest scripts.

Yes, this will just double the turn accel/decel, but that should be enough to feel whether it makes a difference without getting into dangerous territory. It can be increased as much as one wants from there. Might end up with a number similar to what's being used for AccelSteerMixWeight (and we may not even need a separate parameter for the NSEW case), but I prefer to start out on the safe side. Do remember that when accel is boosted, the current draw will go up faster, so there'll be more motor comp as well during turn-in-place.

The 7% etc. boost in the first program is at only 1% stick movement (beyond any deadband you have set). I doubt if the chair can even move with just 1% stick movement. I know that Rachi's chair won't start to move until about 2% or a bit more.

There is also code included in these scripts to boost initial acceleration (when speeding up) and initial deceleration (when slowing), but before we try to get rid of the ramping of speed acceleration and deceleration I want to know what happens with the turning.

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

Re: Some thinking and questions about Roboteq

Postby LROBBINS » 21 Oct 2015, 21:37

To save the serial prints, open the Console tab in Roborun, re-start the script, and the screen will fill with the output. Then, copy and paste that into something like Notepad, and save that. (Or use any other serial monitor program that lets you directly save to a file.)
LROBBINS
 
Posts: 5807
Joined: 27 Aug 2010, 09:36
Location: Siena, Italy

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: emilevirus, jefferso, martin007, rover220 and 394 guests

 

  eXTReMe Tracker