Go to Post All this community stuff is actually pretty fun! :) - JBotAlan [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 10-12-2015, 23:34
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
Encoders not getting reset after Autonomous for Teleop.

Hi,
We are using the encoder cables connected to the Neverest motors and for the autonomous we are setting the DC Controller to RUN_TO_POSITION mode. We call RESET_ENCODERS at the beginning and the end of the autonomous and it seems to fairly reliable. The main issue is when we switch to the Teleop, the drive motors are messed up and they just rotate in place with the joystick. Seems like the encoders did not reset. So we tried to set the drive motor DC controllers in Teleop to run without encoders and it still does not make a difference. If we power cycle the robot after running Autonomous, Teleop drive controls have no problem. Are we missing any other setting? How do we reset the encoders after Autonomous without power cycling the robot.

Thanks
Charging Champions
Team 8660
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
  #2   Spotlight this post!  
Unread 11-12-2015, 10:04
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,723
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: Encoders not getting reset after Autonomous for Teleop.

I'm not familiar with the FTC programming, but have you tried doing a reset at the start of teleop? It doesn't sound like the quickest way to get going, but starting a few milliseconds late is almost always better than being "messed up".
__________________

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.
  #3   Spotlight this post!  
Unread 11-12-2015, 14:57
FRC Team CC FRC Team CC is offline
Registered User
FRC #6560 (Charging Champions)
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Southern California
Posts: 107
FRC Team CC is an unknown quantity at this point
Re: Encoders not getting reset after Autonomous for Teleop.

Yes we did reset encoders and set the controller mode as "RUN_WITHOUT_ENCODERS" in TeleOp. Even forced the motor.setTargetPosition(0) at the end of Autonomous. still the drive motors are out of whack after autonomous and are rather spinning on its own axis. Independently TeleOp and Autonomous run fine.
__________________
The Charging Champions
FTC Team #8660
Facebook Page: https://www.facebook.com/chargingchampions
Follow us on Twitter: @FtcTeamCC
Google Plus: https://plus.google.com/112552147224383900922/posts
Youtube channel: https://www.youtube.com/channel/UCop...G3zsvQKCXF4ESQ
Blog: http://chargingchampionsblog.blogspot.com/
  #4   Spotlight this post!  
Unread 11-12-2015, 15:52
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,723
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: Encoders not getting reset after Autonomous for Teleop.

This is a shot in the dark, but did you perhaps declare the controllers separately for autonomous vs teleop? I remember we did this a couple of years ago. This will result in two separate sets of controller objects trying to control the same physical controller. Depending on the programming model, it may either fail to properly instantiate the teleop version, or the two may fight each other.

Seeing the code would be very helpful in debugging; often the error is somewhere completely away from where you are looking.
__________________

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.
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 03:14.

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