Go to Post Given a choice between giving a man a fish and teaching him to fish, you always want to teach them to fish. But sometimes that involves showing him how to put the worm on the hook first. - dlavery [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 27-01-2009, 13:38
Mikesername's Avatar
Mikesername Mikesername is offline
meh.
AKA: Mike Dame
FRC #3044 (Team 0xBE4)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ballston Spa, NY
Posts: 32
Mikesername is an unknown quantity at this point
Send a message via AIM to Mikesername
Camera Code not Working in Autonomous?

Hey,
A search didn't really help so I guess I'll just post our problem:

We have the 2-color servo tracking example, which works when it is just run from the front panel. So we dragged the icon for the 2-color tracking into our autonomous code, and it still does the tracking when that is just run.

However, once that is in the autonomous and we try to build+deploy the entire main drive project, the camera does not do its tracking and instead shoots straight up.

Anyone got any ideas as to what could be wrong?
~Mike

(off-topic): We also can't get our battery wired right. We had a mentor that said that it needs to be wired into slot 8 but she "didn't know which module"?? We've looked all through our documentation, which yielded no results. It seems the battery should just be wired into the big "PLUS" and "MINUS" where it is, but the DS says 0.00v.

Thanks.
__________________




[ ballston spa robotics | www.team3044.com | team BE4]
  #2   Spotlight this post!  
Unread 27-01-2009, 13:52
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,751
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: Camera Code not Working in Autonomous?

One thing for sure, the battery doesn't get wired to slot eight, that is for relays. The battery should be wired to the analog breakout in slot one as far as I remember.

As for the autonomous code running, you may want to set breakpoints in C, or open panels in LV to see if the camera stuff is getting called, what params are being passed, etc. Be sure to enable and set the mode to autonomous, and make sure it is on blocks or otherwise safe.

Greg McKaskle
  #3   Spotlight this post!  
Unread 27-01-2009, 13:54
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Camera Code not Working in Autonomous?

Other folks who are more familiar with the tracking example can undoubtedly provide more information but I'm not sure that simply dragging-and-dropping that icon will work. The Basic (and Advanced) Robot Main VIs already perform a lot of the communication and watchdog configuration. You MAY be "configuring everything twice" by doing what you did. You might need to dig into the example and copy/paste certain elements.

Regarding battery voltage, please check the component datasheets at http://www.usfirst.org/community/frc....aspx?id=10934. In particular, chapter 3.4 describes the Analog Breakout and how it can be configured to measure battery voltage. All you need to do is attach a jumper on the outer 2 pins to feed battery voltage into Analog Input 8. Rule R64 requires that you install such a jumper.

Russ
  #4   Spotlight this post!  
Unread 27-01-2009, 14:01
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Camera Code not Working in Autonomous?

Just to be clear, I've attached a picture of the jumper(s) that should have been included in your kit-of-parts. These are NOT "jumpers" as in jumper cables used to re-charge a car battery.

Russ
Attached Images
File Type: bmp jumper.bmp (76.0 KB, 46 views)
  #5   Spotlight this post!  
Unread 28-01-2009, 08:06
Mikesername's Avatar
Mikesername Mikesername is offline
meh.
AKA: Mike Dame
FRC #3044 (Team 0xBE4)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Ballston Spa, NY
Posts: 32
Mikesername is an unknown quantity at this point
Send a message via AIM to Mikesername
Re: Camera Code not Working in Autonomous?

Quote:
Originally Posted by Russ Beavis View Post
Just to be clear, I've attached a picture of the jumper(s) that should have been included in your kit-of-parts. These are NOT "jumpers" as in jumper cables used to re-charge a car battery.

Russ
Yea we have those but which module does it go in?
__________________




[ ballston spa robotics | www.team3044.com | team BE4]
  #6   Spotlight this post!  
Unread 28-01-2009, 09:06
Luke Pike's Avatar
Luke Pike Luke Pike is offline
Programmer
FRC #1501 (THRUST)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Huntington
Posts: 114
Luke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to all
Re: Camera Code not Working in Autonomous?

In regards to the color tracking code, I copied just the parts for tracking and created my own subVI with inputs for the camera, image, etc. and outputs for the servo positions and tracking state. I also copied the servo updating loop directly into my vision proccesing vi.
__________________
Twitter Profile
  #7   Spotlight this post!  
Unread 28-01-2009, 10:14
AndrewN's Avatar
AndrewN AndrewN is offline
it's alive!
AKA: Andrew Nicholson
FRC #1778 (Chill Out)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Edmonds, WA
Posts: 48
AndrewN is just really niceAndrewN is just really niceAndrewN is just really niceAndrewN is just really niceAndrewN is just really nice
Re: Camera Code not Working in Autonomous?

The "jumper" connects two outside pins of the three pins on the edge of the Analog breakout board on top of the module in Slot 1 of the cRIO.

The "jumper" is a small black rectangular piece that fits over two pins.

The two positions of the jumper either connect the battery sensor (a resistor divider) to the eighth analog input, or in the second position allow you to use the regular Analog In 8 pins.

In Slot 2 is a second Analog Input, the jumper on that board should be in the other position, the inside two pins, allowing you to use the eighth input.
__________________
Andrew Nicholson
2011 FRC Robot Inspector (Seattle, Portland)
Mentor FRC 1778 "Chill Out", FTC 3018, 3940 "Hawks", 4434 "Heat Misers"

"Everything should be made as simple as possible, but no simpler."
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
Camera not working LinuxMercedes Programming 10 13-01-2009 10:18
Help Autonomous code not working team550 Programming 5 14-01-2008 10:35
Camera not working in autonomous Roger Programming 9 09-03-2006 07:38
Camera code not working.... DemonYawgmoth Programming 5 11-02-2006 09:21
Gyro not working in Autonomous? kaszeta Programming 7 11-02-2006 01:28


All times are GMT -5. The time now is 09:59.

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