Go to Post Joining a FIRST team is the beginning of "smart," not the culmination. - klrswift [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 21-01-2005, 10:49
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Question Using REAL ENGLISH in autonomous mode???

At the kickoff, they were saying that you could use real english to program in autonomous mode, but there is nothing supporting that statement. They said you could do this:
Quote:
Drive forward 1000mm
Turn left
Drive forward 1000mm
There is nothing on the CD or in the MPLAB software to enable you to do this, so how does it work?
  #2   Spotlight this post!  
Unread 21-01-2005, 11:13
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,919
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: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by RIgnazio
At the kickoff, they were saying that you could use real english to program in autonomous mode, but there is nothing supporting that statement. They said you could do this:

There is nothing on the CD or in the MPLAB software to enable you to do this, so how does it work?
You'll find the forum discussions on this at:
http://www.chiefdelphi.com/forums/showthread.php?t=32870

The scripting code is located at http://kevin.org/frc/
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 21-01-2005, 13:28
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Unhappy Re: Using REAL ENGLISH in autonomous mode???

I looked at all of that, and then I went to www.kevin.org/frc and there was nothing about using the plain english to run the controller. Please help. I will look at the link you gave me again, hoping for an answer.
  #4   Spotlight this post!  
Unread 21-01-2005, 13:35
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by RIgnazio
there was nothing about using the plain english to run the controller.
I think you're misunderstanding exactly what it is they're providing. In the navigation code on the kevin.org site, you will find a file called "commands.h" that contains this:
Code:
struct commands command_list[] = {

/*   Command              parm 1     parm 2   parm 3   */
/*
{CMD_GYRO_BIAS,               0,        0,      0},
{CMD_WAIT_FOR_BUMP,         100,        0,      0},
{CMD_WAIT,                 1000,        0,      0},
{CMD_TURN,       -1571L,      100,      0},
{CMD_WAIT_FOR_BUMP,         100,        0,      0},
{CMD_WAIT,                 1000,        0,      0},
{CMD_TURN,        1571,      100,      0},
{CMD_JUMP,                    1,        0,      0},
{NULL,                        0,        0,      0}
*/

{CMD_GYRO_BIAS,               0,        0,      0},
{CMD_WAIT_FOR_BUMP,         100,        0,      0},
{CMD_WAIT,                 1000,        0,      0},
{CMD_DRIVE,                1500,        0,      0},
{CMD_WAIT,                 4000,        0,      0},
{CMD_TURN,       (-1500),       50,      0},
{CMD_WAIT,                 3000,        0,      0},
{CMD_DRIVE,                2400,        0,      0},
{CMD_WAIT,                 4000,        0,      0},
{CMD_TURN,        (PI_MRAD / 2),       50,      0},
{CMD_WAIT,                 4000,        0,      0},
{CMD_DRIVE,                2400,        0,      0},
{CMD_WAIT,                 4000,        0,      0},
{CMD_TURN,       (-1500),       50,      0},
{CMD_WAIT,                 1000,        0,      0},
{CMD_DRIVE,                   0,        0,      0},
{CMD_KEEP_HEADING,       240000,      100,      0},
{CMD_JUMP,                    1,        0,      0},
{NULL,                        0,        0,      0}

};
This scripting language is what they were referring to at kickoff. It's not "plain english" but it's much closer than regular C code .
  #5   Spotlight this post!  
Unread 21-01-2005, 13:38
ahecht's Avatar
ahecht ahecht is offline
'Luzer'
AKA: Zan
no team
Team Role: Alumni
 
Join Date: Dec 2001
Rookie Year: 2002
Location: Billerica, MA
Posts: 978
ahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond reputeahecht has a reputation beyond repute
Send a message via ICQ to ahecht Send a message via AIM to ahecht Send a message via Yahoo to ahecht
Re: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by RIgnazio
I looked at all of that, and then I went to www.kevin.org/frc and there was nothing about using the plain english to run the controller. Please help. I will look at the link you gave me again, hoping for an answer.
Well, Dave Lavery stretched the truth a bit when he said it was plain english. Your:
Quote:
Drive forward 1000mm
Turn left
Drive forward 1000mm
would be

{CMD_DRIVE, 1000, 0, 0},
{CMD_TURN, (PI_MRAD / 2), 50, 0},
{CMD_DRIVE, 1000, 0, 0},
{NULL, 0, 0, 0}

in commands.h
__________________
Zan Hecht

Scorekeeper: '05 Championship DaVinci Field/'10 WPI Regional
Co-Founder: WPI-EBOT Educational Robotics Program
Alumnus: WPI/Mass Academy Team #190
Alumnus (and founder): Oakwood Robotics Team #992


"Life is an odd numbered problem the answer isn't in the back of the book." — Anonymous WPI Student
  #6   Spotlight this post!  
Unread 21-01-2005, 13:43
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by ahecht
{CMD_DRIVE, 1000, 0, 0},
{CMD_TURN, (PI_MRAD / 2), 50, 0},
{CMD_DRIVE, 1000, 0, 0},
{NULL, 0, 0, 0}

in commands.h

So if i want to use that in autonomous, do i just write that in the autonomous part in user_routines_fast.c?
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
  #7   Spotlight this post!  
Unread 21-01-2005, 13:45
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Re: Using REAL ENGLISH in autonomous mode???

Thank you both for your help. What I did not understand is where these commands were being called from. I have one last question: With gyro.c/h and commands.c/h, how does it know which PWMs your motors are on? Yes, your robot could get bumped, but if your drive motors are on PWM3 and PWM4 and it is trying to control PWM1 and PWM2, how would it know?
  #8   Spotlight this post!  
Unread 21-01-2005, 13:46
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Re: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by Code\\Pilot
So if i want to use that in autonomous, do i just write that in the autonomous part in user_routines_fast.c?
Yes. I knew you could do that all along, but I was having problems understanding where it was calling it from which I now know as commands.h, and what PWM it is controlling.
  #9   Spotlight this post!  
Unread 21-01-2005, 14:12
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by RIgnazio
Thank you both for your help. What I did not understand is where these commands were being called from. I have one last question: With gyro.c/h and commands.c/h, how does it know which PWMs your motors are on? Yes, your robot could get bumped, but if your drive motors are on PWM3 and PWM4 and it is trying to control PWM1 and PWM2, how would it know?
On your OI board, you have the pins indicating which pwm you are plugging your motors into. In the program you specify the pwms you are sending the signal to.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #10   Spotlight this post!  
Unread 21-01-2005, 16:23
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: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by Dave Flowerday
This scripting language is what they were referring to at kickoff. It's not "plain english" but it's much closer than regular C code .
Actually, we have some code that includes far more complex commands that we may or may not release in the future. Right now I'm working on the "CMD_ORDER_MORE_PIZZA" command. For a laugh, last night we used the newly finished "CMD_STOP_AND_CATCH_FIRE" command on some unsuspecting freshmen <evil grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #11   Spotlight this post!  
Unread 21-01-2005, 20:14
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Arrow Re: Using REAL ENGLISH in autonomous mode???

NICE!
If only those really worked, I would love it. Just somehow hook a Cordless phone to a PWM in and PWM out, and have it actually call Pizza Hut and order a pizza. I wonder if they accept digital robot money

But I am still wondering how it knows which PWM to control. It is set in the program, but where? Unless it is COMPLETELY different from EDU Programming, as that is all I really have experience with, as this is my rookie year.
  #12   Spotlight this post!  
Unread 21-01-2005, 20:27
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: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by RIgnazio
But I am still wondering how it knows which PWM to control. It is set in the program, but where? Unless it is COMPLETELY different from EDU Programming, as that is all I really have experience with, as this is my rookie year.
From the pid.h file:

/* Define your pwm values for the left and right wheels. */
#define wheel_l pwm01
#define wheel_r pwm03


-Kevin


__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #13   Spotlight this post!  
Unread 21-01-2005, 21:24
RIgnazio RIgnazio is offline
Registered User
no team
Team Role: Webmaster
 
Join Date: Jan 2005
Rookie Year: 2004
Location: .
Posts: 45
RIgnazio will become famous soon enough
Re: Using REAL ENGLISH in autonomous mode???

Thanks
  #14   Spotlight this post!  
Unread 16-02-2005, 19:54
Moloch's Avatar
Moloch Moloch is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Michigan
Posts: 39
Moloch can only hope to improve
Re: Using REAL ENGLISH in autonomous mode???

So....your supposed to be able to just type in user_routines_fast.c :
{CMD_DRIVE, 1000, 0, 0},
{CMD_TURN, (PI_MRAD / 2), 50, 0},
{CMD_DRIVE, 1000, 0, 0},
{NULL, 0, 0, 0

and your auto works??
  #15   Spotlight this post!  
Unread 17-02-2005, 17:19
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: Using REAL ENGLISH in autonomous mode???

Quote:
Originally Posted by Moloch
So....your supposed to be able to just type in user_routines_fast.c :
{CMD_DRIVE, 1000, 0, 0},
{CMD_TURN, (PI_MRAD / 2), 50, 0},
{CMD_DRIVE, 1000, 0, 0},
{NULL, 0, 0, 0

and your auto works??
No. Technically speaking, the script is read, not executed. If you look through the navigation code (specifically, robot.c and robot.h), you will find that it is actually a large conglomeration of a bunch of state machines.

The sample script is in commands.h. There is no commands.c.
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
A little question about the autonomous mode Anton Programming 4 18-01-2005 14:08
Wolrd Triple Play Autonomous Mode (WAM) Standards Natchez General Forum 3 11-01-2005 15:52
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


All times are GMT -5. The time now is 13:15.

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