|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
Im using c++ anyone got any good libraries?
|
|
#2
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
The only library allowed is the WPILib.
|
|
#3
|
|||||
|
|||||
|
Re: Best way to control the mechanum wheels
Show me the rule, because I can't find that one in the Game Manual Section 4.
In 2008, I know I found a link to some "canned" mecanum code lying around CD. However, the programming language that year was C, so it wouldn't work this year without modification. I might be able to find it again... but it would take a while. |
|
#4
|
||||
|
||||
|
Re: Best way to control the mechanum wheels
http://runnymede-robotics.googlecode..._Team_1310_V2/
http://www.youtube.com/user/1310Robo.../0/7mBxVPvyYwQ |
|
#5
|
|||||
|
|||||
|
Re: Best way to control the mechanum wheels
tomy,
For C++ (LV, & Java also) WPILib provides a couple Mecanum drive methods in the RobotDrive Class. I recommend you start out with MecanumDrive_Cartesian() function. Documentation of this function (generated using Doxygen on comments in WPILib) is provided online by Dustin Spicuzza of Team 2423 is here. It hasn't been updated since last Feb 5th but I dont expect any changes since then. I don't know enough about how the left and right thumbsticks for the Xbox controller are mapped to axises in WPILib to give you a specific call. However, my suggestion is if you have a driver with experience on an Arcade Drive (single joystick for 4wd or 6wd) then use one thumbstick for y and rotation parameters in MecanumDrive_Cartesian() and the x-axis of another thumbstick for x. With this configuration, the driver can use one thumbstick to drive like the arcade drive (that they are experienced with) and add strafing with the other thumbstick. If you do not have experienced driver then decide which thumbstick mapping you think is best. I encourage you to develop advanced features like the ones in Team 1310's code above once you are comfortable with Mecanum. The MecanumDrive_Cartesian() should be all you need to protoype the Mecanum and start training drivers. If you need any help initializing the RobotDrive with your 4 motors or anything else, just ask and I am sure someone on this forum will help ASAP Good Luck Last edited by The Lucas : 13-01-2011 at 08:20. |
|
#6
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
Grab a sheet of paper and a writing utensil, hook up your controller to the robot's controller, and use labview to output all inputs to the screen. Write down what inputs are where.
For mecanum drive, we have always found its best to separate twist from your cardinal directions, make it the x-axis of a separate joystick. Some 3-axis joysticks have a tendency to twist while moving any other direction. Another thing you should seriously consider doing with mecanum drive is field-centric positioning with a gyro. It takes a little extra trigonometry, a little extra debugging, but it makes driving the robot SO much easier. In my experience, anyone could drive this type of robot without any training at all, and do it very well. I'd like to think 868's success last year was in part due to this. Let us know if you need help getting set up with that, I may have my old tutorials lying around. |
|
#7
|
|||||
|
|||||
|
Re: Best way to control the mechanum wheels
If you're not adept with LabVIEW, you can easily use the Game Controllers control panel in Windows to see what physical bits and bobs correspond to which axis and button numbers.
|
|
#8
|
|||||
|
|||||
|
Re: Best way to control the mechanum wheels
I'm not aware of that restriction. Where did you find it?
|
|
#9
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
Quote:
|
|
#10
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
During the season, or in the offseason, you can modify, rewrite, or replace any of the libraries above the FPGA access libraries. Since writing that from scratch would literally take you years, may I suggest learning to read the code that is there.
FYI, one of my biggest turn-offs when interviewing job candidates is the NIH syndrome. NIH == Not Invented Here. It seems to be a phase all programmers and engineers go through, but almost nobody is productive enough to be able to compete well until they get over it. Learn to read, debug, analyze, criticize, praise, understand, extend, and communicate the designs of others. It will serve you well. You cannot modify the FPGA. That would remove the ability for FIRST to control the outputs and provide a safe experience for team members, volunteers, etc. Greg McKaskle |
|
#11
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
Seems like a lot of teams (ours included) are giving mecanum a shot this year. Here are a few things I've picked up...
-Basic mecanum is pretty easy to achieve using the built in "holonomic drive" function, which either taken in 3 axis values (x=strafe,y=fwd/rev,z=rotation) or a polar coordinate (magnitude and direction). The derived equations are based on the solution to the Inverse Kinematics Problem (see: http://www.simbotics.org/files/first...irectional.pdf). -There are various ways to taken in inputs. One method is a twisting joystick. Another method is using two joysticks--one for x and y translation, and one for rotation. A final method is a joystick and two buttons--the joystick handles translation, and the two buttons handle left and right rotation at constant speed. -To make mecanum better, use closed-loop control on the robot's header angle and/or wheel speeds. This can be accomplished with a gyro and encoders. -To make mecanum better better, you can consider driver-centric control. This means that, no matter what the robot's header angle is, pushing the joystick away from you means that the robot moves away from you. This can be best accomplished by using the Polar coordinates implementation of mecanum, and using the gyro angle to modify the angle. -To make mecanum better better better, consider using steering curves (see: http://www.chiefdelphi.com/media/papers/2421). |
|
#12
|
|||
|
|||
|
Re: Best way to control the mechanum wheels
mecanum wheels were so much fun using last year
if you'd like to see how we used it in our labview code, just download our code See attachment from this thread http://www.chiefdelphi.com/forums/sh...ad.php?t=87949 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|