![]() |
Strange Jaguar/CIM Motor Behavior
My team is having some trouble getting our robot to drive in a predictable fashion. We are a first year FIRST team, so please bear with me. We implemented Mecanum wheels with 4 CIM motors being driven by Jaguars (PWM). Our code is written in LABView.
Going forward and backward works as it should, however, when we attempt to translate left or right the robot wants to rotate about it center axis. Upon inspection of the code the joystick inputs X and Y were wired to the appropriate terminals on the holomorphic .vi (cartesian). The symptoms that I see are that the motors are not all engaging at the same time or the same speed. I feel that we need some type of feedback control loop but I wanted to ask here before we expend that time and effort. Could it be that I am missing something? And if so, any suggestions no matter how simple or mundane will be appreciated. Thanks in advance for your help! Jimbo |
Re: Strange Jaguar/CIM Motor Behavior
James,
If you give a forward command to one side and reverse command to the other side (assuming identical throttle values) then the robot will turn on it's center axis. If you want to turn on an axis outside of the robot, only drive forward on the side opposite the direction you want to turn. If you want to turn in an arc, simply adjust the throttle values to the two sides independently. |
Re: Strange Jaguar/CIM Motor Behavior
Quote:
What does the robot do when you command it to turn in place? Are you certain the mecanum wheels are mounted properly? The diagonal rollers should form a diamond shape where they contact the floor; they will look sort of like an X when viewed from above. If one or more of them is backwards, the turn and strafe behavior will not be as expected. Are you certain you have wired the speed controllers for the four motors to the proper PWM connectors? Getting a couple of them swapped would really confuse things. |
Re: Strange Jaguar/CIM Motor Behavior
Besides what Alan said, here is how we make sure the wiring and software are correct, assuming you are using 2 Joysticks for control, one for forward/backward and strafe left/right and one for rotation:
1. Put the robot on blocks so the wheels are free to rotate. 2. On the Driver Station, make sure that Joysticks 1&2 are assigned to the correct port in the Setup Tab: We prefer that the strafe Joystick is #1 and on the left, and the rotate joystick is #2 and is on the right. Click any button on the Joystick and that will tell you which one is which, and you can click and drag the joysticks to re-order if you need to. 3. Enable your robot with the Mecanum code running. Slowly move Joystick #1 to a small value forward and hold it there. Check to make sure all the wheels are rotating and rotating in a forward direction. If any wheel is rotating the wrong direction, either change the wires or change the motor inverts in the Begin.vi 4. Go forward and backward full range to verify that everything mechanical is rotating correctly without any binding. 5. Use Joystick #2 and rotate to the left. This should make the left side of the robot's wheels rotate backwards and the right side move forwards. If this is incorrect your speed controller's PWM cables or software is using the wrong motors. 6. From what we've been able to tell, if all the above steps pass the robot should strafe correctly. So put it on the floor and verify that it moves correctly still. If there is a problem with the robot now, it is more likely a mechanical issue, such as binding, wheels are not touching the ground and/or bad weight distribution. |
Re: Strange Jaguar/CIM Motor Behavior
David,
When working on he robot last night I had it up on blocks at one point and did what you suggested. I don't remember specifically the results so I will try again tonight and document the results. I do remember though that it seemed as though there were some wheels that lagged a little. In that I mean that when I pushed slightly forward on the stick some wheels would begin to rotate before the others. Once all the wheels were rotating it was in the correct direction (forward) but it still seemed that some were rotating slightly faster. I would like to think that this is a software issue rather than a hardware (electrical) or mechanical issue, but I am not sure. Do I need to add some kind of feedback to my system to have all wheels moving at the same speed? If it is mechanical, I would suspect a problem in the gearbox or the wheels themselves. How much torque do I need to use to tighten the wheels? Should the rollers be able to spin freely, or should they have some resistance, or should they pretty much be bound up and hard to turn? Sorry to so many questions, I just want to have as many leads as possible for my team when we meet tonight. P.S. We know that the wheels are mounted in the correct positions, we fixed that problem last night, haha. |
Re: Strange Jaguar/CIM Motor Behavior
James,
It is also possible that the speed controllers do not match. There is a calibrate function to allow you to match joysticks to controllers. This would be the case if you are using the single joystick to drive. This can be handled in software and many teams take this approach. When performing the calibration, I recommend removing all breakers except the controller you are calibrating. |
Re: Strange Jaguar/CIM Motor Behavior
Quote:
The first thing to do is make sure the wheels are installed in the proper orientation. The second thing is to make sure the PWM definitions in software match the wiring in hardware. Then you can determine whether or not any of the motor directions need to be inverted. |
Re: Strange Jaguar/CIM Motor Behavior
Quote:
Quote:
|
Re: Strange Jaguar/CIM Motor Behavior
Quote:
If the rollers don't spin freely, it will affect the ability to strafe, and to some extent the vehicle rotation (turning) will suffer also. |
Re: Strange Jaguar/CIM Motor Behavior
Okay, our rollers are pretty tight once the axles (screws) are tightened down enough so that the brass piece is touching both sides of the wheel plates. *I am using the AndyMark 8" Mecanums by the way* I think we will try lubing up the axles to get the rollers to spin more freely. Does anyone see a problem with this?
|
Re: Strange Jaguar/CIM Motor Behavior
Quote:
|
Re: Strange Jaguar/CIM Motor Behavior
Quote:
Jimbo - The "lag" you are seeing could be coming from several different sources. I would look through the Diagnostics tab Error messages and see what's appearing there, verify you are sending the appropriate values to the Mecanum drive VI using probes/indicators. If you have other code in your project create a new default project, add only the code you need to drive and see if you still have the lag. If that's not an issue you may have some binding. For the wheel that is slower see what could be causing it. We had some issues with the 6" Mecanum wheels and the AM Wormbox's due to very little clearance with the chain sliding across the mecanum plate, along with the Wormbox itself rotating towards the wheel and making the chain bind and then fall off. Only with proper bracing, alignment and spacing are we able to drive effectively, definitely not a "slap together" system. If you can't find the problem you can definitely post your code and pictures of your drive-train here so we can help more. |
Re: Strange Jaguar/CIM Motor Behavior
This happened for us at one time too. Look in Begin.vi and make sure that the motors are inverted correctly. Make sure both on the left side are the same and both on the right side are the same. If they aren't, it will cause this, but will still make it go forward.
|
Re: Strange Jaguar/CIM Motor Behavior
Quote:
If you find that you do have to invert something and it's not because of the wiring, something else is wrong, which may or may not result in a negative impact on the mecanum drive. |
Re: Strange Jaguar/CIM Motor Behavior
Another simple thing to check is the gain on your joysticks (if your joysticks have gain). If they're off, things can get rather wonky rather fast. Set them to where you need them, and then hot glue them in place!
|
| All times are GMT -5. The time now is 19:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi