|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Victors lose communications in Autonomous.
Hey all,
So after a few success in getting the motors to follow the target in vision processing, and running it time after time off of a Victor Motor Controller successfully in both Teleop and Autonomous mode, we decided to code it for the drive motors, so the robot could turn and follow the target. Well, we coded it in Teleop just fine, and it worked as expected. However, when we replicated the code in Autonomous, the Victors would begin blinking randomly, and completely lose communications. I am posting pictures of my code hoping someone can show me in the error of my ways. Thanks in advance! -Chandler Douglas Teleop ![]() Autonomous ![]() Vision Processing ![]() A small run down of my code: In Vision Processing we process the image and find the "X" and "Y" value as well as the center of the object (this was accomplished from the 2013 Rectangular target Processing example put out). We then call for the global variable "Target Info" in Teleop and Autonomous. Then, we unbundle down to find the X value, and make X a local variable (it wouldn't work any other way.) We then feed one X value to each axis, and negate another to ensure that the motor turns. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|