Go to Post Is it January yet?? - Kevin Kolodziej [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: 2 votes, 4.50 average. Display Modes
  #1   Spotlight this post!  
Unread 06-01-2003, 16:03
Goya Goya is offline
Registered User
#0019 (Big Red)
 
Join Date: Jan 2003
Location: Greenwich, CT
Posts: 35
Goya is an unknown quantity at this point
Send a message via AIM to Goya
Autonomous Mode Assumptions

Can we assume that the p1_y and p1_x values will not change during autonomous mode?

If so, can we also use the change in those values to determine the end of autonomous mode?

Thanks in advance,
  #2   Spotlight this post!  
Unread 06-01-2003, 16:10
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
All the inputs from the player control side will be 127 (for analog) and 0 (for digital). Analog & digital inputs from sensors on the robot will have the correct value.

A better way to check the auton_mode bit. You can find more info in the Programming_Reference_Guide.pdf document on the IFI site, or look at some posts in other threads. I remember rbayer gave a good code snippet to use.

Mike
  #3   Spotlight this post!  
Unread 06-01-2003, 16:45
Morgan Jones Morgan Jones is offline
Registered User
no team
 
Join Date: Jan 2002
Location: Fairport, NY
Posts: 29
Morgan Jones is an unknown quantity at this point
You can check the auton_mode bit, but I think in my code, I will have the robot continue in autonomous mode until it receives input form the OI. That way, if the robot is doing fine by itself, the driver can let it continue on its own for a while longer. As soon as the driver needs/wants to take control, s/he just has to grab the joysticks.
__________________
Morgan Jones
Team 578: Fairport High School/Gleason Works
  #4   Spotlight this post!  
Unread 06-01-2003, 16:57
Goya Goya is offline
Registered User
#0019 (Big Red)
 
Join Date: Jan 2003
Location: Greenwich, CT
Posts: 35
Goya is an unknown quantity at this point
Send a message via AIM to Goya
That was the route I was planning to take.

In effect, the robot will be in "win" mode and will continue to play the game for the lazy drivers until they take over.

That's a lot cooler if the robot can react with the enviroment, like the movement of the boxes.
  #5   Spotlight this post!  
Unread 06-01-2003, 17:29
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Autonomous Mode

I like auton_mode better,

Code:
'   auton_mode		 VAR PB_mode.bit6
' PB_MODE = the first bit in the second byte on initialization
'Note: its a byte, but on initialization its the first BIT to turn on/off
     '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      ' Manipulation
      '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++

      if auton_mode <> ON then skipcontrol
         gosub sub_automation
      skipcontrol:
      
      if auton_mode <> OFF then skipautomation
         gosub sub_setRelays
         gosub sub_tankDrive
'      gosub sub_balance 'balances the robot uses sensor3
                         'eduRobot with yaw rate sensor + 2 servos                         
      skipautomation:
This is cut from our program (Team 691)
__________________
R
  #6   Spotlight this post!  
Unread 06-01-2003, 20:16
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
I wouldn't recomend having it break auto mode based on when the joysticks change. As we all know, those pesky trim knobs tend to get bumped every now and then, so some other value may end up becoming the "centered".

What you can do:
Have a switch on your Button Box that you can flip to break out of auto mode, or use one of the buttons on your joystick.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #7   Spotlight this post!  
Unread 06-01-2003, 20:57
Damian Manda's Avatar
Damian Manda Damian Manda is offline
The Damian
no team
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Fort Collins, CO
Posts: 154
Damian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud of
Send a message via AIM to Damian Manda
Quote:
Originally posted by rbayer
I wouldn't recomend having it break auto mode based on when the joysticks change. As we all know, those pesky trim knobs tend to get bumped every now and then, so some other value may end up becoming the "centered".
Also, If a driver happens to bump a joystick, it would jump out of autonomous mode, and the robot would just have to sit there for the rest of the period.

-Damian Manda
  #8   Spotlight this post!  
Unread 06-01-2003, 21:13
Goya Goya is offline
Registered User
#0019 (Big Red)
 
Join Date: Jan 2003
Location: Greenwich, CT
Posts: 35
Goya is an unknown quantity at this point
Send a message via AIM to Goya
If a driver does bump a joystick during the autonomous period, the value wont be transmitted to the RC. So bumping the joystick during the autonomous mode wont have any effect, while hitting it afterwards would place the robot into driver-mode. If the driver decides not to hit the joystick, then the bot will continue autonomously.

rbayer, I was also considering that approach, as it is much safer.
  #9   Spotlight this post!  
Unread 06-01-2003, 21:31
nwagers nwagers is offline
Registered User
#0240 (Mach Vee)
 
Join Date: Oct 2001
Location: Monroe, MI
Posts: 88
nwagers is an unknown quantity at this point
Send a message via AIM to nwagers Send a message via Yahoo to nwagers
detecting movement vs trim

It shouldn't be hard for the program to determine if the joystick was moved vs having the trim offset. The first time through the code after the autonomous mode is switched off simply save the input to a variable and check to see if the input matches the stored variable each successive time through the loop. If it is different then the joystick was moved. Also you might want to only allow for the initial variable to be in a certain range(like 120-134) that way if the driver has the joysticks moved before autonomous mode is turned off the program knows it isn't just a trim value. As far as accidentle bumps go, you could easily program a button to send it back into autonomous mode.
  #10   Spotlight this post!  
Unread 06-01-2003, 22:01
JC Denton JC Denton is offline
Registered User
#0159 (Alpine Robotics)
 
Join Date: Jan 2002
Location: Fort Collins, Colorado
Posts: 9
JC Denton is an unknown quantity at this point
would epoxy the jostic trim tabs a bad idea?
Is it allowed because I read in the manual that using any sort of chemical tampering with the joystix is illegal?
  #11   Spotlight this post!  
Unread 06-01-2003, 22:08
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
Sticks

We just cover ours in electrical tape. Works well enough, and non-permanent.
  #12   Spotlight this post!  
Unread 06-01-2003, 23:47
Morgan Jones Morgan Jones is offline
Registered User
no team
 
Join Date: Jan 2002
Location: Fairport, NY
Posts: 29
Morgan Jones is an unknown quantity at this point
I would probably write the program so that only a significant joystick event dropped the robot out of autonomous mode. That is, the joystick would have to break a predetermined threshold (maybe something like +/- 50). That way, a minor bump would be ignored, but when the driver urgently grabbed the controls, the robot would understand. Of course, any other input from the OI(buttons, pots, etc) would also break the autonomous mode. Basically, I want the driver to be able to take over immediately should something go haywire after the 15 seconds. If the robot suddenly veered toward a wall at full speed, the driver could grab the joysticks and save the robot without having to think about pressing a button.
__________________
Morgan Jones
Team 578: Fairport High School/Gleason Works
  #13   Spotlight this post!  
Unread 07-01-2003, 06:38
nwagers nwagers is offline
Registered User
#0240 (Mach Vee)
 
Join Date: Oct 2001
Location: Monroe, MI
Posts: 88
nwagers is an unknown quantity at this point
Send a message via AIM to nwagers Send a message via Yahoo to nwagers
exactly, the driver will not go for a button. He will intuitively grab the joysticks...
  #14   Spotlight this post!  
Unread 07-01-2003, 09:40
Ryan Meador Ryan Meador is offline
Registered User
#0190
Team Role: Electrical
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Worcester, NH
Posts: 68
Ryan Meador will become famous soon enough
I find this thread very interesting. I, too, have already wrestled with this problem, and I came up with all the solutions that have been suggested, but the one I decided upon is the one you all seem to be leaning away from: a button. It would be a non-momentary (is there a word for the opposite of momentary?) switch and the program would map the switch value to the auton_mode bit in the program. All it takes is a quick flip of the switch, and the robot will pop out of auton mode. I believe the concerns about the drivers' instincts being to reach for the joysticks are valid, but any sufficiently practiced driver (not to mention anyone that plays computer games) will have an easy time learning to push the button, just like they can fairly easily adapt to the way the robot handles when it's driving towards you.
  #15   Spotlight this post!  
Unread 07-01-2003, 10:01
Morgan Jones Morgan Jones is offline
Registered User
no team
 
Join Date: Jan 2002
Location: Fairport, NY
Posts: 29
Morgan Jones is an unknown quantity at this point
Quote:
Originally posted by Ryan Meador
...sufficiently practiced driver...
There's the problem

As for non-momentary... I think the word "toggle" might fit your needs.
__________________
Morgan Jones
Team 578: Fairport High School/Gleason Works
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 mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous mode AntmanIV General Forum 1 17-02-2003 13:30
autonomous mode timer Don Programming 6 09-02-2003 22:16
autonomous mode? bigwalt Technical Discussion 1 21-01-2003 01:14


All times are GMT -5. The time now is 08:47.

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