Go to Post Hall of Fame FIRST Team 254 has arguably helped more teams become good than any other team in FIRST. I don't think they need a lecture on helping their opponents. - Karthik [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 01-02-2013, 18:54
Dawg2T4's Avatar
Dawg2T4 Dawg2T4 is offline
Registered User
AKA: Chandler Douglas
FRC #3556 (GET SMART)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Lake City, Fl.
Posts: 31
Dawg2T4 is an unknown quantity at this point
Victors lose communications in Autonomous.

Hey all,

So after a few success in getting the motors to follow the target in vision processing, and running it time after time off of a Victor Motor Controller successfully in both Teleop and Autonomous mode, we decided to code it for the drive motors, so the robot could turn and follow the target. Well, we coded it in Teleop just fine, and it worked as expected. However, when we replicated the code in Autonomous, the Victors would begin blinking randomly, and completely lose communications.

I am posting pictures of my code hoping someone can show me in the error of my ways.

Thanks in advance!

-Chandler Douglas

Teleop



Autonomous



Vision Processing





A small run down of my code:
In Vision Processing we process the image and find the "X" and "Y" value as well as the center of the object (this was accomplished from the 2013 Rectangular target Processing example put out). We then call for the global variable "Target Info" in Teleop and Autonomous. Then, we unbundle down to find the X value, and make X a local variable (it wouldn't work any other way.) We then feed one X value to each axis, and negate another to ensure that the motor turns.
__________________
- Chander, star of Frisbeez in the Trap

http://www.youtube.com/watch?v=3bM_Sv3xJ54
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2013, 21:54
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: Victors lose communications in Autonomous.

Your loop in Autonomous that creates the "X" variable is running unthrottled. It's possible that it's starving the other loops (and communication tasks) for CPU time.

You know that your code ensures the motors will only run for 1.5 seconds maximum, right?


(While using X and -X as the left and right inputs to Tank Drive works, you could instead use an Arcade Drive block and feed it a single X axis value to make the robot turn.)
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2013, 23:15
Dawg2T4's Avatar
Dawg2T4 Dawg2T4 is offline
Registered User
AKA: Chandler Douglas
FRC #3556 (GET SMART)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Lake City, Fl.
Posts: 31
Dawg2T4 is an unknown quantity at this point
Re: Victors lose communications in Autonomous.

Worked like a charm, Alan! Good thing too, because I was getting mad at my simplistic mistakes!

Thanks!
__________________
- Chander, star of Frisbeez in the Trap

http://www.youtube.com/watch?v=3bM_Sv3xJ54
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:58.

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