Go to Post Thanks GDC for opening a can of Chuck Norris Brain Hurt - Garrett.d.w [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 15-02-2010, 19:44
Lumit Lumit is offline
Registered User
FRC #2521
 
Join Date: Jan 2010
Location: Oregon
Posts: 26
Lumit is an unknown quantity at this point
Debugging the default targeting code

So we're trying to get the default code to rotate towards a target to work. We have a good gyro working (finally), and the camera is detecting our pretend target, but whenever we hit the button, it always rotates to the left.

Any advice on some steps we could do to debug this?

We found that one of the values inside the Rotate Towards Target vi isn't the correct datatype, but that doesn't seem like it'd be enough of an issue?

thanks...
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2010, 22:34
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,557
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Debugging the default targeting code

Does it rotate to the left and then stop when it rotates approximately the right amount (just in the wrong direction) or does it continue rotating forever?
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2010, 02:55
Lumit Lumit is offline
Registered User
FRC #2521
 
Join Date: Jan 2010
Location: Oregon
Posts: 26
Lumit is an unknown quantity at this point
Re: Debugging the default targeting code

We don't have a lot of room atm to let it spin forever, but I think that's what is going on... It isn't simply on the wrong side of the middle line, it will turn right into a wall (over 90 degrees) and keep going, even after losing the target in the process.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2010, 08:10
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,748
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: Debugging the default targeting code

Note that the code will turn to gyro heading of zero unless it sees a target. Does the dashboard show a green circle around the target? If not, it may be rotating to the zero.

First determine if the vision code is working just by watching the dashboard. You can also reset the gyro to a safer heading. It is reset using two buttons on the back of the joystick -- I don't remember the numbers.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2010, 17:35
seventhapollo seventhapollo is offline
Registered User
FRC #1477
 
Join Date: Dec 2009
Location: The Woodlands, TX
Posts: 5
seventhapollo is an unknown quantity at this point
Re: Debugging the default targeting code

Our robot also does this. In addition, I noticed that the motor-controller input does *not* vary (to my understanding, it *should*) with the target's distance from the center of the camera view.

Our camera/dashboard *does* see the target - the green circle *is* present. However, the robot simply does not turn properly.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2010, 23:08
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,112
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: Debugging the default targeting code

Quote:
Originally Posted by seventhapollo View Post
...the robot simply does not turn properly.
The defaults for the PID control parameters might not be appropriate for your robot. To make it turn properly you will have to tune them.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2010, 02:26
Lumit Lumit is offline
Registered User
FRC #2521
 
Join Date: Jan 2010
Location: Oregon
Posts: 26
Lumit is an unknown quantity at this point
Re: Debugging the default targeting code

thank you Greg,
There is a green circle, it is detecting the target.
We just got done updating to LV2.1 and Dashboard1.1, I'll try to see if it works now, if not then I'll see if I can get more information about where it is trying to turn to.

Quote:
The defaults for the PID control parameters might not be appropriate for your robot. To make it turn properly you will have to tune them.
How might we go about doing that? The PID vi looks way above and beyond my level of comprehension...
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2010, 06:32
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,748
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: Debugging the default targeting code

There is a white paper on the NI site specifically for tuning this usage. Give that a try. There are many good tutorials out there for more general usage.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 19-02-2010, 00:07
Lumit Lumit is offline
Registered User
FRC #2521
 
Join Date: Jan 2010
Location: Oregon
Posts: 26
Lumit is an unknown quantity at this point
Re: Debugging the default targeting code

The updates somehow fixed it!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I load the default code? HarryScheiner C/C++ 7 11-02-2009 11:52
The Default Code robocata Programming 1 29-01-2006 17:59
Default code and the Compressor Matthew_H Programming 16 07-02-2005 07:19
problem with the default code MarkVH Programming 7 28-01-2005 00:04
Can't Compile the Default Code pressurex1 Programming 4 25-01-2004 20:26


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

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