Servers by jDrones

Rover-3.5.0-rc1 available for beta testing!


(Jdunkle) #21

Thanks Randy there are no encoders but it doesn’t work too bad. I’ll keep working on it thanks for the tip on tunning I’ll play with that.

(Ebin Philip) #22

I did manage to get my balance bot working on Acro.

Like Randy said, I was using brushed motors with encoders. So I also ran into the same issue. In my case it was because the balance PIDs(ATC_BAL_‘x’) were not tuned correctly. That could be one reason. When you say you can drive it around in manual, is it stable? Or is it like you can barely drive it without crashing? That was the problem in my case.
Typically when the balance controller is well tuned, you would see that in Manual/Hold mode, the bot stays upright, but drifts back and forth(there will be a bit of yawing as well). Keep tweaking the PID params till it is smooth and stable, ie; it shouldn’t eventually speed up in either direction and crash. Two additional params you need to watch out for are MOT_THR_MIN and BAL_PITCH_MAX. The MOT_THR_MIN param especially can cause oscillation in Acro like you described, if it is set too high.

There are two additional PID controllers in Acro: Speed and yaw rate. But before starting off, set CRUISE_THROTTLE to zero and set CRUISE_SPEED to the max speed you want(start with something small like 0.1). Save all your parameters once and then set ATC_SPEED_P, ATC_SPEED_I and ATC_SPEED_D to zero. Do the same for ATC_STR_RAT_P,I and D(yaw rate) params. The default values set are for rover and may cause your balance bot to crash. Switch to acro mode and start tuning yaw rate first and then speed.

Another possible issue in your case, like Randy described are the lack of wheel encoders. Without wheel encoders your speed and yaw estimates are calculated from the IMU sensors, if you are using it indoors without GPS. In my case, because I was using geared dc motors which has a lot of backlash, i found these estimates to be very inaccurate. So I had to go with wheel encoders. But in your case, since you are using steppers and they typically don’t have any backlash, the speed estimates should be more reliable. So, do take a look at the speed estimate graph while you drive in manual and see if it makes sense.

Trying the balance bot with steppers is high on my to-do list, but I’ve still got a bit more to finish with brushed motors. So I’d be really interested to see how this turns out. Lemme know if you need any further help with this.

(Jdunkle) #23

Ebin thanks for the great info. I have one on brushes motors with encoders for a while now and it’s working ok but wanted to try stepper motors. I’m close with them but still have some tunning to do as on the controller I’m using tic from pololu you can set max speed, acceleration and dead zone center stick. I just need to find the correct balance of pids and motor control settings.
Will keep posting my progress and maybe start a thread specific to the stepper motors on pixracer.

Thanks Jack

(Jdunkle) #24

Ebin would you mind sharing your parameters for your ballbot. I would like to see them for comparison on my ballbot with brushed motors and encoders. Yours looks a lot more stable than mine.