Go to Post Thank you lord I knew there was a reason I got 10 books on autonomous robotics. - Adam Y. [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 06-03-2013, 15:32
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: Mecanum steering

I forgot to answer your other questions!

Quote:
I assume that you must need encoders to ensure that the motors are spinning at exactly the same speed. How would that be done?
The state-of-the-art solution would be to implement a PID feedback control loop. What motor controller are you using? Jaguars provide an easy-to-use speed controller, whereby you plug your encoder into your jaguar and set your PID constants in code. There is also a program through which you can quickly update Jaguar PID constants for tuning. With Victors, you must implement your own speed control feedback loop, but this is still made easier by the fact that WPIlib provides us with a plug-and-play PID loop. What programming language are you using? You can see an example implementation here. For more on PID in the FRC world, searching ChiefDelphi would probably yield good results.

Quote:
How about field-centric steering? Is that particularly difficult to program?
I already answered this in a prior post in this thread. But ask away for further clarification!

Last edited by carrillo694 : 06-03-2013 at 15:33. Reason: wording.
  #17   Spotlight this post!  
Unread 06-03-2013, 16:57
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Mecanum steering

Quote:
Originally Posted by mrklempae View Post
So it's really that easy to drive like that? I assume that you must need encoders to ensure that the motors are spinning at exactly the same speed.
I assume you meant "each motor is spinning at the correct speed".

Quote:
How about field-centric steering? Is that particularly difficult to program?
That's what a gyro is for.

The WPILib RoboDrive methods have an input for gyro angle.

Code:
 /**
     * Drive method for Mecanum wheeled robots.
     *
     * A method for driving with Mecanum wheeled robots. There are 4 wheels
     * on the robot, arranged so that the front and back wheels are toed in 45 degrees.
     * When looking at the wheels from the top, the roller axles should form an X across the robot.
     *
     * This is designed to be directly driven by joystick axes.
     *
     * @param x The speed that the robot should drive in the X direction. [-1.0..1.0]
     * @param y The speed that the robot should drive in the Y direction.
     * This input is inverted to match the forward == -1.0 that joysticks produce. [-1.0..1.0]
     * @param rotation The rate of rotation for the robot that is completely independent of
     * the translation. [-1.0..1.0]
     * @param gyroAngle The current angle reading from the gyro.  Use this to implement field-oriented controls.
     */
    public void mecanumDrive_Cartesian(double x, double y, double rotation, double gyroAngle)

  #18   Spotlight this post!  
Unread 16-03-2013, 20:17
lcoreyl's Avatar
lcoreyl lcoreyl is offline
WittyTitleGen can't link to library
AKA: Milner
no team
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Colorado Springs
Posts: 201
lcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud oflcoreyl has much to be proud of
Re: Mecanum steering

Quote:
Originally Posted by pfreivald View Post
Right. We checked for that, and the powered gyro was drifting at that speed.
any more information on what happened here? I'm hoping to take a look at an issue that was reportedly like what you are describing. We used the gyro in 2011 with no issues, but I've never personally worked on it.

To anyone, how does the gyro temp feedback work in the code? (I don't usually get into the programming so you should talk to me like I'm 6) I'm poking through the java API and didn't notice temp anywhere in the gyro class. Since the temp is obviously going to a different channel than the gyro, it seems i would need to also set temp up as a separate sensor, but that too i didn't see in the sensorbase class. ??

Also to add 2 cents on the general mecanum talk: We've used mecanum since 2011 and never seen the "forward command equals horrible spin result" described all the time on CD. This is without gyro or encoder feedback. We have never been accused of having really fantastically designed and constructed drivetrains and have never given much (or any) time to weight distribution. This year a test drivebase was made which exhibited something kinda like the "forward command equals spin", but it was very minor and the driver was able to compensate for it without much trouble. Just looking at it everyone figured the problem was the fact that the electronics board thrown on top had the battery cantilevered outside of the frame. At this point the battery had to be 25-50% of the total weight. THEN it was discovered that the 8020 frame was assembled incorrectly causing the frame to be warped. The combination of the 2 had one wheel taking almost none of weight. And still the driving behavior was not that bad. This leads me to the hypothesis that "forward command equals horrible spin result" behavior reported frequently is almost always caused by incorrect use or poor functionality of the gyro...

Last edited by lcoreyl : 16-03-2013 at 20:19. Reason: forgot one thing
  #19   Spotlight this post!  
Unread 16-03-2013, 21:23
pfreivald's Avatar
pfreivald pfreivald is offline
Registered User
AKA: Patrick Freivald
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2001
Location: Naples, NY
Posts: 2,304
pfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond repute
Re: Mecanum steering

No, no additional information. Our driver is nails without it, and we don't need it for autonomous, so it's something we plan on investigating further in the off season.
__________________
Patrick Freivald -- Mentor
Team 1551
"The Grapes of Wrath"
Bausch & Lomb, PTC Corporation, and Naples High School

I write books, too!
Closed Thread


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 03:30.

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