|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Unsuccessful Autonomous Programming
Okay I believe were finally starting to see the light at the end of the tunnel. If we run this code the robot should travel at a slow pace for 10 seconds, and then the next frame the target distance information should terminate the while loop and move to the next sequence, which consequentially stops the robot's movement. And then the last two frames shoot the basketball, and stops the shooter. PLEASE CORRECT ME IF I'M WRONG ?????
![]() |
|
#2
|
|||
|
|||
|
Re: Unsuccessful Autonomous Programming
Here's how I would do it.
Place your Drive code within the first frame encased in a While loop. Have your motors run at a constant 0.7. Within this loop, get your camera distance, and wire the Stop condition to the comparison between the distance you are at and the distance you want. Once the ideal distance is achieved, the loop will terminate, moving onto the next frame containing the code which stops your drive motors. Good luck! |
|
#3
|
||||
|
||||
|
Re: Unsuccessful Autonomous Programming
Will this be successful in completing the task ? We added the drive code into the loop of our target and distance information.
![]() |
|
#4
|
|||
|
|||
|
Re: Unsuccessful Autonomous Programming
This seems like it will work!
|
|
#5
|
||||
|
||||
|
Thank you, were going to test it first thing in the morning.
![]() |
|
#6
|
||||
|
||||
|
Re: Unsuccessful Autonomous Programming
Okay so we tested the code and we had a problem with the vision code. We get the images on the vision processing panels and everything, but in the autonomous shouldn't the robot be getting the correct distance. ? 6 feet from the camera, is 21 feet on the target information updating on the front panel of the vision processing.
And another question the robot doesnt move forward in autonomous do we need to disable the safety config on the drive motors ? Thank you, |
|
#7
|
|||
|
|||
|
Re: Unsuccessful Autonomous Programming
The Vision Processing loop will estimate the distance and positions and publish them via the global variable. You should be able to read the global anywhere in the program you like.
You can certainly try disabling it. If you wrote code with extended delays between updates, this will provoke the safety to kick in. You can disable it, or change the code to update more frequently, even with the same value. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|