Go to Post Truly listening to the wealth of advice around you is so important. Don't work in a vacuum all season long. - OZ_341 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-04-2011, 20:34
smcmahon's Avatar
smcmahon smcmahon is offline
The Architect
AKA: Sean McMahon
FRC #2656 (QUASICS)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pittsburgh, PA
Posts: 197
smcmahon is an unknown quantity at this point
Exclamation Easing into top speed

Looking for some LabVIEW ideas on having more control over drive speed.

We have a Mecanum drive bot this year. Each wheel is directly driven by an AndyMark ToughBox with the standard gear ratio (12.75:1). The bot is probably in the 100 pound ballpark.

When we press "up" on the control stick, the bot really tries to take off. So much so that it sometimes lurches forward and almost lays some rubber.

Is there a way to slow it down? Or ease into the speed the same way a car does? Are the drivers simply pushing too hard too fast? When I drive, I try to really ease into the speed control stick, but some of the students just gun it. It almost looks like it's bad for the robot.

Is it common for teams to sorta ease into top speed? Is it not as bad for the bot as it seems in the shop? Thanks!
__________________
FRC 2656 | FTC 5526 | VEX 9656
Reply With Quote
  #2   Spotlight this post!  
Unread 05-04-2011, 20:42
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: Easing into top speed

We basically divide all the Holonomic - Cartesian speed inputs by 2 under normal operation to slow us down a little, then have a turbo button assigned which, when depressed, allows the full range. This gives us a little more fine control, but we can go to full speed when we need it.
__________________


Reply With Quote
  #3   Spotlight this post!  
Unread 05-04-2011, 21:26
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Easing into top speed

Lots of teams made programs that would give their robot a lower acceleration, especially for Lunacy. Basically what you do is have a PID loop control the speed, and have the joystick as the setpoint.

If you're using the CAN bus, there should be an automatic voltage ramp built in to the jaguars, but I haven't really looked at it.

However, this late in the season, it's probably best to just tell the drivers to be more careful, IF you think it's bad for the robot.
Reply With Quote
  #4   Spotlight this post!  
Unread 05-04-2011, 22:00
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Easing into top speed

Quote:
Originally Posted by smcmahon View Post
When we press "up" on the control stick, the bot really tries to take off. So much so that it sometimes lurches forward and almost lays some rubber.

Is there a way to ... ease into the speed the same way a car does? Are the drivers simply pushing too hard too fast?
You could try putting a low-pass filter or a rate limit on the joystick commands before passing them to the mecanum vi.


Reply With Quote
  #5   Spotlight this post!  
Unread 06-04-2011, 08:41
smcmahon's Avatar
smcmahon smcmahon is offline
The Architect
AKA: Sean McMahon
FRC #2656 (QUASICS)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pittsburgh, PA
Posts: 197
smcmahon is an unknown quantity at this point
Smile Re: Easing into top speed

Always love how quickly I can get honest and knowledgeable input on C/D!

vhcook- We'll give that a try today, thanks. We tried something like that last year. Can't remember the results though...

WizenedEE- Our programmers haven't jumped into PID lopps yet. That's something we're considering for some off-season learning. We are done competing for the season. Getting the bot more under control is for some public demos we have coming up in the next month.

Ether- Those two ideas sound interesting. Can you elaborate on them please?
__________________
FRC 2656 | FTC 5526 | VEX 9656
Reply With Quote
  #6   Spotlight this post!  
Unread 06-04-2011, 08:52
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Easing into top speed

Quote:
Originally Posted by smcmahon View Post
Ether- Those two ideas sound interesting. Can you elaborate on them please?
http://thinktank.wpi.edu/article/140
Reply With Quote
  #7   Spotlight this post!  
Unread 06-04-2011, 09:15
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,658
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Easing into top speed

Quote:
Originally Posted by WizenedEE View Post
Lots of teams made programs that would give their robot a lower acceleration, especially for Lunacy. Basically what you do is have a PID loop control the speed, and have the joystick as the setpoint.
A PID loop will do next to nothing to rate limit motor commands unless you tune it to be mushy as heck. A tightly tuned PID is going to be nearly as responsive as a straight joystick input. And you're going to want it tuned fairly tightly for mecanum unless you want your wheels to all come up to speed at different times. That'd give you some funny dynamics and wiggle when you changed directions.

Which brings me to my second point. If you're going to do this, and it's pretty easy to do, then rate limit your joystick signals before you put input them to the holonomic drive block. This will limit how fast you're changing directions, as opposed to how fast you're changing wheels speeds.

In case the distinction isn't obvious, think about what would happen if you made an instant change from full forward to full left strafe. Limiting the joystick means your direction vector would gradually swing from forward to left, and your bot would make a little controlled arc to the left. Limiting motor change would (I think) be somewhat different. Your front right and rear left wheels would stay at full forward, and your other wheels would shift to full reverse at the rate limited speed...

