Go to Post I really think we need to keep our pitchforks sheathed and torches unlit until we here more news and get more details. - IndySam [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 04-16-2018, 11:24 AM
Kulkinz's Avatar
Kulkinz Kulkinz is offline
Registered User
AKA: Cool Kornak
FRC #4334 (Alberta Tech Alliance)
Team Role: Programmer
 
Join Date: Feb 2018
Rookie Year: 2018
Location: Calgary
Posts: 4
Kulkinz is an unknown quantity at this point
Question How do we make it so our bot comes to a slow stop?

Not sure where is the best place to put this, so I am putting it here.

Our robot drives around well, but when we let go of our left stick, it comes to a complete stop almost immediately. That's fine the majority of the time, but we are working on a summer project where we don't want that to happen. We want it so that once you let go of the stick, it will slow down, but not stop right away. How should that be implemented? Is there something we need to do electrically with our speed controllers? Do we need to do something in the code (we use Java)? Any help would be useful.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-16-2018, 11:29 AM
pkrishna3082's Avatar
pkrishna3082 pkrishna3082 is offline
love/hate relationship with swerve
AKA: Parthiv Krishna
FRC #3082 (Chicken Bot Pie) and FTC #13471 Mentor (Minnetonka)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Minnetonka, MN, USA
Posts: 617
pkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond repute
Re: How do we make it so our bot comes to a slow stop?

Which speed controllers are you using? Any of the FRC-legal speed controllers will allow you to configure them into "Coast" mode instead of "Brake" mode, which will prevent these abrupt stops. However, each one is different, so let me know which one you're using so that I can help you
__________________

My posts constitute my opinions, and mine alone, and are not representative of the views held by my team.
2010-2011: FLL 11083, 13873 (Minnetonka Silver) - Programmer
2016-: FRC 3082 (Chicken Bot Pie) - Captain (2+ yrs), Programming Lead (3+ yrs), Driver (2+ yrs), Operator (1 yr), 2017&2018 Dean's List Finalist
2017-: FTC 13471 (Minnetonka/Tater Bot Hot Dish) - Founding Mentor
2017-: FIRST Volunteer - 2017 North Champs Student Ambassador
Reply With Quote
  #3   Spotlight this post!  
Unread 04-16-2018, 11:36 AM
Kulkinz's Avatar
Kulkinz Kulkinz is offline
Registered User
AKA: Cool Kornak
FRC #4334 (Alberta Tech Alliance)
Team Role: Programmer
 
Join Date: Feb 2018
Rookie Year: 2018
Location: Calgary
Posts: 4
Kulkinz is an unknown quantity at this point
Re: How do we make it so our bot comes to a slow stop?

We are using Talon SRXs.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-16-2018, 11:40 AM
AriMB's Avatar
AriMB AriMB is offline
The Philadelphian emigrant
AKA: Ari Meles-Braverman
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 1,458
AriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond reputeAriMB has a reputation beyond repute
Re: How do we make it so our bot comes to a slow stop?

In that case, you set the brake/coast mode in software. You can either do it via the webdash (roborio-TEAM-frc.local) or set it programmically in your code. There are methods in all of the languages to select brake/coast mode, and if you set it programmatically you can even change it mid-match depending on how you want the robot to act.
__________________
Studying MechE at the Technion - Israel Institute of Technology
2017-present: Technical Mentor FRC 5987
2017-present: CSA/FTAA for FIRST Israel
2012-2016: Member FRC 423 Captian, Programmer (LabVIEW), Electrical, CAD, Manipulator, Chassis, Business, Outreach (everything)
Reply With Quote
  #5   Spotlight this post!  
Unread 04-16-2018, 11:41 AM
pkrishna3082's Avatar
pkrishna3082 pkrishna3082 is offline
love/hate relationship with swerve
AKA: Parthiv Krishna
FRC #3082 (Chicken Bot Pie) and FTC #13471 Mentor (Minnetonka)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Minnetonka, MN, USA
Posts: 617
pkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond repute
Re: How do we make it so our bot comes to a slow stop?

Quote:
Originally Posted by Kulkinz View Post
We are using Talon SRXs.
In Java you are going to want to call

Code:
talon.setNeutralMode(NeutralMode.Coast);
for each of your drive controllers. For example, this is what we have in our drivetrain subsystem:

Code:
srxLeftMaster.setNeutralMode(NeutralMode.Coast);
srxLeftSlave.setNeutralMode(NeutralMode.Coast);
srxRightMaster.setNeutralMode(NeutralMode.Coast); 
srxRightSlave.setNeutralMode(NeutralMode.Coast);
Test it out, I think it should be what you're looking for. If it's still too abrupt, you are going to want to implement some sort of voltage ramp, which can also be done directly on the Talon SRX. Coast mode should work, though.

Hope that helps.
__________________

My posts constitute my opinions, and mine alone, and are not representative of the views held by my team.
2010-2011: FLL 11083, 13873 (Minnetonka Silver) - Programmer
2016-: FRC 3082 (Chicken Bot Pie) - Captain (2+ yrs), Programming Lead (3+ yrs), Driver (2+ yrs), Operator (1 yr), 2017&2018 Dean's List Finalist
2017-: FTC 13471 (Minnetonka/Tater Bot Hot Dish) - Founding Mentor
2017-: FIRST Volunteer - 2017 North Champs Student Ambassador
Reply With Quote
  #6   Spotlight this post!  
Unread 04-16-2018, 11:42 AM
Kulkinz's Avatar
Kulkinz Kulkinz is offline
Registered User
AKA: Cool Kornak
FRC #4334 (Alberta Tech Alliance)
Team Role: Programmer
 
Join Date: Feb 2018
Rookie Year: 2018
Location: Calgary
Posts: 4
Kulkinz is an unknown quantity at this point
Re: How do we make it so our bot comes to a slow stop?

Ah. Thanks for the help. If we have to switch to Victor SPXs for whatever reason, can we also set it in webdash or only in code?
Reply With Quote
  #7   Spotlight this post!  
Unread 04-16-2018, 11:48 AM
pkrishna3082's Avatar
pkrishna3082 pkrishna3082 is offline
love/hate relationship with swerve
AKA: Parthiv Krishna
FRC #3082 (Chicken Bot Pie) and FTC #13471 Mentor (Minnetonka)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Minnetonka, MN, USA
Posts: 617
pkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond reputepkrishna3082 has a reputation beyond repute
Re: How do we make it so our bot comes to a slow stop?

From what I understand, the mode that you specify in the roboRIO Configuration WebDashboard is the default mode, and the motor controller will be in that one upon startup. Any explicit changes in code will override that. So in theory, either way should work. However, I am more comfortable setting it in the program, because if you swap out a motor controller it will behave as you expect.

I believe that this is the case with both Talon SRX and Victor SPX. CTRE has done a good job making them behave very similarly on the software side.
__________________

My posts constitute my opinions, and mine alone, and are not representative of the views held by my team.
2010-2011: FLL 11083, 13873 (Minnetonka Silver) - Programmer
2016-: FRC 3082 (Chicken Bot Pie) - Captain (2+ yrs), Programming Lead (3+ yrs), Driver (2+ yrs), Operator (1 yr), 2017&2018 Dean's List Finalist
2017-: FTC 13471 (Minnetonka/Tater Bot Hot Dish) - Founding Mentor
2017-: FIRST Volunteer - 2017 North Champs Student Ambassador
Reply With Quote
  #8   Spotlight this post!  
Unread 04-16-2018, 12:48 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,352
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: How do we make it so our bot comes to a slow stop?

Quote:
Originally Posted by pkrishna3082 View Post
From what I understand, the mode that you specify in the roboRIO Configuration WebDashboard is the default mode, and the motor controller will be in that one upon startup. Any explicit changes in code will override that. So in theory, either way should work. However, I am more comfortable setting it in the program, because if you swap out a motor controller it will behave as you expect.

I believe that this is the case with both Talon SRX and Victor SPX. CTRE has done a good job making them behave very similarly on the software side.
My understanding is that whatever you set (whether via webdash or via code) will get persisted into the startup configuration for the SRX. In effect, the last setting of the setting wins.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #9   Spotlight this post!  
Unread 04-16-2018, 03:40 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 422
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: How do we make it so our bot comes to a slow stop?

Quote:
Originally Posted by Kulkinz View Post
Not sure where is the best place to put this, so I am putting it here.

Our robot drives around well, but when we let go of our left stick, it comes to a complete stop almost immediately. That's fine the majority of the time, but we are working on a summer project where we don't want that to happen. We want it so that once you let go of the stick, it will slow down, but not stop right away. How should that be implemented? Is there something we need to do electrically with our speed controllers? Do we need to do something in the code (we use Java)? Any help would be useful.

Brake coast mode is likely the answer, as others have stated.

If you do attempt to do something in software as well, a few general questions:
-Is it ok that you will be commanding the robot to move when the driver is giving a zero command? Is it always ok?
-For safety's sake, do you need to have an additional on-the-controller "estop" mechanism that immediately stops movement?

Usually when software takes direct control away from the driver, I believe this is a good analysis to at least think through.
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 05:49 AM.

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


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