Go to Post The GDC made something easier??? Link or it didn't happen! - JesseK [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Spotlight this post!  
Unread 10-02-2005, 01:00
ace123's Avatar
ace123 ace123 is offline
Registered User
AKA: Patrick Horn
FRC #0008 (Paly Robotics - http://robotics.paly.net/)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 50
ace123 has a spectacular aura aboutace123 has a spectacular aura about
Send a message via AIM to ace123
Question TC command after camera_stop() doesn't work.

Hmm... I'm trying to get the servos to turn while tracking and I fail every time:
If I use camera_find_color and then set servos, it stops finding color.
If I use camera_stop(), camera_set_servo(), camera_find_color() then it resets to center because that's what camera_find_color() does.
If I put all the color init code at the beginning, and then only run the TC command at the time, then stop it, it doesn't recieve updates:
Code:
///// For some reason camera_track_update() returns 0 unless I call reset before I send the TC command.
static int counter=0;
if (camera_track_update()) {
  // updated
} else {
  // no update
}
counter++;
if (counter>15) {
  counter=0;
  camera_stop(); // in user_camera
  camera_set_pan_servo(...); // sends "SV 0 xxx"
//  camera_reset(); // If I call this then it works, but keeps jumping to the center servo position.
  camera_track_continue(); // function that just sends "TC ... ... ..."
}
I wrote this from memory since I don't have access to the other computer, but it is the general idea (check for updates, stop, turn, track).

I am sure that the individual camera_ functions work as they work when not setting the servo, and the servos move but don't track. But the combination causes it ot not reply with a "T ... ..." packet.

Also, I read something about poll mode ("PM 1") I tried this and it still did not recieve packets. Have any of you had this method work?

Maybe I have to call the TC command twice. (I remember having to click the button twice in the java program to retart the tracking...?

I could also try using HyperTerminal and pasting in all the stuff that it would have sent from the RC.

Do you have any ideas about what works for you?

If I can't figure it out, it won't hurt the time very much to actually turn the entire robot instead (pwm01=80;pwm02=-80;)
__________________
-Patrick Horn, Paly Robotics

Check out the space simulator called Vega Strike, modelled after the space simulator games Elite and Wing Commander. It's Open Source too!
If you have ever played Wing Commander, or especially Privateer, and had a feeling of nostalga derived from the you will enjoy these two Vega Strike mods: Privateer Gemini Gold and Privateer Remake!
I'm working on adding multiplayer support this year...
 


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 Auto Tracking? Ryan Cumings Programming 9 22-01-2005 02:20
IR Tracking & Navigation Tallman General Forum 3 20-01-2004 17:26
auto archiving of posts Joe Ross CD Forum Support 4 01-01-2004 02:04
My auto is better than yours.. lol randomperson Programming 25 07-04-2003 12:10
picking auto program Mike375 Programming 19 03-03-2003 15:47


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

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