|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Code For Mecanum Wheels
Which way is more 'correct'
Basically, my method calculates the angle of motion, and uses that to generate motor outputs. Then scales everything back based on the magnitude of the motion. Afterwards it adds the rotation by simply adding the z axis to the four motor outputs, and then, if necessary, scales them back to fit in 0-255. The other methods I have seen appropriately add up all the x,y,z inputs and and then, one way or another, scale it back to fit into 0-255 (some do it better than others). Which of these methods produce a more desirable result (ignoring code complexity and execution time)? I personally feel that my method is more 'correct'. For example: sliding at a 45 degree angle at full magnitude is not full forward + full sideways, as that would result in root(2) magnitude (on a scale of -1 to 1) in that direction, which is obviously not possible. As opposed to my code, which handles angles, and always outputs an appropriate magnitude. I'm no expert, but that's just my gut feeling. |
|
#2
|
|||
|
|||
|
Re: Code For Mecanum Wheels
Without considering complexity and execution time I would say without a doubt your method is superior in that it is mathematically most correct. This would, to me, lend itself better to creating a virtual model of the motions involved in a computer or PDA display. It's a well organized and logical method for defining the motor speeds and motions. That being said, if your code and a simpler code both give the desired results I'm not sure the word "correct" can apply. Both work so both would be "correct" but I personally admire the work and math you've applied in this problem. I just am not the brightest bulb in the hallway so I must be content with a lesser solution. (Ask me about cooking instead... I have a killer cheesecake recipe that's REALLY correct!) Steve |
|
#3
|
|||||
|
|||||
|
Re: Code For Mecanum Wheels
Well, neither method is more correct. The only true measures are of usability, controllability and accuracy. You can look at all sorts of data and generate all sorts of graphs and you could probably choose variations on algorithms that allow the most control and accuracy at a given range of speeds. In the end, it comes down to "does it do what you need it to do?"
Here is one easy way to look at it: Usability is usually subjective. This includes how complicated it is for the driver to drive and, perhaps, how complicated it is for the programmers to write. Controllability is closely tied to usability but focuses more on consistency. (ie: when I put the stick in this position, will it do the same thing?) Accuracy is more objective and measurable. (ie: when I put my stick at 45 degrees, does the robot travel at 45 degrees?) In the end, for controllability and usability, it is usually best to limit the maximum speed in any heading to be the same. Just because you can you can drive faster in the forward direction as opposed to 45 degrees does not mean you should as when you start to turn, your speed is not proportional. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mecanum wheels | akash155 | General Forum | 12 | 20-02-2007 22:15 |
| Friction coefficients for Omni wheels and Mecanum wheels from AndyMark | Andy Baker | Technical Discussion | 11 | 16-12-2006 19:40 |
| Looking for Mecanum Wheels | Armando Gonzalez | General Forum | 30 | 24-05-2006 12:54 |
| Mecanum Wheels | chaolin2007 | Control System | 1 | 25-02-2006 19:16 |
| Mixing Joystick Values for mecanum wheels | Leav | Programming | 10 | 15-01-2006 14:51 |