Go to Post Either way, I'll stay a FIRSTer for life. =) - Adare180 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2012, 14:13
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Exclamation Unsuccessful Autonomous Programming

Is this possible for accomplishing the task that we want..(to turn the ring light on, to drive slowly until the camera is within 6 feet, then stop the robot, then fire the shooter for 2.5 seconds, then stop the shooter)..? Please let us know, we are welcome to any ideas at this point in time. Thank you in advance.
Attached Thumbnails
Click image for larger version

Name:	Snapshot Code.png
Views:	91
Size:	28.2 KB
ID:	12013  
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2012, 14:20
rhp3794 rhp3794 is offline
Registered User
no team
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Mexico
Posts: 50
rhp3794 is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

maybe you can put a frame before the robot stops, and the arcade drive with the movement put it on the sequence case
__________________
Programming Leader
Team 3794
WinT
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2012, 14:57
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

I made some changes in the autonomous code will this work for a sequence ?
Attached Thumbnails
Click image for larger version

Name:	Autonomous Revamp.png
Views:	66
Size:	22.7 KB
ID:	12016  
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2012, 16:16
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: Unsuccessful Autonomous Programming

You need to put the functions that read the distance into a while loop. As it is, the distance is only read once. Set it up so that the loop runs until you reach the target distance. Use that loop exactly as if it were a timed delay, keeping the flat sequence from advancing to the next frame before the distance reaches the desired value.
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2012, 18:13
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

Okay I believe were finally starting to see the light at the end of the tunnel. If we run this code the robot should travel at a slow pace for 10 seconds, and then the next frame the target distance information should terminate the while loop and move to the next sequence, which consequentially stops the robot's movement. And then the last two frames shoot the basketball, and stops the shooter. PLEASE CORRECT ME IF I'M WRONG ?????
Attached Thumbnails
Click image for larger version

Name:	Light at the End of Tunnel.png
Views:	43
Size:	20.6 KB
ID:	12020  
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2012, 19:54
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

Here's how I would do it.

Place your Drive code within the first frame encased in a While loop. Have your motors run at a constant 0.7. Within this loop, get your camera distance, and wire the Stop condition to the comparison between the distance you are at and the distance you want. Once the ideal distance is achieved, the loop will terminate, moving onto the next frame containing the code which stops your drive motors.

Good luck!
Reply With Quote
  #7   Spotlight this post!  
Unread 20-02-2012, 20:39
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

Will this be successful in completing the task ? We added the drive code into the loop of our target and distance information.
Attached Thumbnails
Click image for larger version

Name:	Target INformation.png
Views:	56
Size:	13.5 KB
ID:	12023  
Reply With Quote
  #8   Spotlight this post!  
Unread 20-02-2012, 20:43
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

This seems like it will work!
Reply With Quote
  #9   Spotlight this post!  
Unread 20-02-2012, 22:00
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Talking Re: Unsuccessful Autonomous Programming

Thank you, were going to test it first thing in the morning.
Reply With Quote
  #10   Spotlight this post!  
Unread 21-02-2012, 12:27
dcarswell's Avatar
dcarswell dcarswell is offline
FRC Mentor/Old Dominion University
AKA: DeAndre Carswell
FRC #3359 (Royal Robotics)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2006
Location: Portsmouth, VA
Posts: 36
dcarswell is an unknown quantity at this point
Re: Unsuccessful Autonomous Programming

Okay so we tested the code and we had a problem with the vision code. We get the images on the vision processing panels and everything, but in the autonomous shouldn't the robot be getting the correct distance. ? 6 feet from the camera, is 21 feet on the target information updating on the front panel of the vision processing.

And another question the robot doesnt move forward in autonomous do we need to disable the safety config on the drive motors ?

Thank you,
Reply With Quote
  #11   Spotlight this post!  
Unread 22-02-2012, 07:23
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Unsuccessful Autonomous Programming

The Vision Processing loop will estimate the distance and positions and publish them via the global variable. You should be able to read the global anywhere in the program you like.

You can certainly try disabling it. If you wrote code with extended delays between updates, this will provoke the safety to kick in. You can disable it, or change the code to update more frequently, even with the same value.

Greg McKaskle
Reply With Quote
Reply


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


All times are GMT -5. The time now is 22:07.

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