Go to Post While youth is wasted on the young, in FRC knowledge can be wasted on those a bit older. - IKE [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 13-02-2006, 07:47
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
How does disabled mode work?

I am interested in building a loop that calibrates the gyro bias while the robot is disabled.

1) Is that legal, as long as there are no PWM outputs, etc.

2) What part of the code is running while the robot is disabled? Process_Data_From_Master_uP()? main()? Process_Data_From_Local_IO()? Is statusflag.NEW_SPI_DATA ever set to true? Does that matter, if the gyro is handled in Process_Data_From_Local_IO()?

Thanks in advance,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.'
Goethe, Faust
  #2   Spotlight this post!  
Unread 13-02-2006, 08:06
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,113
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: How does disabled mode work?

From the point of view of the robot code, the only thing that's different is the value of the disabled mode flag. All the routines run; all the inputs work. Serial communication, analog inputs, and digital I/O all function exactly the same whether or not the robot is disabled.

None of the actual relay or pwm outputs will be active when the robot is disabled. That's all there is to it.
  #3   Spotlight this post!  
Unread 13-02-2006, 09:17
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: How does disabled mode work?

Thanks for the fast reply.

Is operating sensors during competition while disabled legal? Desirable?

What about the camera? It communicates using serial, but has PWMs on board. Can I adjust these? If so, can Kevin's code be reworked to lock on pre-match?

Thanks,
Robinson
__________________
'... who are you, then?'
'I am part of that power which eternally
wills evil and eternally works good.'
Goethe, Faust
  #4   Spotlight this post!  
Unread 13-02-2006, 09:23
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: How does disabled mode work?

They have ruled that it is legal to operate the camera servos from the camera's on board PWM controls before the match starts. We did this last year, and the robot would determine which vision tetras was out before the other teams finished setting up .
  #5   Spotlight this post!  
Unread 13-02-2006, 11:25
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,113
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: How does disabled mode work?

It's perfectly fine to read sensors while the robot is disabled. In fact, sometimes it's important to do so. For example, when you're using a solid-state gyro, you need to calibrate it before you start moving, and you need to read it consistently in order to track your heading.

The camera is considered a sensor rather than an actuator. If its servos are only controlling the direction it's looking, having those servos active even when the robot is disabled is permitted.

Changing this year's camera code to use camera-connected servos is neither trivial nor obvious. I think it might actually have worked better if I had started with last year's code instead.
  #6   Spotlight this post!  
Unread 13-02-2006, 11:47
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: How does disabled mode work?

Quote:
Originally Posted by gnirts
...can Kevin's code be reworked to lock on pre-match?
Yes, it can. I started working on this a few weeks ago, but my day gig sucked away any free time I had to work on it. But now I can. I have a new version of tracking.c that does all servo manipulation through two new functions. I haven't had a chance to test it yet, but if you'd like to, here's a link: http://kevin.org/frc/frc_camera_beta.zip. Please report back here with the results of testing. I'll be able to work on this tonight, but it would be most helpful if I knew this code worked (or not) before I leave work.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Designs that would never work... Cyberguy34000 Technical Discussion 60 09-01-2007 20:56
RC getting spontaneously disabled Shu Song Control System 14 12-02-2005 21:00
A little question about the autonomous mode Anton Programming 4 18-01-2005 14:08
A serious (FATAL) error in the FRC documentation (competition_mode) KenWittlief Programming 17 29-03-2004 13:47
Initializing autonomous mode Mr. Lim Programming 7 02-02-2004 07:26


All times are GMT -5. The time now is 01:36.

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