![]() |
Damping the joystick at 1
Sorry for the undescriptive name, but there's no real way to describe this with my high-school math knowledge.
We've noticed that when our robot goes at a speed, and then moves in the opposite direction at the same speed, it starts tipping over. As such, we'd like the joystick, when it is set to a certain value (let's say 1), to slowly ramp up toward that value, instead of immediately going to it. Any ideas? |
Re: Damping the joystick at 1
Quote:
Do the LabVIEW equivalent of this: Code:
change = joystick - limitedJoystick;limitedJoystick is the rate-limited joystick value you use to control your motors. |
Re: Damping the joystick at 1
Also, with the Jaguar v.101 firmware, you can set the speed controllers to automatically ramp up the values by simply turning the limit switch jumpers sideways. You don't need to be using CAN to do this, either, only the firmware is needed.
More information on this can be found here. Seems a lot easier to me to just do this, if the ramp rate is good enough (I haven't tried this method yet) |
Re: Damping the joystick at 1
1 Attachment(s)
Just add this VI to your Teleop loop. All you have to do is wire your joystick input (which must be between -1 and 1) to the "joystick input" side, wire the output to your motor control VI, and pick a constant for scaling. Start with 0.1 and tune it in to what you think is best.
Once you have that, repeat for the other axis and you're done! |
Re: Damping the joystick at 1
Quote:
We are using this to keep us from stripping gears on our ball pickup if we reverse directions quickly on it. Find a control value that works well by experimentation. For our ball pickup, a value of 45 is good. For drive control, you may want a higher number. |
Re: Damping the joystick at 1
Quote:
|
Re: Damping the joystick at 1
Quote:
I'm wondering how you get a maximum rate limiter using only a P controller, without affecting the dynamics of commands which do not exceed the desired limit. |
Re: Damping the joystick at 1
There are several methods in this whitepaper: http://thinktank.wpi.edu/article/140, including Ether's method, a reference to the PID Output Rate Limiter, and some introduction to low pass filters.
|
Re: Damping the joystick at 1
1 Attachment(s)
Quote:
The use of a feedback node is throwing me off a bit, but it seems pretty straightfoward... |
Re: Damping the joystick at 1
Quote:
Thanks, but you misread my post. My post was addressed to juchong. I was asking for a PNG of the P-controller vi he attached to post#4. What you posted is not a P controller. It's slew rate limiter; the LabVIEW equivalent of the C pseudo-code in post#2. |
Re: Damping the joystick at 1
Quote:
|
Re: Damping the joystick at 1
Quote:
|
| All times are GMT -5. The time now is 11:13. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi