Go to Post But before we jump to conclusions, I'll wait for kickoff and the manual. ;) - BrendanB [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2014, 23:00
Reed501's Avatar
Reed501 Reed501 is offline
Team Captain
AKA: Reed Schrier
FRC #2637 (Phantom Catz)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Palos Verdes
Posts: 20
Reed501 is an unknown quantity at this point
Reversing Drive Controls

I've been looking into a way to press a button and have the Y axis for the driving controls reverse, that way when we turn around to pick up the ball in reverse, we can easily use inverted controls.
If anyone knows a good way to do this, I'd love to hear it.
I don't think RobotDrive->SetInvertedMotor() does what I think it does...
Thanks,
--Reed
  #2   Spotlight this post!  
Unread 30-01-2014, 23:10
TheNightviz's Avatar
TheNightviz TheNightviz is offline
Driving it like I stole it.
AKA: Parker
no team
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Escondido CA
Posts: 12
TheNightviz is an unknown quantity at this point
Re: Reversing Drive Controls

While I haven't messed around with it myself, you might want to look into having your robot's front based on the field possession instead of the a button. To accomplish this you could base the front based on which way the robot is turned, which would only require a gyro. However if you want to stick with a button switch there shouldn't be any reason you cannot code another version of your drive controls with the values reversed in a way that powers everything backwards, and then assigning that command to as you said the Y button. Which language are your programming in?
__________________

-2012 San Diego Regional Winners with 4161 and 3476
-2012 Championship Newton Field Competitors
-2012 Battle at the Border Semi Finalists with 812 and 1622
-2013 San Diego Regional Quarter Finalists with 4014 and 2543
-2013 Inland Empire Quarter Finalists with 1138 and 1422
-2013 Battle at the Border Quarter Finalists with 3341, 3647, and 4160 and Gracious Professionalism Award winners
-2013 Fall Classic Finalists with 696, 1836, and 3309 and Team Spirit Award winners
With FRC team 3255 from 2012 through 2014
  #3   Spotlight this post!  
Unread 30-01-2014, 23:25
Reed501's Avatar
Reed501 Reed501 is offline
Team Captain
AKA: Reed Schrier
FRC #2637 (Phantom Catz)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Palos Verdes
Posts: 20
Reed501 is an unknown quantity at this point
Re: Reversing Drive Controls

We're programming in C++, and we're driving with new RobotDrive(Talon*, Talon*) and splitting the motor controllers for dual output. We'd have to set up a different driving system, huh?
  #4   Spotlight this post!  
Unread 30-01-2014, 23:30
TheNightviz's Avatar
TheNightviz TheNightviz is offline
Driving it like I stole it.
AKA: Parker
no team
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Escondido CA
Posts: 12
TheNightviz is an unknown quantity at this point
Re: Reversing Drive Controls

Thinking about it I'm sure there are many different ways to accomplish this. If you are looking for something somewhat simple though that's what would come to mind for me. However I am more used to Java for FRC so I could be way off basis on this translating to C++. If I'm thinking about it right though all you would have to do is take a negative value, or positive depending on what drives the robot "forward", and have a copy of your drive method/command that uses the opposite joystick value. With your dual output for the Talons I believe this should work rather well, and it would be easy to map to a on/off button.
__________________

-2012 San Diego Regional Winners with 4161 and 3476
-2012 Championship Newton Field Competitors
-2012 Battle at the Border Semi Finalists with 812 and 1622
-2013 San Diego Regional Quarter Finalists with 4014 and 2543
-2013 Inland Empire Quarter Finalists with 1138 and 1422
-2013 Battle at the Border Quarter Finalists with 3341, 3647, and 4160 and Gracious Professionalism Award winners
-2013 Fall Classic Finalists with 696, 1836, and 3309 and Team Spirit Award winners
With FRC team 3255 from 2012 through 2014
  #5   Spotlight this post!  
Unread 30-01-2014, 23:59
buildmaster5000 buildmaster5000 is offline
Trying to program the swerve drive
AKA: Alex
FRC #2421 (Rolling Thunder Robotics)
Team Role: Alumni
 
