Go to Post I have postulated a theory that it is due to a resonance between gravity waves and the color purple. - petek [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 06-03-2015, 00:15
Mr V's Avatar
Mr V Mr V is offline
FIRST Senior Mentor Washington
FRC #5588 (Reign)
Team Role: Coach
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Maple Valley Wa
Posts: 997
Mr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond reputeMr V has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by jblay View Post
Also, what might help is limiting deceleration. I would make sure my motor controllers are set to coast and not brake, this way you don't decelerate as rapidly so that you have less tipping issues when stopping.
Yes tipping when abruptly getting off the throttle will also likely cause tipping. With 4 motors you can set one on each side to coast and one on each side to brake for a lower braking force. We did that on the rookie team I am working with this year and it has worked good in practice.

Personally I would remove a motor per side if it can be done w/o major disassembly.
__________________
All statements made on Chief Delphi by me are my own opinions and are not official FIRST rulings or opinions and should not be construed as such.




https://www.facebook.com/pages/Team-...77508782410839
  #17   Spotlight this post!  
Unread 06-03-2015, 00:16
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,686
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by jblay View Post
Also, what might help is limiting deceleration. I would make sure my motor controllers are set to coast and not brake, this way you don't decelerate as rapidly so that you have less tipping issues when stopping.
Absolutely. Deceleration is a form of acceleration, and I included it implicitly. The following line was intended to reduce deceleration, and putting the motor controllers in coast would prevent a sudden unintentional change.

Quote:
Originally Posted by GeeTwo View Post
Code:
if (newSpeed < curSpeed - maxSpeedDelta)
     newspeed = curSpeed - maxSpeedDelta;
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #18   Spotlight this post!  
Unread 06-03-2015, 13:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
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: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by Ether View Post
You may want to limit acceleration.
The suggestions previously given in the post quoted above can be used to limit acceleration/deceleration without using sensors (no wheel encoders required).

If you have wheel encoders and you want to create smooth accel/decel-controlled pre-planned motion in auto, you might try something like this:

http://www.chiefdelphi.com/media/papers/download/4312


  #19   Spotlight this post!  
Unread 06-03-2015, 14:10
s_forbes's Avatar
s_forbes s_forbes is offline
anonymous internet person
FRC #0842 (Falcon Robotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Phoenix, AZ
Posts: 1,150
s_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

We did a quick implementation of this approach a couple of weeks back. Limiting the rate that the joystick input can increase is an easy fix in code and does the job well. You can set different rate limits for each joystick axis (we have forward/back, strafing, and turning) to match the tipping geometry of the robot too.
  #20   Spotlight this post!  
Unread 06-03-2015, 14:13
IronicDeadBird's Avatar
IronicDeadBird IronicDeadBird is offline
Theory Crafting Fo days...
AKA: Charles Ives "M" Waldo IV
FRC #1339 (Angelbots)
Team Role: Tactician
 
Join Date: Feb 2014
Rookie Year: 2005
Location: Colorado
Posts: 958
IronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

You using Joysticks or gamepads for control?
__________________
HERO 俺を讃える声や 喝采なんて 欲しくはないさ
I liked my team more before they stole my jacket.
Play is for kids this is serious...
  #21   Spotlight this post!  
Unread 06-03-2015, 14:29
s_forbes's Avatar
s_forbes s_forbes is offline
anonymous internet person
FRC #0842 (Falcon Robotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Phoenix, AZ
Posts: 1,150
s_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond reputes_forbes has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by IronicDeadBird View Post
You using Joysticks or gamepads for control?
The interface hardware doesn't get rid of the tall-tippy-robot issue; you can still inadvertently send the robot a command of "full speed ahead" whether you use a joystick, a gamepad, or a DDR dance mat.

  #22   Spotlight this post!  
Unread 06-03-2015, 14:33
IronicDeadBird's Avatar
IronicDeadBird IronicDeadBird is offline
Theory Crafting Fo days...
AKA: Charles Ives "M" Waldo IV
FRC #1339 (Angelbots)
Team Role: Tactician
 
Join Date: Feb 2014
Rookie Year: 2005
Location: Colorado
Posts: 958
IronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by s_forbes View Post
The interface hardware doesn't get rid of the tall-tippy-robot issue; you can still inadvertently send the robot a command of "full speed ahead" whether you use a joystick, a gamepad, or a DDR dance mat.


Going to have to disagree in regards to gamepads or typical console controllers you can gain more control over movement (provided they are bound to the thumb sticks) by increasing the height of the thumbstick you need to accidentally make much larger movements. If you are using a joystick your out of luck though.
__________________
HERO 俺を讃える声や 喝采なんて 欲しくはないさ
I liked my team more before they stole my jacket.
Play is for kids this is serious...

Last edited by IronicDeadBird : 06-03-2015 at 14:39.
  #23   Spotlight this post!  
Unread 06-03-2015, 21:47
microman1934 microman1934 is offline
Registered User
AKA: Uday SHarma
FRC #4939 (Allspark9)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Vaughan
Posts: 7
microman1934 is an unknown quantity at this point
Talking Re: Limit speed of 4 chassis CIM motors

Thank you so much for the help guys, I just ended up doing this:

Code:
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
  #24   Spotlight this post!  
Unread 06-03-2015, 21:58
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by microman1934 View Post
Thank you so much for the help guys, I just ended up doing this:

Code:
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
Glad you found a solution.

I would suggest you throw that in a if-else statement though, making the half-speed your default speed:
Code:
if(stick.getRawButton(1))
{
myRobot.arcadeDrive(-stick.getX(),-stick.getY());
}
else
{
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
}
This way, if in the middle of a match, your driver decides that he or she needs full speed, they have the ability to do so.

Just a suggestion. Of course, you may already have it that way in the rest of your code!
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #25   Spotlight this post!  
Unread 15-03-2015, 21:52
microman1934 microman1934 is offline
Registered User
AKA: Uday SHarma
FRC #4939 (Allspark9)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Vaughan
Posts: 7
microman1934 is an unknown quantity at this point
Re: Limit speed of 4 chassis CIM motors

Thanks for the idea, would the throttle work for that as well?
  #26   Spotlight this post!  
Unread 16-03-2015, 01:16
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by microman1934 View Post
Thanks for the idea, would the throttle work for that as well?
Yes. You could set the throttle to act as a toggle switch...

I'm on my phone so I can't format this correctly and can only give some pseudo code.

If(stick.getThrottle () > 0)
myRobot.Drive (halfSpeedValues);

else if(stick.getThrottle <= 0)
myRobot.Drive (fullSpeedValues);

Remember the throttle on the joystick ranges from -1 to 1, so 0 will be in the middle.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #27   Spotlight this post!  
Unread 16-03-2015, 01:19
Knufire Knufire is offline
Rose-Hulman Institute of Technology
no team
Team Role: College Student
 
Join Date: Sep 2009
Rookie Year: 2010
Location: Terre Haute, IN
Posts: 746
Knufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond reputeKnufire has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Just remember, by implementing that throttle (we refer to it as a software shift), you lose both speed and torque. This shouldn't be an issue driving around on an open field, but things like noodles or carrying large stacks while driving with the throtte enabled could cause very poor drive performance.
__________________
Team 469: 2010 - 2013
Team 5188: 2014 - 2016
NAR (VEX U): 2014 - Present
  #28   Spotlight this post!  
Unread 16-03-2015, 09:14
JesseK's Avatar
JesseK JesseK is online now
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,710
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by microman1934 View Post
Thank you so much for the help guys, I just ended up doing this:

Code:
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
Depending on your drive train characteristics, you may have trouble turning. This will be especially prevalent in tight spaces or next to a bump. It is just as bad (or worse, perception-wise) as flopping over on your face every match. Could you describe your drive train from a mechanical perspective?
  #29   Spotlight this post!  
Unread 16-03-2015, 11:18
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: Limit speed of 4 chassis CIM motors

Quote:
Originally Posted by microman1934 View Post
Thank you so much for the help guys, I just ended up doing this:

Code:
double rot = -stick.getX();
double speed = -stick.getY();
myRobot.arcadeDrive(rot*0.5, speed*0.5);
Why not just square the magnitude? Pseudo code for example.

Code:
double rot = -stick.getX();
double speed = -stick.getRawAxis(drive axis);
myRobot.arcadeDrive(rot, speed * Math.abs(speed));
This allows finer control at lower speeds (when joystick is reading 0.5 you will send 0.25 to the motors) but still allows full speed when the joysticks are at full throttle.
Closed Thread


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 12:21.

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