![]() |
Motor balancing (encoders?)
Is there a "good" way of balancing our drive motors with labVIEW? if we use encoders, is there a way to scale the motor outputs based on those values without taking apart the tank/arcade/holonomic drive VIs? Right now i'm investigating pulling open the devref and adding a transform vi ref to each motor -- but this seems like a very complicated solution for what strikes me as being a fairly common problem. Is there a nicer way?
|
Re: Motor balancing (encoders?)
It is possible and kinda complicated the best way to fix it would be a mechanical fix but if that isnt possible heres what you can do. Get the 4 encoder rate values and case if the rates are the same (i'd round if i were you) then do nothing to the value of the motors but if they arent the same then adjust the speed of the motors until they are.
|
Re: Motor balancing (encoders?)
Scale the motor inputs just before they get into the tank/arcade/holonomic drive vi's. Using the LabVIEW PID functions.
|
Re: Motor balancing (encoders?)
It isn't a common problem. If you are getting significantly different response on the two sides of your drive base, something is wrong with the hardware. It would be better to fix the cause rather than patch it with software.
But if you do want to mask the mechanical or electrical issue, you can use the gyro to modify the X axis input to the Arcade Drive function. Use the joystick as a rudder to determine the desired heading by applying a delta to the current heading as read from the gyro. Use that desired heading as the setpoint of a PID block that reads the current gyro angle and provides the X axis control. When you're not calling for a turn, the PID will apply whatever turn command is necessary to keep the robot facing the same direction. |
Re: Motor balancing (encoders?)
It turned out that last year's robot had a mechanical "boo boo" because of one jumper. One victor had jumpers for both the "brake" and "coast" options. We did not notice it until 2 weeks ago. So for the whole competition, we had one motor stopping and the other one stopping a few seconds after the other one... That explained why the autonomous mode last year for us really sucked. Like I say everytime: the problem is the hardware, not the software.
|
Re: Motor balancing (encoders?)
Quote:
If you did manage to connect both the Brake and Jumper pins to the control pin at the same time, you would short out the Victor's 5 volt power. Quote:
|
Re: Motor balancing (encoders?)
Quote:
Quote:
Quote:
ah, but how is this done? the PID suggestion seems interesting, but how do we actually get inside the devref to do all this? just unbundle and go through the Motors array? at that point scaling could be trivial (i.e. just multiply) but is there a nicer way to actually get that far? |
Re: Motor balancing (encoders?)
Quote:
|
Re: Motor balancing (encoders?)
Quote:
There's certainly no reason to breakout the DevRef. You are feeding the settings into the drIve vi's now. Modify them before you feed them in. The default teleop.vi takes a joystick axes value and wires it into the Arcade Drive vi. Put your new code between the Joystick axes and the Drive vi of your choice. |
Re: Motor balancing (encoders?)
Quote:
in the mean time, i'll double check for any mechanical/electrical issues on our old bots (e.g. mis-set coast/break jumpers) with my team, because it seems like this really isn't a very common issue at all. |
Re: Motor balancing (encoders?)
Quote:
|
| All times are GMT -5. The time now is 10:12. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi