![]() |
1 stick drive to 2 stick drive
it their a way i can make a switchto change between 1 stick drive to 2 stick drive
example: if the switch is on the robot will use 1 stick drive if the switch is off the robot will use 2 stick drive can this be done in p basic:confused: |
Of course.
A quick (and not too efficient way) to do it would be, ------------------- if(switch == 1) { drive_onejoy(); } else if(switch == 0) { drive_twojoy(); } ---------------------- switch would be the switch, drive_onejoy() would be a function for driving with one joystick, and drive_twojoy() would be a function for driving with two joysticks ;) Hardware wise, you could use the throttle on the first joystick as the switch. So past the halfway mark in one direction is one value for switch, and the past in the other direction would be the other value. Let me know if this helps any :yikes: The above code is in C format btw, not pbasic. |
personaly 2 stick sfor a tank type drive is the way to go over 1 stick, if we had uses two sticks in 2k2 we would have done better
|
Quote:
|
the robot cannot tell if you are using one joystick or two
you can get exactly the same input commands to the robot using either setup of joysticks (0 to 255 on both axis) so it really comes down to what the driver is use to. I believe there have been polls taken on this and most teams use one joystick - it requires less coordination between your two hands, it frees up one joystick for another function its frees up on hand for the driver to use for something else (other input switches, point to the field with his finger, tap someone on the shoulder....) also, one joystick inputs gives you a command that indicates how much you want to go forwards or reverse, and a seperate command that indicates how fast you want to turn. This allows you to integrate sensors on your robot in a straightforward manner, like speed limit sensors, or using the yaw rate sensor to measure how fast you are turning allowing closed loop feedback to be implemented to make the robots movements more stable and predictable. For example, the driver joystick is commanding a right turn at half the max rate, and the yaw rate sensor indicates the bot is turning slower than that, so the 'turn' command is increased to casue the bot to turn faster. or even better yet, when the driver is commanding the robot to go straight (up the ramp for example) and the yaw rate sensor detects the robot is starting to turn, the feedback loop can keep the robot going straight all by itself. This sort of thing is not as straightforward if you use two joysticks to steer. |
Quote:
|
Quote:
|
when you are driving, whatever setup you are using to control the bot, you should have enough practice so you are not thinking about where the joysticks are, or what each motor is doing
you should be able to make the bot go where you want intuitively, like riding a bike, or running (you dont think "left foot, right foot, left foot...." when you run) the biggest control advantage of using only one stick is going straight forward. Its difficult to move two joysticks forward exactly the same amount at the same time, but with one stick its easy. |
Quote:
On topic: One stick/two stick, it all depends on who is driving. I never could control a ground vehicle with one stick because I grew up on flight sims, and the muscle-memory makes it hard to translate pitch/roll into x/y. But thats just me. A kid who gre up playing racing games with a joystick will prefer the one stick style. Heh, I had an old Landshark remote car, big old 9.6V battery pack, it could go 10mph, and had treads. Sure enough, the controller had two sticks, a left and a right. So thats just how I learned to drive a tank steering chassis, it comes natural to me now. In the end, the old saying wins out. "Whatever boats your float." |
It really is a matter of a preference
As a kid, I grew up playing with games that used only one joystick. When I first drove Hammond's 98 robot on one stick, I almost wiped out the store we were practicing in! I did learn to control it much more easily, but once we hooked things up with two joysticks, there was no turning back for me. Maybe I just never had enough time to practice with it, but I could never achieve the range of arcs with one joystick.
The new WildBeast robot this past year was set up with one joystick for driving and one joystick for activating our articulate treads. This was one difficult machine to get used to, for me at least. But our driver did really well with it. The whole season I tried to get him to use a two joystick configuration just once though. In the offseason, at the Wisconsin State Fair, I believe it was team 357 allowed him to try their robot with two joysticks. He absolutely loved the ease of control and was instantly hooked. These are my experiences, but your preference is the only thing that matters. |
One stick vs two sticks became a heated debate for us in 2002. So, we programmed the RC so we could switch between either - on the fly - and turned it loose on a group of experienced and rookie drivers for a "drive-off" Our 'bot that year was a tank treaded, 2-speed, single goal grabber. Everyone got practice time, and then we timed each driver on a course that included a figure 8 around 2 goals, grabbing a goal and moving it to the far side of our shop. As I recall, all except 1 driver turned in the best times using the single stick. Throw in whatever caveats you want to, but we felt that it settled the issue for us.
|
EricS - good observation. Its hard to argue with a data-driven analysis.
|
Manning two joysticks makes you look cool, because using two joysticks is more impressive than just using one. Just messing. It reminds me of manning a mech from some anime, or MechWarrior which is exactly what you are doing at competition. Sorry for going off topic. :p
|
In my opinion, two stick is the way to go. The closer your controls model the way your robot works, the better. For example, a car uses a wheel and pedal to control it. This is is because a car operates by rotating the wheels, and spinning the wheels at a variable rate. If you robot drives by turning both sides independtly in a tank style drive, why not give your driver a contro system that mimics how the robot will actually react? It might take a little more getting used to, but in the end it is less confusing. No matter what orientation the robot is facing, if the driver is thinking like the robot, he will not get confused. He can think of driving on the robots terms. With a 1 stick drive, he has to interpret the actions he needs the robot to perform into the right joystick movement. As for going straight, with some practice it should not be a problem. If it is, some simple code can fix it, just compare the joystick inputs, and if they are very similiar, interpret them as being equal, giving you a straight line. My message to the programmers on my team when I was driving was always the driver knows best(when it comes to actually controlling the robot). Write code to assist the driver, not try to replace him, or assume he really "meant" to do something else.
|
Ask me, and I'll say the fewer buttons, sticks and readouts your drivers have to deal with to control the 'bot, the better. Complexity kills. Give the drivers the ability to fully control the 'bot, but as simply as possible.
One stick always felt much better for me. I also noticed that two stick drivers had the tendency to really slam the sticks back and forth, because accelerating evenly was such a hassle. It's easier to just throw both sticks to the stops. One stickers had an easier time of accelerating smoothly, and I'm sure that this translates into longer lives for gearboxes. Above all else, it is a matter of choice for the driver. It's just that one stick is the right one ;). -Andy A. |
| All times are GMT -5. The time now is 00:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi