Go to Post Sometimes i wish the robot could fit into my pocket. - GMAdan [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-2007, 21:23
abrockhoff abrockhoff is offline
Team 11 Programming Captain
AKA: Alex Brockhoff
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: New Jersey
Posts: 16
abrockhoff will become famous soon enough
Send a message via AIM to abrockhoff
Virtual Window Function

We've been working on splitting the view of the camera with the Virtual_Window() function that Kevin supplied. We haven't had much success, but I now have a few questions.

1. What we attempted to do was put the camera in Raw Mode by calling Raw_Mode(5); and then waiting for an ACK, but we never recieved a response from the camera. Does anyone have any idea why?

2. We checked for ACKs and NCKs by placing flags in the Camera_State_Machine. We saw that the flags were set during initialization, and we call Camera_Handler() in user_routines, why would it not step through the state machine and set the flag after initialization?

3. When calling the Virtual Window funtion, why does Kevin write VW and then 4 before sending out the coordinates? In the CMUcam documentation it simply tells you to write out the coordinates.

4. After writing out the Virtual_Window() function we also did not recieve an ACK or NCK, similar to the Raw_Mode problem stated above.
  #2   Spotlight this post!  
Unread 27-01-2007, 22:48
jt250 jt250 is offline
Registered User
FRC #0250
 
Join Date: Jan 2007
Location: New York
Posts: 5
jt250 is on a distinguished road
Re: Virtual Window Function

Quote:
Originally Posted by abrockhoff View Post
We've been working on splitting the view of the camera with the Virtual_Window() function that Kevin supplied. We haven't had much success, but I now have a few questions.

1. What we attempted to do was put the camera in Raw Mode by calling Raw_Mode(5); and then waiting for an ACK, but we never recieved a response from the camera. Does anyone have any idea why?

2. We checked for ACKs and NCKs by placing flags in the Camera_State_Machine. We saw that the flags were set during initialization, and we call Camera_Handler() in user_routines, why would it not step through the state machine and set the flag after initialization?

3. When calling the Virtual Window funtion, why does Kevin write VW and then 4 before sending out the coordinates? In the CMUcam documentation it simply tells you to write out the coordinates.

4. After writing out the Virtual_Window() function we also did not recieve an ACK or NCK, similar to the Raw_Mode problem stated above.
At least in v2.1 of the Stream Lined code, Raw_Mode(5) is run in the initialization routine anyways - you shouldn't have to run it yourself. Also, to answer #3, with the raw binary mode, instead of entering commands and arguments separated by spaces and ending with a \r, you simple send the command, then a number which specifies the number of parameters, and then the values for the parameters. In the case of Virtual Window, he sends 4 because it has 4 parameters. You'll notice the Raw_Mode command is the only one which sends any spaces or a \r.

A possible explanation for your lack of ACK's after Virtual_Window() is that it simply never gets there; you need to put the camera in Polled Mode (command "PM 1", see the sticky at the top of the forum) otherwise all outgoing commands seem to be flooded out by the stream of incoming T Packets. (I can't say for sure this is what happens, but it seems plausible based on what happened to us.)

Edit: by the way, I see you're one of the teams that sent us a request for our implementation. I sent it out to all teams today, however the email provided by your team was a gmail account, and Gmail bounced the attachment because it contained python scripts which had been compiled by py2exe. I'm working on finding an alternate means of sending the code to your team, but if you have another email address that would simplify things greatly.

Last edited by jt250 : 27-01-2007 at 22:50.
  #3   Spotlight this post!  
Unread 27-01-2007, 22:59
abrockhoff abrockhoff is offline
Team 11 Programming Captain
AKA: Alex Brockhoff
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: New Jersey
Posts: 16
abrockhoff will become famous soon enough
Send a message via AIM to abrockhoff
Re: Virtual Window Function

alright man, thanks for the response, i'll try that tomorrow.

just wondering though, after sending out your PM, VW, and TC commands to you wait for an ACK from the camera, or just delay a few loops.

if you do wait for an ack, do you check for them using camera handler and the state machine? i just rewrote my code, and after every command (PM, VW, TC) i wait to move on to the next case until a flag is set in the camera_state_machine under the "receiving ack" part.

thanks again

Last edited by abrockhoff : 27-01-2007 at 23:44.
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
Virtual Window funciton in easyC pro?? Precious Programming 0 24-01-2007 13:22
Virtual Window Function bear24rw Programming 0 23-01-2007 20:24
Virtual Contruction Cyberguy34000 Chit-Chat 4 25-08-2005 23:47
Virtual MotoMidwest :) soap108 General Forum 0 28-03-2003 12:27
Virtual Parts Neal Probert Kit & Additional Hardware 2 06-05-2002 12:02


All times are GMT -5. The time now is 04:15.

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