Go to Post We try to do cool stuff (note: I didn't say it always works). - marshall [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, 4.67 average. Display Modes
  #1   Spotlight this post!  
Unread 27-03-2005, 11:56
dm0ney's Avatar
dm0ney dm0ney is offline
Will Code For Food (Food Optional)
AKA: Deepak Mishra
None #0217 (The ThunderChickens)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Shelby Twp., MI
Posts: 48
dm0ney will become famous soon enough
Send a message via AIM to dm0ney
Making Debugging Easier

I've had several ideas to make debugging easier on us programmers or even just checking out the robot between matches.

Currently we have an autonomous selector switch on our robot. I inserted a special 'debug mode' that we can put any autonomous sequence in and test it and when we run out of time and cant reload code, its not a big deal.
Stemming off that, I was wondering what other ideas or solutions fellow programmers have had?

My next change to our code once the 'No Work' period is ended for our team (Nationals) is going to use a toggle switch on our OI to enable or disable printfs for pots and encoders. Those two are by far the two most used printfs on our team, so I hope to make it easier for us programmers to work.

Also, has any team used the Dashboard to read pot or encoder values? That was going to be another project on the horizon which I believe is exempt from the 'No Work' period because its not actual work on the robot.
Currently we use the dashboard to trim joysticks, although we did use it to monitor pwms before we got our robot to test code.

A few ideas in the works for later this year or next year are:

Three Pots that can plug into the OI and be used to tweak PID gains rapidly.
Utilizing the leds on the OI we have to enable us to deadband joysticks sans dashboard
Mini Dashboard viewer instead of a laptop (possibly pocketpc or the like)
Wireless programmer for use in those few hours programmers actually get the robot right before shipping it away.
???

These are all ideas which we have YET to get working but please add what programming easter eggs you have put into the code to make your life easier.


EDIT:
Dashbord Config of pots and encoders in although since only 4 digits, I have a call that looks somethin like this for encoders:
Code:
User_ByteX = (int) abs( (int) Get_Encoder_Counts(LEFT)) % 1000;
Trim joysticks done sans laptop using the userbytes so dashboard or OI itself, still working on a more compact dashboard display.
__________________

Alumni
Team #217, The ThunderChickens



Student, Class of 2009
California Institute of Technology



Last edited by dm0ney : 28-03-2005 at 01:39.
  #2   Spotlight this post!  
Unread 27-03-2005, 12:08
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: Making Debugging Easier

Quote:
Originally Posted by dm0ney
These are all ideas which we have YET to get working but please add what programming easter eggs you have put into the code to make your life easier.
The best addition I ever made was to print out joystick & pot values on the OI using the user byte. Flip a switch, move a joystick up/left and the joystick value is printed in the user mode display. Flip another switch, move a joystick up/left and a pot on the robot is printed. It saved me the time of downloading debug software whenever a pot was in question or was replaced. It also allows the drivers to calibrate the joysticks before every match & get the values perfect.
  #3   Spotlight this post!  
Unread 27-03-2005, 16:45
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Making Debugging Easier

Something that won our team an award from last year was a "debug box". It doubled as our arm control mechanism, but it had a big red button on it that said debug. When you were in debug mode you could hit a combination of 4 keys (or more) to change the way the robot operated. The changes would then be stored in the flash (?) memory so next time the controller booted, it would use the saved changes. The idea was to preprogram as much as you can to not need to recompile the program to do mundane changes.

A list of features was
- Enabling and Disabling the Right or Left motors
- Inverting the polarity on the Right or Left motors (this was useful for motor replacement)
- Changing the operator drive mode from one stick, two stick, or ultra topic secret mode
- Selecting which autonomous program to run
- Motor dampening
- Enabling and disabling specific debug statements
- Having one test autonomous program that you could hot script and save

This year we were planning on getting an rj-45 jack and hooking it into the digital ins/outs and then having a project box with LCDs on it as well as a keypad. The project box would then be able to hot plug into the robot and the LCDs would make a menu of sorts to replicate the same function as described before. They could have also been used to display output variables and such.
__________________
Suddenly being rejected from college feels right during the build season. Now I am a mentor.
  #4   Spotlight this post!  
Unread 27-03-2005, 17: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: Making Debugging Easier

Most of the pins on the programming port aren't used. I made a pair of "breakout" connectors that steal pins 7, 8, and 9 from the programming cable and provide remote control of the robot reset and program buttons. The RC end has a "pwm" cable connector for the remote switch pins, and the computer end has a two-way rocker switch with red=RESET and green=PROG sides (though a pair of momentary switches would work too).

Without this, the programmer has two options: either get up from the computer and kneel down by the robot to press PROG every time, or shout "Please press program!" and wait for someone to comply. When the robot was on our practice field, connected by a 25-foot cable, on the other side of the alliance station wall from the programmer, the remote switches were very handy.
  #5   Spotlight this post!  
Unread 28-03-2005, 01:32
dm0ney's Avatar
dm0ney dm0ney is offline
Will Code For Food (Food Optional)
AKA: Deepak Mishra
None #0217 (The ThunderChickens)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Shelby Twp., MI
Posts: 48
dm0ney will become famous soon enough
Send a message via AIM to dm0ney
Re: Making Debugging Easier

Quote:
Originally Posted by Alan Anderson
Most of the pins on the programming port aren't used. I made a pair of "breakout" connectors that steal pins 7, 8, and 9 from the programming cable and provide remote control of the robot reset and program buttons. The RC end has a "pwm" cable connector for the remote switch pins, and the computer end has a two-way rocker switch with red=RESET and green=PROG sides (though a pair of momentary switches would work too).
I DEFINITELY love that... throwing this out there, any ideas why sometimes IFI Loader can put the RC into program mode and then mysteriously cannot most other times?

I'm definitely going to look into doing a breakout connector like the one shown.

I actually wrote an implementation of some code that I can drop in at a later date today to allow the printfs to become obsolete and use the dashboard instead... I suppose its on to creating a dashboard prog to run on a pocketpc, palm, or somethin else.


"If mechanical can have their labeled blocks of wood for tap and drill sets, electrical can have their helping hands to solder, us programmers can DEFINITELY have all that and more. "
~D. Mishra
__________________

Alumni
Team #217, The ThunderChickens



Student, Class of 2009
California Institute of Technology


  #6   Spotlight this post!  
Unread 29-03-2005, 16:57
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: Making Debugging Easier

Our software read one of the otherwise unused joystick wheel inputs (yes, we used the old reliable black joysticks for the driver this year) and used its value to select among a set of User_Byte outputs to be viewed by a dashboard program. With the wheel at one end of its travel, it sent (the low 16 bits of) the three encoder wheel values. At the other end, it sent arm potentiometer feedback. Intermediate positions gave internal state information for the arm and drivebase control routines.

A separate "debug mode" switch selected between all of that and the regular "drive mode" dashboard data, which was basically monitoring the autonomous mode selection, the vision tetra detection, and a few feedback bits such as air compressor status.
  #7   Spotlight this post!  
Unread 04-04-2005, 11:02
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Talking Re: Making Debugging Easier

[quote=Alan Anderson]Most of the pins on the programming port aren't used. I made a pair of "breakout" connectors that steal pins 7, 8, and 9 from the programming cable and provide remote control of the robot reset and program buttons. The RC end has a "pwm" cable connector for the remote switch pins, and the computer end has a two-way rocker switch with red=RESET and green=PROG sides (though a pair of momentary switches would work too). QUOTE]

Can you provide a picture of the words above? Can you point to any IFI documentation that details the programming port?
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #8   Spotlight this post!  
Unread 04-04-2005, 19:09
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: Making Debugging Easier

[quote=marccenter]
Quote:
Originally Posted by Alan Anderson
Most of the pins on the programming port aren't used. I made a pair of "breakout" connectors that steal pins 7, 8, and 9 from the programming cable and provide remote control of the robot reset and program buttons. The RC end has a "pwm" cable connector for the remote switch pins, and the computer end has a two-way rocker switch with red=RESET and green=PROG sides (though a pair of momentary switches would work too). QUOTE]

Can you provide a picture of the words above? Can you point to any IFI documentation that details the programming port?
Yea, pinouts would be helpful, or at least what pins are not used.
  #9   Spotlight this post!  
Unread 06-04-2005, 22:07
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Making Debugging Easier

We used primarily printf()'s (again) for debugging. (though we had some issues with overlap.)
We took the 8 most significant bits off the pots on our arm and put those in the user bytes. That was very nice, since it seemed the pots were always loosing alignment. (And we were using a 'model' control for it.)

I also opened up PWMs 13-16 for debugging. So I could use CCP2_OUT (or whatever ), etc. for digital outs and pwm13-16 to see values on the dashboard.
  #10   Spotlight this post!  
Unread 06-04-2005, 23:51
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Making Debugging Easier

Quote:
Originally Posted by dm0ney
any ideas why sometimes IFI Loader can put the RC into program mode and then mysteriously cannot most other times?
The newest version of the master code (version 10) requires that you push the Program button before sending new code. The master code on last year's RC does not have this restriction. At first I thought it was just an idiosyncracy with our new programming computer, but someone from IFI told me that it is indeed a new feature (not a bug, mind you) in version 10. My best guess is that it is intended to make sure that anything you connect to the serial port (like, say, the camera) doesn't accidentally send the data sequence that sets the RC into Program mode and corrupt your code in the middle of a match.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #11   Spotlight this post!  
Unread 07-04-2005, 10:58
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Making Debugging Easier

Quote:
Originally Posted by dm0ney
My next change to our code once the 'No Work' period is ended for our team (Nationals) is going to use a toggle switch on our OI to enable or disable printfs for pots and encoders.
We have something similar to this. We have a 3-way switch that changes the OI mode between Driver mode, Joystick calibration, and Aux. The joystick calibration is what Mike described above. The Aux position allows us to remap any of our OI buttons/switches. For example, pressing one of our momentary switches in driver mode will trigger the pneumatics on one of our fingers while in aux mode it will toggle debug prints for the lift height encoder. Once we take it out of aux mode, the prints continue and we can move the lift to verify the state of the encoder. It is a real time saver and I would recommend it to anyone.
  #12   Spotlight this post!  
Unread 07-04-2005, 14:28
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Question Re: Making Debugging Easier

On a similar thing, has anyone tried something so that you can change constants w/o downloading code again? I'm thinking that's going to be my summer project.
  #13   Spotlight this post!  
Unread 07-04-2005, 14:54
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Making Debugging Easier

Quote:
Originally Posted by Astronouth7303
On a similar thing, has anyone tried something so that you can change constants w/o downloading code again? I'm thinking that's going to be my summer project.
This would be a cool project to work on. I sketched out a simple version but never got around to writing it. I figured the easiest way would be to implement a Get() and Put() function to read and write to the EEPROM and add a proxy layer to marshal calls through the serial port. You would need to tell the PC which EEPROM addresses represent which variables, but that can be encapsulated in a config file. If you write it I would use it.

Last edited by seanwitte : 07-04-2005 at 15:05.
  #14   Spotlight this post!  
Unread 07-04-2005, 15:20
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: Making Debugging Easier

Program port pinout is at http://www.ifirobotics.com/docs/program-port-4-7-05.pdf .. pins 9, 4, 6, and 1 are free, I love the IFI support forums
  #15   Spotlight this post!  
Unread 07-04-2005, 15:24
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: Making Debugging Easier

Quote:
Originally Posted by Astronouth7303
On a similar thing, has anyone tried something so that you can change constants w/o downloading code again? I'm thinking that's going to be my summer project.
I set something similar to this up with our joysticks and lift.. you can reset the center values of the joysticks by pressing a couple of buttons, and set new lift heights by putting the lift where you want it, and pressing some buttons. It works nicely, and the eeprom code is on the forums somewhere..
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
Making your robot drive easier ufa_mike Control System 32 28-04-2004 21:35
Wiring Diagram for making a Joystick Nick Fury Control System 0 10-02-2004 23:10
Team Communication - Making it easier Balbinot Website Design/Showcase 3 10-02-2004 13:50
What's easier? Last year or this year? archiver 2001 2 23-06-2002 23:33
FIRST, BattleBots & Marketing of Robotics Mike Soukup General Forum 12 12-12-2001 18:46


All times are GMT -5. The time now is 03:10.

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