FIRST Tech Challenge Discussions

Showing results for 
Search instead for 
Did you mean: 

Arcade control for Teleop

Go to solution

My team is trying to switch from Tank control to arcade control.  The arcade seems to work except the controller needs to be held sideways for the joystick up to be up.  Is this the way is it supposed to work?  And how can we switch it?

Right now Up goes right, Right goes backwards, Down goes left and Left goes forward if you hold the controller the normally.

We are on a Mac, so I don't know if that makes a difference or not.

High Tech Hilltoppers

Team 7070

0 Kudos
Message 1 of 9

Sounds like they put the wheels on sideways.... (just kidding). I've seen plenty of 'backward' robots, but never had a sideways one yet. The X and Y axis seem to be swapped. Are you using the RC Editor generate code function, and then running from the NXT (teleop) ? or are you in 'prototype' mode when this happens?

My first suggestion is to make sure that the switch on the bottom of the controller is in the 'D' position and that the mode light is OFF. (When mode is on the left joystick gets mapped to the D-pad POV button). You might need to reconnect and restar the MAC if you make a change to the switch.

We don't use a MAC, so it could be a driver issue at the OS level.

0 Kudos
Message 2 of 9

Yes, we are using the RC editor, generated code, download it to the robot, and run it through the FCS.   I will try running this from a PC and see if it behaves differently.

0 Kudos
Message 3 of 9

Two additional questions:

  • Are you running the FCS from the MAC also? (Meaning that you are using the Samantha/wi-fi-router style of running from the MAC also.)
  • Same 'sideways' behavior exists when trying Arcade style in Prototype mode?

If the probelm persists...a temporary fix would be to 'burrow in' to the Arcade program block (double click on the generated code Arcade block) and swap the X and Y axis outputs that come from the joystick control cluster. However, it would then likely then be BROKEN when using a PC (and therefore NOT work at the competition events). [Note: you would make your own new copy of that modified sub]

0 Kudos
Message 4 of 9

Yes we are generating the code from the MAC and running the FCS from the MAC.   We haven't tried Prototype mode.  We had issues with getting that connected up in the past.  We are a rookie team and still trying to figure out how all this works.  I plan on trying with the FCS on the PC on Monday.  If that still doesn't work then we will try putting LabVIEW on a PC.  The PC's we have are dinosaurs though so we would rather not use them.

0 Kudos
Message 5 of 9

I'd be happy to help you through some of these initial rookie challenges (ex. Protoytpe mode). I've sent a friend request so we can email specifics. If we come to some solid conclusions regarding Mac's (LVLM and FCS) then we can post them here for other Mac users.

0 Kudos
Message 6 of 9

Can you show me how you make your program? I build a program that can switch between omni-direction control and tank, and it works well. teleop-final.png

Message 7 of 9
Accepted by topic author marshall123

Ok.  Tried on the MAC and PC for LabVIEW and the FCS.  Did basically the same thing every time.  So then one of the students went into the code and changed something to make it work.  Not sure what he did, but reversed or switched something.   I am not sure if that was a motor or something else in the code that was generated as I didn't see what he was doing as I was helping someone else at the time. But we got it working now.   Some day we should figure out how prototype works, but for now we are up and running, and they were able to try the arcade style driving.  I think they would prefer to use both joysticks where one moves the robot forwards and backwards and the other for turning.   Might try to change to that mode if we have time to figure it out.

Update:  Found out that the student switched the arcade x and y ports in the arcade block to get this to work.  Seems odd though as I would have thought someone else would have run into this.  Makes me wonder some part of our software wasn't updated, but the PC version was a fresh download.  Strange.

Message 8 of 9

This odd behavior is easilly caused by having the incorrect "Invert" flag set on the motor outputs in the Schematic editor.

One side of the robot needs to have the "Invert" flag set on the Schematic editor.  Which one, depends on whether you have a gear reversal or not.

I recommend using the schematic editor to individually drive your left and right wheels.  Make sure that both sides run forward when you slide the slider to the positive side.

Make sure that left is left, and right is right.

Once you have this set, then I also recommend you go back into your program and 're-select" the motor inpits on all of your driving VI's  (Sometimes any changes in the Schematic editor don't "take")

Put the joysticks back the way they are menat to be and then it should drive straight. and turn correctly.


Get a life? This IS my life!
0 Kudos
Message 9 of 9