Thinking about this a bit more carefully, this might not actually change things since the mecanum kinematics are all linear. But I'm not able to work out the Jacobian of the kinematic equations and figure out what it means at the moment, so I don't know for sure....

On the gripping hand, rate limiting the joysticks in Labview is a lot easier to implement than limiting the motors anyways, so you should probably just stick with that.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #8   Spotlight this post!  
Unread 06-04-2011, 09:28
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Easing into top speed

Quote:
Originally Posted by Kevin Sevcik View Post
But I'm not able to work out the Jacobian of the kinematic equations and figure out what it means at the moment, so I don't know for sure....
If you filter the the outputs (wheel speed commands) from the inverse kinematics, you will likely obtain a set of non-holonomic wheel speed commands during the transition. The forward kinematics of mecanum are discussed here.




Last edited by Ether : 06-04-2011 at 09:32.
Reply With Quote
  #9   Spotlight this post!  
Unread 06-04-2011, 10:10
MaxMax161's Avatar
MaxMax161 MaxMax161 is offline
Allegedly Useful
AKA: Max Llewellyn
FRC #2791 (Shaker Robotics), FRC #1676 (Pascack π-oneers)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Montvale NJ\Troy NY
Posts: 174
MaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond reputeMaxMax161 has a reputation beyond repute
Re: Easing into top speed

I think that doing a PID or something more advanced like that would be the best solution to the problem long term however that requires time to write, robot time to debug, and all of that fun stuff.

I personally think that your best solution would be to proportionally decrees the sensitivity of the joysticks (just multiply the value that comes out by something less then 1) unless a button is pressed, in which case they have full sensitivity.

This is easy to program and gives your drivers something to help them drive the robot well. At this point in the season there isn't a lot of time to learn and implement anything complicated so I'd go with something simple and then put it on the drivers to learn how to drive better using any tools you can give them.
__________________
2791 Shaker Robotics (2013-present)
--Control Systems Mentor 2013-present
--Drive coach 2015-present

1676 The Pascack π-oneers (2010-2013)
--Drive coach 2011-2013
--Lead Programmer 2011-2013
Reply With Quote
  #10   Spotlight this post!  
Unread 08-04-2011, 23:39
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: Easing into top speed

I really like the divide by 2 and disable with a button method, it's simple, easy to tell your drivers, and works quite well. You can also pick any other number than 2 if you want, like 3.

Some teams, like us, have cubed the joystick values (that is, x^3). This allows you to have slow speeds the majority of the time (that still increase), but also allows you to have that last bit of full speed. Squaring works, too, but cubing seems to be better and more defined. Visualize it with this graph. Plus, you don't have to press a button to disable it for full speed. Sometimes, that's one more button to memorize and drivers get turned off by that and don't use it.
To program this in LabVIEW: squaring is as simple as inserting a Square node in the wire. Cubing is more tricky, I would suggest using a Compound Arithmetic Function set to multiplication and the same joystick value wired to 3 inputs. Or you can use a fancy expression node, but don't forget to use ** instead of ^
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW

Last edited by RoboMaster : 08-04-2011 at 23:46.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-04-2011, 00:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Easing into top speed

Quote:
Originally Posted by RoboMaster View Post
Some teams, like us, have cubed the joystick values (that is, x^3). This allows you to have slow speeds the majority of the time (that still increase), but also allows you to have that last bit of full speed.
This might be of interest:

http://www.chiefdelphi.com/media/papers/2421


Reply With Quote
  #12   Spotlight this post!  
Unread 10-04-2011, 16:07
Clayton Yocom's Avatar
Clayton Yocom Clayton Yocom is offline
Programming Mentor
FRC #0027 (RUSH)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Clarkston, MI
Posts: 87
Clayton Yocom will become famous soon enoughClayton Yocom will become famous soon enough
Send a message via AIM to Clayton Yocom Send a message via MSN to Clayton Yocom Send a message via Yahoo to Clayton Yocom
Re: Easing into top speed

I have a VI we built this year that does exactly this, I'll post it Tuesday when I can get back at the latest build of our code. It makes a joystick value "trickle" up or down (two different VIs). If you haven't acquired anything better I hope this will work with as little tweaking as possible
Reply With Quote
  #13   Spotlight this post!  
Unread 13-04-2011, 14:54
Clayton Yocom's Avatar
Clayton Yocom Clayton Yocom is offline
Programming Mentor
FRC #0027 (RUSH)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Clarkston, MI
Posts: 87
Clayton Yocom will become famous soon enoughClayton Yocom will become famous soon enough
Send a message via AIM to Clayton Yocom Send a message via MSN to Clayton Yocom Send a message via Yahoo to Clayton Yocom
Re: Easing into top speed

Here is that file I was talking about, its a day late sorry :/

Leme know if this looks like what you need.
Attached Files
File Type: vi Slow Forward.vi (7.6 KB, 20 views)
File Type: vi Slow Backward.vi (7.7 KB, 9 views)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi