Go to Post I would have bought a bigger box of popcorn and sat up higher in the stands. In the middle. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 07-09-2013, 17:23
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Controlling the individual speed of mecanum wheels within the main programme

The source for wpilib is included as a project in Java, but I don't know if it's included in the C++ release.
If you want to right your own mecanum code, it's pretty easy. Here's the important part from the Java library.

Code:
 frontLeft = xIn + yIn + rotation;
          frontRight = -xIn + yIn - rotation;
        rearLeft = -xIn + yIn + rotation;
        rearRight = xIn + yIn - rotation;
Just make sure that you invert your y axis on the joystick. Also, you should have you code check to see if any of the wheels speeds are > 1, and if so, divide them all by the largest value present to make sure that you still get the right response.

As for the wheel speed issue, it can definitely help to use closed loop control for the velocity of the wheels, but it can be fairly difficult to implement well, and it will take a long time to tune it well. I would recommend just sticking with the simpler method unless your robot really isn't controllable. If it is, make sure there's no excess friction in any gearboxes/drive components/rollers on the wheels.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi