Go to Post I'd like to think that I'm at least a sometimes useful mentor. - artdutra04 [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 24-03-2003, 02:08
punarhero's Avatar
punarhero punarhero is offline
Registered User
#0696 (Clark Magnet Robotics)
Team Role: Programmer
 
Join Date: Jan 2002
Location: la crescenta
Posts: 67
punarhero is an unknown quantity at this point
Send a message via AIM to punarhero Send a message via Yahoo to punarhero
Autonomous Programming workshop at LA Regional

Hi everyone,
I have received quite a few e-mails over last weeks from team who were unable to program autonomous mode during the build season. To help them out, we, team 696, think it is a good idea to run an autonomous Programming Workshop at LA regional.
We have a dead reckoning code that I think is very adaptable. Since most of the teams who don’t have autonomous would probably run on dead reckoning, we’ll share our code with them since it is very easy to modify.
Because we only have 15 students in our team, I would appreciate if any other teams can help us with running this workshop. Since we’ll be running this workshop all day Thursday, Friday, and Saturday, please e-mail me, punarhero@yahoo.com, the personnel on your team who can assist and the time they can assist, so that I can make a schedule.
I think it’ll be great if we have more robots running autonomous in our regional than any other.
Please e-mail me ASAP.
Thanks,

Punar Sikka
Clark Magnet High School
Team 696
www.team696.org
punarhero@yahoo.com
  #2   Spotlight this post!  
Unread 26-03-2003, 19:21
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
See... I would so help you.. except we're going to the midwest regionals this weekend... and since our autonomous mode works really well, I have nothing to program all weekend.. oh well.. poor me
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net
  #3   Spotlight this post!  
Unread 28-03-2003, 00:09
punarhero's Avatar
punarhero punarhero is offline
Registered User
#0696 (Clark Magnet Robotics)
Team Role: Programmer
 
Join Date: Jan 2002
Location: la crescenta
Posts: 67
punarhero is an unknown quantity at this point
Send a message via AIM to punarhero Send a message via Yahoo to punarhero
What did you use for programming???

Since you said your program works so well, I was just curious. How did you program it? I mean, is it dead reckoning or uses some mechanical device like sensors.

Also, if it is dead reckoning, did you user select command or count the loops.
I'll really like to take a look at your program, and compare it to ours. We used a select command and counted loops to run autonomous.
My e-mail address is punarhero@yahoo.com

Please send me a copy of your code whenever you have time
__________________
Punar Sikka
Clark Magnet Robotics
Team 696
www.team696.org
  #4   Spotlight this post!  
Unread 28-03-2003, 22:12
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
I guess you could call our code dead reckoning... but not quite. What ours does is during practice or whenever we have the chance we have the operator run the robot in whatever way we want it to. While the operator is doing this, the program records all the movements that were made with the joystick. During autonomous mode, the program sends the recorded joystick movements to the robot and voila! we have a great autonomous run.. and we got lucky last week at ypsi and recorded an excellent pattern to follow. We've been using it ever since.

Now as for how it works, we aren't going to release that until after our last regional (next week) unless we make it into nationals in which case we'll release it after then. Honestly, it really is quite simple to implement, and we can store up to 8 different programs at once. It is simliar to the "copycat" program in the white papers section, but ours is much simpler... mainly because it runs off our hardware timer (see below)

As for selection of user programs.. we put 3 switches on our board that the operator selects, and the state of these switches is recorded every loop.. until autonomous mode is activated at which point it stops recording the value since obviously it is invalid at that point.. and runs the appropriate program.

Code:
if auto_button = 1 OR auton_mode = 1 then 
	
	select (auto_select)
		case 0		'joy 1
			run 2
		case 1		'joy 2
			run 3
		case 2		'joy 3
			run 4
		case 3 		'joy 4
			run 5
		case 4 		'joy 5
			run 2
		case 5		'joy 6
			run 3
		case 6		'joy 7
			run 4
		case 7
			'do nothing... just in case :-)
	endselect	

else
	gosub operator_control
endif
For all timing on our bot, we have a hardware pulse generator (a 555 timer) that generates a pulse every 1/5th second and we increment a counter at every transition, thus getting 1/10th second resolution. It really is so much easier to do than counting loops because it is consistant, and doesn't vary according to how much code you write or if you have a really long branch of code or anything. It really makes things so much simpler. I am only aware of a few teams which have a device such as this actually. And everything on our bot is based off this timer.. if it broke we would not be able to function really... which is why we built 3

But look for us to release our code (which is actually commented pretty good) next week if we dont get to go to nationals..

[edit]
Another thing I forgot to mention is because of the presence of that timer... our code isn't very easy to adapt to other robots..
[/edit]
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net

Last edited by randomperson : 28-03-2003 at 22:23.
  #5   Spotlight this post!  
Unread 08-04-2003, 23:00
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
Yep.. stuck my code in the white papers section.. probably too late to use until next year, but a good read nonetheless
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net
  #6   Spotlight this post!  
Unread 09-04-2003, 01:23
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
If anyone is interested, our code (which worked perfectly everytime we used it), it's up now on our website: http://www.cogsquad.org/downloads/

As always, feel free to email/PM me with any questions you have about it.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
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
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
Autonomous programming Dush Programming 4 20-02-2003 09:54
autonomous sensor programming ? Laura_d Programming 1 10-02-2003 17:46
How do you do the autonomous programming? Ryan Collings Programming 11 07-02-2003 19:38
How far is everyone in their autonomous programming AlphaOmega870 Programming 33 21-01-2003 21:03


All times are GMT -5. The time now is 09: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