Go to Post Honestly I'm looking forward to just seeing all my friends again, that's what FIRST is really about to me. - Barry Bonzack [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
  #1   Spotlight this post!  
Unread 13-07-2013, 00:34
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Alternative holonomic drive

Hello! I've been toying with this idea of using a trackball and joystick as a driver interface for a robot with mecanum wheels. The problem with this is that a trackball is not like a joystick. It's like a mouse (it IS a mouse, unless we can find a trackball made for some other purpose). I've been working on this in Processing, and it seems to work pretty well. I divide the screen into 360 vertical pieces, and assign each piece from 0 to 359 (with wraparound). By doing this, I can easily send a value for my simulated robot to turn to. The Processing model is great, and performs exactly as a real robot would, physics included, but in Processing, all I had to do was tell a box it's x,y, and rotation, and no real robot-applicable code was used. The problem I'm having with a real robot is that sending a specific value to rotate to is characteristic of field-centric steering (the value is the joystick angle, I think), and freedom to move without a third-person is characteristic of robot-centric steering. Is it possible to combine robot-centric strafing and field-centric rotation?
  #2   Spotlight this post!  
Unread 13-07-2013, 03:25
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 487
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Alternative holonomic drive

Quote:
Originally Posted by ekapalka View Post
Is it possible to combine robot-centric strafing and field-centric rotation?
Maybe I'm missing something obvious, but whether your starting angle is relative to the field or the robot, it seems like clockwise and counter-clockwise shouldn't change.
  #3   Spotlight this post!  
Unread 13-07-2013, 08:37
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: Alternative holonomic drive

SoftwareBug is right. Rotation won't be dependent on the gyro angle if you are specifying speed. However, if you would like to tell the robot which angle to be at (ie, point forward, point 135 degrees to the right) you need a PID loop, but I don't know of any team that has used this for their normal driving mode.

If you want to control mecanum in the traditional way with field-centric control, you need to convert the x and y desired speed to polar, add the gryo angle to theta, and convert back to x y. All of this is taken care of in the LabView, Java, and C++ libraries from FIRST. If you want robot centric control, just put 0 as the gyro angle, otherwise set the gyro angle from the output of your gyro.
  #4   Spotlight this post!  
Unread 16-07-2013, 00:35
ekapalka's Avatar
ekapalka ekapalka is offline
Registered User
FRC #3216
 
Join Date: Dec 2012
Location: Bermuda
Posts: 277
ekapalka has a spectacular aura aboutekapalka has a spectacular aura about
Re: Alternative holonomic drive

Why exactly would I need to use a PID loop? I've tried other methods which resemble a joystick, using mouse locking to center the mouse, then having the X and Y values mapped to -/+ 1 and constantly decrementing the values.
  #5   Spotlight this post!  
Unread 16-07-2013, 00:46
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 487
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: Alternative holonomic drive

Quote:
Originally Posted by ekapalka View Post
Why exactly would I need to use a PID loop?
There are a few different things you can do with your control inputs:

user controls -> x,y relative to the robot, theta (turning speed) in an amount clockwise/counterclockwise -> motor values

user controls -> x,y relative to the field, theta (turning speed) in an amount clockwise/counterclockwise -> motor values

user controls -> x,y relative to the field, theta (as an orientation goal relative to the field) -> motor values

If you choose the 3rd one, then you need some sort of control loop to make it so that with constant user controls, the robot will turn to the desired angle but then stop once it gets there. He is suggesting that the control loop could be PID.
  #6   Spotlight this post!  
Unread 16-07-2013, 07:31
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: Alternative holonomic drive

You'll only need PID if you'd like to be able to specify the absolute angle of the robot relative to the field. This isn't popular, as gyro drift makes this difficult to use. You won't have to use PID if you want to specify how fast your robot spins. Sorry if my original post wasn't clear.
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:31.

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