![]() |
Enabling Multiple Light Tracking Using Kevin's Code
I am attempting to enable multiple light tracking by inserting code into Kevin's. How should I do this? I have read the code over multiple times and I am aware at how it all works, but I am unsure where I should set the poll mode to 1 and also what I should do when I send the VirtualWindow commands. Do I wait for an ACK and new T-Data for each? (And after receiving, set the new VW, so on and so forth?)
Thank you |
Re: Enabling Multiple Light Tracking Using Kevin's Code
After thinking about this more... this is my plan, feedback would be appreciated. It is not implemented yet, I am currently in the process.
1. "extern" the camera_acks and ncks variables in camera.c so that they are global (so I can put all the multi-light tracking in another file). Also globalize the camera_initialized variable. 2. I create a function which is run every loop from main. This function will first check if the camera is initialized and if so, set the camera to poll mode (once). 3. Wait for a T-Packet 4. If the bounds received are too large, designating itself as a "blob" we now do what team 250 has said (split the window in two and retrack each side to receive two bounds) 5. Rinse and repeat. |
Re: Enabling Multiple Light Tracking Using Kevin's Code
It sounds like what you are planning will work. However, I'm not going to put the effort in. After looking at the field, I can't see many situations where you'd actually see two lights. And in my case, if I did, I'd make sure that the camera was in position on one of the lights for a moment, save that position (with some of my magic code...I'll probably explain later but not yet) and then move the camera on--continue the search pattern--and find the other light and save its position.
I don't see that many chances to see two lights at once, though. JBot |
Re: Enabling Multiple Light Tracking Using Kevin's Code
I was also wondering the usefulness of implementing multiple light tracking...but I thought I'd try it out since most other things are finished.
I am having a problem which is very strange... I am just going to go ahead and post the C here. This is the function to set the camera to poll mode. Just to test it, I'm actually setting it in STATE_TWO of the camera initialization since nothing is happening there. Is this okay? Furthermore, I am not receiving an ACK or NCK, leading me to believe the way I am setting PM to 1 is incorrrect. Code:
void Set_Poll_Mode(void) |
Re: Enabling Multiple Light Tracking Using Kevin's Code
Quote:
|
Re: Enabling Multiple Light Tracking Using Kevin's Code
Quote:
|
Re: Enabling Multiple Light Tracking Using Kevin's Code
Quote:
|
Re: Enabling Multiple Light Tracking Using Kevin's Code
Quote:
Quote:
Good luck, JBot EDIT: John, it has nothing to do with when the camera is in poll mode, rather, if it is in raw mode, it will act as I described above. If it is in poll mode, TC (track color) sends 1 T packet, if not, it sends them repeatedly until interrupted by a \r. |
| All times are GMT -5. The time now is 04:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi