Go to Post I actually love and am very thankful for what all these amazing engineering role models put into this program year in and year out. - Bill Gold [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #8   Spotlight this post!  
Unread 03-12-2014, 17:02
jreneew2's Avatar
jreneew2 jreneew2 is online now
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 203
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Running two commands at once, but both commands use the same motors.

Quote:
Originally Posted by Ether View Post
Three things:

1) I assume you have a mecanum drivetrain? (there is no "h" in "mecanum")

2) If you want to drive in a straight line in any particular direction, and simultaneously rotate the bot to a desired angle, you can do that using mecanumDrive_Cartesian. Feed your gyro to the gyroAngle parameter; supply the x and y components of the desired straight-line field-centric motion to the x and y parameters; and feed the output of a closed-loop controller to the rotation parameter. The input to the controller will be your desired angle (setpoint) and your gyro reading (process variable).

and finally, and perhaps most importantly:

3) Mechanical workmanship is of paramount importance. Make sure your drivetrain is built and aligned correctly before attempting #2 above. If you're not sure what "built and aligned correctly" means in the context of mecanum drive, I encourage you to ask before proceeding.


1) Yeah we have a mecanum drive train. The reason i said that with an 'h' is because in our code we have Robot::driveBaseSub->MechDrive(XAxis, YAxis, RotateAxis, IMU_Yaw); I should probably change that soon...

2) Yeah, OK. I was thinking about it in a more complicated way i guess. I just really tried to copy-paste from our original rotate to angle command into the drive command and it didn't go so well. I will have to try that. Also, by closed loop, you mean PID? We have not implemented a PID loop into the robot yet, but plan on doing so once we have the basics down. Right now, if the robot overshoots the 0 degrees it rotates to, it just turns in the opposite direction with a slower speed. We have a tolerance of about 2 degrees on it right now which seems good for what we need.

3) Yeah, I get what you mean. We have field-centric drive working on a robot we used last year and then just stripped down to the bare minimum for what we need. The wheels are not perfectly aligned just from usage over the season and unseen measurement error by us. I will fix this issue soon.

Thanks a bunch!
- Drew (Team 2053 Programmer)
Reply With Quote
 


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 14:06.

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