Join Date: May 2009
Rookie Year: 2009
Location: Northern Virginia
Posts: 207
buildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud ofbuildmaster5000 has much to be proud of
Re: Reversing Drive Controls

Perhaps you could have a boolean flag that controls whether to reverse some input values. Simple, effective...PERFECT
__________________
-Alex



2010 Washington DC Regional: Engineering Excellence Award
  #6   Spotlight this post!  
Unread 31-01-2014, 00:15
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Reversing Drive Controls

It's actually quite simple. Add a case if the button is pressed, and multiply your joystick inputs by -1. This will reverse what is coming from the joystick.
__________________
I'm right 90% of the time, so why worry about the other 3%?
  #7   Spotlight this post!  
Unread 31-01-2014, 00:47
Alpha Beta's Avatar
Alpha Beta Alpha Beta is offline
Strategy, Scouting, and LabVIEW
AKA: Mr. Aaron Bailey
FRC #1986 (Team Titanium)
Team Role: Coach
 
Join Date: Mar 2008
Rookie Year: 2007
Location: Lee's Summit, Missouri
Posts: 763
Alpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond reputeAlpha Beta has a reputation beyond repute
Re: Reversing Drive Controls

Quote:
Originally Posted by Cecil View Post
It's actually quite simple. Add a case if the button is pressed, and multiply your joystick inputs by -1. This will reverse what is coming from the joystick.
For anyone searching this thread later looking for a labview solution...

__________________
Regional Wins: 2016(KC), 2015(St. Louis, Queen City), 2014(Central Illinois, KC), 2013(Hub City, KC, Oklahoma City), 2012(KC, St. Louis), 2011(Colorado), 2010(North Star)
Regional Chairman's Award: 2014(Central Illinois), 2009(10,000 Lakes)
Engineering Inspiration: 2016(Smoky Mountain), 2012(Kansas City), 2011(Denver)
Dean's List Finalist 2016(Jacob S), 2014(Cameron L), 2013(Jay U), 2012(Laura S), 2011(Dominic A), 2010(Collin R)
Woodie Flowers Finalist 2013 (Aaron Bailey)
Championships: Sub-Division Champion (2016), Finalist (2013, 2010), Semifinalist (2014), Quaterfinalist (2015, 2012, 2011)
Other Official Awards: Gracious Professionalism (2013) Entrepreneurship (2013), Quality (2015, 2015, 2013), Engineering Excellence (Champs 2013, 2012), Website (2011), Industrial Design (Archimedes/Tesla 2016, 2016, 2015, Newton 2014, 2013, 2011), Innovation in Control (2014, Champs 2010, 2010, 2008, 2008), Imagery (2009), Regional Finalist (2016, 2015, 2008)
  #8   Spotlight this post!  
Unread 31-01-2014, 01:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Reversing Drive Controls

Quote:
Originally Posted by Alpha Beta View Post
For anyone searching this thread later looking for a labview solution...

I generally advise against having a toggle function for a driver input. Unless you put some kind of obvious indicator on the robot itself, knowing which side is the front isn't always easy before you start driving. It can cause problems if the robot moves in the direction opposite the driver's intent.

I would suggest instead using a pair of controller buttons, one to select "forward" and the other to select "backward" driving. That way the driver can always select the one he wants, and won't have to do a tentative drive maneuver before possible toggling to the other orientation.
  #9   Spotlight this post!  
Unread 31-01-2014, 14:20
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Reversing Drive Controls

Quote:
Originally Posted by Alan Anderson View Post
I generally advise against having a toggle function for a driver input. Unless you put some kind of obvious indicator on the robot itself, knowing which side is the front isn't always easy before you start driving. It can cause problems if the robot moves in the direction opposite the driver's intent.

I would suggest instead using a pair of controller buttons, one to select "forward" and the other to select "backward" driving. That way the driver can always select the one he wants, and won't have to do a tentative drive maneuver before possible toggling to the other orientation.
I agree with this. Having user feedback so they driver/operator knows what state everything is in without having to remember it themselves is always the best option.
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 18:37.

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