Go to Post i'm not addicted to CD.com...i can stop anytime i want. - RogerR [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 01-03-2004, 22:43
bhawkins bhawkins is offline
Registered User
#1444 (Lightning Lancers)
Team Role: Webmaster
 
Join Date: Mar 2004
Location: St. Louis
Posts: 3
bhawkins is an unknown quantity at this point
Exclamation IR Navigate in Autonomous Mode

We are having an issue with the autonomous mode I am having some issues with the code and implementing it if I upload the tracker file modified to work with our bot the servos follow the beacon but I tried to merge everything into the default code the trackers don't move and the tracks don't move. Could someone who has implemented the navigate/tracker code into their default program please email it to webmaster@lhssfirst.dyndns.org. I can change the values for the pwm's for the servo and motors in the program.

We are using:
pwm 2 for extend
pwm 6 for elevate
pwm 9 and 10 for servo trackers
pwm 13 and 15 for track drive

Any help with any of the programming would be great. I tried to follow the other forums about implementing the code but really I need a working code to study and look at. This is how I learn the best. My strengths are in c++, vb and qbasic.

Also could someone explain how the included current sensors work and what equation is needed to come up with the number in the program. Thanks

Thank you
Brian Hawkins
Webmaster/Programmer
Lutheran South FIRST Robotics
http://lhssfirst.dyndns.org

Last edited by bhawkins : 01-03-2004 at 22:48. Reason: Forgot Current Sensors
  #2   Spotlight this post!  
Unread 01-03-2004, 23:21
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Re: IR Navigate in Autonomous Mode

Quote:
Originally Posted by bhawkins
Also could someone explain how the included current sensors work and what equation is needed to come up with the number in the program.
Ok, i won't write your autonomous for you, but I will tell you this. The current sensors are used to tell if the bot got stuck up against a wall or not. basically, for that bot, printf statements were used for the current sensors to see where they were when running normally, and what they drew ehen hitting the wall (lets say 550 normal and 750 when up againt a wall because they're stalling out). The cpu then checks to see if the sensors are above 700 and if they are, the cpu then averages out the last ten values to make sure it is consistant and not just a spike. (These sensors will not give a stable reading, believe you me.) So for your bot, just use a print f statement to see the value when the bot drives normally and when you're stalling out the motors. Subtract something like 50 from the stall value and set that as your new current max.

Quote:
Originally Posted by bhawkins
if I upload the tracker file modified to work with our bot the servos follow the beacon but I tried to merge everything into the default code the trackers don't move and the tracks don't move.
what i did was i took kevin's code for ir tracking, made a second copy of all of it and put it in a different folder. I then just cahnged the user_routines.c and such to use our inputs and outputs. It is much easier than trying to take the default code and incorporate all of the interupts and the like. That should work for you.

I hope I've been of some help.

-Kesich
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
  #3   Spotlight this post!  
Unread 04-03-2004, 21:24
bhawkins bhawkins is offline
Registered User
#1444 (Lightning Lancers)
Team Role: Webmaster
 
Join Date: Mar 2004
Location: St. Louis
Posts: 3
bhawkins is an unknown quantity at this point
Re: IR Navigate in Autonomous Mode

thanks i will work on that
  #4   Spotlight this post!  
Unread 04-03-2004, 22:40
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: IR Navigate in Autonomous Mode

what do you mean about merging the tracker code into your user code?

in the default SW main.c calls the auton subroutine, and the code stays in that subroutine until auton mode ends - so maybe you unwittingly put your auton (tracker) code in a different place? that could be why its not running at all.

They tell us not to edit main.c, but it really helps if you study it, make a flowchart of it, and understand how it works and when it calls the different subroutines.
  #5   Spotlight this post!  
Unread 04-03-2004, 23:10
bhawkins bhawkins is offline
Registered User
#1444 (Lightning Lancers)
Team Role: Webmaster
 
Join Date: Mar 2004
Location: St. Louis
Posts: 3
bhawkins is an unknown quantity at this point
Re: IR Navigate in Autonomous Mode

Quote:
Originally Posted by KenWittlief
what do you mean about merging the tracker code into your user code?

in the default SW main.c calls the auton subroutine, and the code stays in that subroutine until auton mode ends - so maybe you unwittingly put your auton (tracker) code in a different place? that could be why its not running at all.

They tell us not to edit main.c, but it really helps if you study it, make a flowchart of it, and understand how it works and when it calls the different subroutines.
I am having problems merging the navigate code by kevin and the code from innovation first. I moved the the navigate.h and .c tracker.h and .c and reciever.h and .c and in user rutines fast I initialized them. also i copied the interupt handler low from the navigate to the end of the code that was already there. I also added Navigate(); where it says insert code here.

I read somewhere that i need to remove a line from the navigate code so that it will not wait for a push of a button. Could someone tell me what line needs to be removed, i know where it is but i really dont know what all has to be removed from it.

Thanks
  #6   Spotlight this post!  
Unread 05-03-2004, 08:08
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: IR Navigate in Autonomous Mode

Quote:
Originally Posted by bhawkins
I read somewhere that i need to remove a line from the navigate code so that it will not wait for a push of a button. Could someone tell me what line needs to be removed, i know where it is but i really dont know what all has to be removed from it.

Thanks
This thread discusses ithttp://www.chiefdelphi.com/forums/showthread.php?t=25094
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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
test autonomous mode CharlieWilken Programming 14 20-02-2004 00:39
Initializing autonomous mode Mr. Lim Programming 7 02-02-2004 07:26
how can you use a gyro in autonomous mode magical hands Programming 3 02-01-2004 13:31
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


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

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