![]() |
Debugging the default targeting code
So we're trying to get the default code to rotate towards a target to work. We have a good gyro working (finally), and the camera is detecting our pretend target, but whenever we hit the button, it always rotates to the left.
Any advice on some steps we could do to debug this? We found that one of the values inside the Rotate Towards Target vi isn't the correct datatype, but that doesn't seem like it'd be enough of an issue? thanks... |
Re: Debugging the default targeting code
Does it rotate to the left and then stop when it rotates approximately the right amount (just in the wrong direction) or does it continue rotating forever?
|
Re: Debugging the default targeting code
We don't have a lot of room atm to let it spin forever, but I think that's what is going on... It isn't simply on the wrong side of the middle line, it will turn right into a wall (over 90 degrees) and keep going, even after losing the target in the process.
|
Re: Debugging the default targeting code
Note that the code will turn to gyro heading of zero unless it sees a target. Does the dashboard show a green circle around the target? If not, it may be rotating to the zero.
First determine if the vision code is working just by watching the dashboard. You can also reset the gyro to a safer heading. It is reset using two buttons on the back of the joystick -- I don't remember the numbers. Greg McKaskle |
Re: Debugging the default targeting code
Our robot also does this. In addition, I noticed that the motor-controller input does *not* vary (to my understanding, it *should*) with the target's distance from the center of the camera view.
Our camera/dashboard *does* see the target - the green circle *is* present. However, the robot simply does not turn properly. |
Re: Debugging the default targeting code
Quote:
|
Re: Debugging the default targeting code
thank you Greg,
There is a green circle, it is detecting the target. We just got done updating to LV2.1 and Dashboard1.1, I'll try to see if it works now, if not then I'll see if I can get more information about where it is trying to turn to. Quote:
|
Re: Debugging the default targeting code
There is a white paper on the NI site specifically for tuning this usage. Give that a try. There are many good tutorials out there for more general usage.
Greg McKaskle |
Re: Debugging the default targeting code
The updates somehow fixed it! :)
|
| All times are GMT -5. The time now is 11:02. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi