Quote:
|
Originally Posted by Joe Ross
But, your robot doesn't move when you give it a small value, because of friction and other factors. In '99 we did some tests with our robot, and you had to give it something to the effect of 145 to get it to move from a stop. So, we programmed in a deadzone from 117-137, and then starting at 138, we scaled the values from 145 to 254.
|
Ahhh, good point Joe. Note though, that the nonlinear function I gave essentially has that deadband built in (very low response to joystick inputs around neutral), but it's a smooth and continous transition to the "on" state, instead of being abrupt. I guess once the bot is built up and you're testing it to see how much motor output is needed to start moving, you could tailor the transfer function a little to get it to "turn on" at that motor output. The smooth nature of the function takes care of the scaling from that point up to the max.
Quote:
|
Originally Posted by thoughtful
This is one way to do it, the other way is to subtract 250-135, you get 115 devide it by a number lets say 10 so you get 11.5 , now ur max change is 11.5 , add that 10 times to your motor output or until it reaches desired position, this way you will have variable max change function.
|
This works too. But I think you should be careful about remembering values from loop to loop and using them to calculate motor output. Suppose you're in the middle of changing the motor output as you suggest, but then the driver suddenly moves the stick full the other way. Now your math might suggest that the max change to the motor is huge, and you might get a big drive current spike as the motor responds. If you're going to do this, just be careful about how you write the calculation so that you don't over-juice the motor.