|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Joystick Controller Help
Next month, our team is going to our middle school to show the students our robot and let them drive it around. Our current drive set up is with two joysticks. 1 with the arm and 1 for the arcade drive. We also have a logitech game controller laying around, and I might let the students drive with that so both joysticks are on the same controller. Also, most middle school kids play video games, so the feel should be easy. I have some questions with this though:
1) How do you program the two joysticks on the game controller separately to maintain one for the drive and one for the arm? I've only used a joystick so I am slightly lost. 2) On our drive joystick, we use axis 3 to control our speed. If the students are driving with the game controller, am i still able to control the speed even if I am not driving the robot on my joystick? 3) If the students are driving, and I quickly need to alter their driving, can I move my joystick to change direction, etc. or will the conflicting demands from both joysticks cause a problem with the jaguars? We are using LabVIEW. Thanks for the help |
|
#2
|
||||
|
||||
|
Re: Joystick Controller Help
1) is simple. The controller is treated as 1 joystick with four axis
Ly=1 Lx=2 Ry=3 Rx=4 so use it in the same way you used other joysticks. 2) I am curious why you used axis 3 for speed instead of the normal y or x axis but the answer to your question is yes you can assign the speed to any axis even if its on a different controller 3) is a little harder but one thing you could do is if your joystick is out of a certain value, for example if the x or y value of your joystick is greater than the absolute value of .1 then, you have control if not then the student has control. Hope that helps. ~Jon |
|
#3
|
|||
|
|||
|
Re: Joystick Controller Help
Quote:
Lastly, is there anyway I could put a speed adjuster on the controller too? |
|
#4
|
|||
|
|||
|
Re: Joystick Controller Help
Would this be correct for what you said on question 1?
|
|
#5
|
||||
|
||||
|
Re: Joystick Controller Help
Quote:
|
|
#6
|
||||
|
||||
|
Re: Joystick Controller Help
Quote:
|
|
#7
|
|||
|
|||
|
Re: Joystick Controller Help
Quote:
Yeah I don't think there is a throttle either. I'm just thinking out ideas though, so it isn't a problem. When we let the students drive, I will probably just give them the game controller, and I will control the robot through the 2 joysticks we initially use. Like said in an above post, I will control the speed through axis 4 on one of the joysticks like we did in our regional. Above, the other person said that if I change the speed one my joystick, it should change the speed for every other joystick as well. is this correct? |
|
#8
|
||||
|
||||
|
Re: Joystick Controller Help
It really depends on how you program it -- if you multiply every axis of every joystick by the throttle value, they all get scaled down. If you only do it to one or two joysticks only those get scaled down.
You could also do something where the L button speeds it up (by something like 10%) and the R button slows it down. Or you could just have a constant multiplier of something like .4 |
|
#9
|
||||
|
||||
|
Re: Joystick Controller Help
If you want to override the command from the game controller, you can program a button to override the game controller and make the joystick do whatever you want. If you don't want to override as much as compensate (i.e. still use the command that the game controller is giving) you can average the game controller command and the joystick command or something of that nature.
|
|
#10
|
|||
|
|||
|
Re: Joystick Controller Help
Quote:
|
|
#11
|
||||
|
||||
|
Re: Joystick Controller Help
Properly designed case structures with Global Boolean variables should do the trick.
|
|
#12
|
|||
|
|||
|
Re: Joystick Controller Help
I was gonna try it with case structures. I'll take a look at labview later
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|