what is axis 3(throttle) on the logitech attack 3 joystick? Is the throttle the same as button 1, the trigger? I wouldn’t think so. Is it the adjuster at the bottom with the positive and negative symbols?
Thanks
what is axis 3(throttle) on the logitech attack 3 joystick? Is the throttle the same as button 1, the trigger? I wouldn’t think so. Is it the adjuster at the bottom with the positive and negative symbols?
Thanks
Bingo! You didn’t really need help;)
Great. Now i have another question for you. Our robot this year was initially too fast, so we have a range and coerce function attached to both the x and y parts of our arcade drive in the code. It is currently set at i think .8 all around. Does axis 3 take away the need for this range and coerce function? Like if i had it all the way down, would it be set at 0, and if all the way towards the positive, 1? Would axis 3 pretty much act as a speed controller?
The throttle just adjusts the value returned by the vi, nothing else.
What our team did is multiplied the value of the joysticks by the throttle value, so we can have a slower speed.
It’s probably not a good idea to coerce the joystick value, because it’s much more natural for the drivers to have a linear joystick to speed relationship, rather than a linear one and a flat part. Multiply by .8 (Or the throttle value!) instead.
On many joysticks, keep in mind that the up position is negative (just like the Y axis). Also keep in mind that it goes from -1 to 1, not 0 to 1, so if you want to use it as a throttle, make sure you make it a value from 0 to 1 or your robot will run backwards half the time (which actually can be useful, but probably not for competition).
Yeah true. I forgot about the negative numbers. But is their anyway for axis 3 to work as a speed controller instead of having a set constant at .8 and -.8? We also have it so when the trigger is pushed, everything drops to .5 and -.5. This is for easier movement deploying the minibot. But if axis 3 worked as a speed controller, it would make this a lot easier because the drivers would be able to constantly adjust the speed.
Take axis 1 and 2 (or just 2 if you’re doing tank drive) and divide them by ((Axis 3 - 1)/2)
Basically make axis 3 from 0 to 1 and divide your other axes by it.
If you’re set on coercing it, you can do the same thing, then negate the value and put the negated value for the lower bound and the normal value for the upper bound.
I think you mean multiply by the Axis 3 scale factor ((Axis 3 + 1)/2) (+ so it stays positive). It is getting late… :ahh: Dividing by a factor ranging from 0-1 would scale up the joystick, making it faster. If you want to consider a more advanced scale function where you can move slowly for a select part of the joystick range then quickly ramp up to full speed read this white paper
Thanks for the link. It helps a little, but i still am confused. Can i use the axis 3 controller instead of having my arcade drive work at .8 and -.8? Like is it possible to have it so when the axis 3 controller is down all the way, the robot moves at lets say .2, halfway .5 and full be .8? Can this be done?