![]() |
Getting the camera to work in autonomous
I've now got the camera working in human operated mode but when we switch over to autonomous nothing happens. I've also included tracking.h in user_routines_fast.c, Our code currently looks something like this:
Code:
Getdata(&rxdata); |
Re: Getting the camera to work in autonomous
Kevin's camera state handler (Camera_Handler(), I believe) wants to be called in the "slow loop" (every 26.2 ms). It counts how many times it has been called to determine how long it has been to determine if a time-out condition has occurred. Make sure your code is calling Camera_Handler() only when there is new data:
Code:
while (autonomous_mode) /* DO NOT CHANGE! */JBot |
Re: Getting the camera to work in autonomous
I have the Camera_Handler() and Servo_Track() functions where you said to put them. I am using Kevin's bells and whistles code but when i enable debugging one of motors goes full forward and one goes full reverse (but that just could be because of how we have them mounted).
|
Re: Getting the camera to work in autonomous
Quote:
My guess is that the camera is initializing fine, and as soon as it sees a target, it gives both motors 170, which, depending on your setup, motor polarity, transmissions, etc. might look like a full power spin. Try reversing one of the motors (it would be pwm15 = 84; I think). JBot |
Re: Getting the camera to work in autonomous
It says Camera: Initialized abnormally with code. Unfortunatly I've had to leave our work area and won't be able to get back to the robot until monday so I won't be able to do any more testing.
|
Re: Getting the camera to work in autonomous
Quote:
JBot |
Re: Getting the camera to work in autonomous
Quote:
|
Re: Getting the camera to work in autonomous
Sorry I don't remeber what the code was. Though would you get a timeout error if the camera never starts searching?
|
Re: Getting the camera to work in autonomous
When I first started playing with autonomous I just sent the motors full forward which only worked with generate_pwms and not PWM.
|
| All times are GMT -5. The time now is 04:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi