Autonomous failing

At one point the default autonomous code (only change was tank drive) was working for us with very few problems with tracking, but now when we enable Autonomous nothing happens. The line sensors themselves seem to be working because the LEDs are changing when switching from light to dark surfaces, and nothing has changed in the programming or electronics. Does anyone know what the cause of this problem may be?

Additional issue: Our axes are screwed up. On Joystick 1 we have to switch Y and Rotation when inputting to either of the Holonomic Drive VIs (using Cartesian at the moment) and we have to negate the X axis. This problem is persistent on any USB port with any joystick. Since our drive is working now it’s not a major concern, but I am still curious.

I think the first thing I’d do is flip to Diagnostics tab and see what errors are pouring onto the display. That may help to explain the nonmoving robot.

Second, feel free to open the auto VI and probe stuff. Put the robot on blocks and hold the carpet near the sensors. Is the code sending expected numbers to the motors? How does this compare to teleop sending similar numbers?

Greg McKaskle

After rebuilding and redeploying the code a few dozen times, the Jaguars are giving a response that looks right judging from the LEDs. However, the mechanics have my base, so I am not sure.

I’ll report back with data tomorrow if the problem persists.

For the joystick problem, my advice is to not mess with the joystick values. Negating them is pretty much a hack. What’s going on is in begin.vi with the open4motors command, you put in some “invert motors” in there, which would need to be changed. What I do for these is put the robot on it’s side so you can see each wheel (blocks will work okay, if you have to). Then push the joystick all the way forward (make sure you remove all the invert commands in teleop). If any (or all) of the motors are going the incorrect way, correct them. Make sure all three basic commands work (forward/backward should have all wheels going the same way; strafing should have each side’s wheels going either towards or away each other, and the two side should be opposite; and rotating should have one side go forward and the other side go backward.)

If only one or two of those commands work and the other ones make the robot go wonky, make sure there aren’t ANY inverts for your joysticks (except for the y one in the drive function) and if there aren’t you can invert stuff.

I forgot to mention it occurred randomly. On our initial run everything was fine, then everything started screwing up after a normal deploy without any drive-related changes. With our current inversion settings (which are correct) and with the negated and swapped joysticks autonomous works correctly (the Jag LEDs indicate forward motion from the correct controllers).

Added conditional inversion. It seems to be working, but then again I don’t have the base to test with.