Go to Post There is always more than one way to design something. - Dave Scheck [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 12-01-2008, 13:58
whlspacedude's Avatar
whlspacedude whlspacedude is offline
Registered User
AKA: Will
FRC #1529 (Cyber Cards)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Indianapolis,Indiana 46227
Posts: 167
whlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nice
Send a message via AIM to whlspacedude Send a message via MSN to whlspacedude Send a message via Yahoo to whlspacedude
Mech Wheel Programing

This year we would like to try mech drive with 1 joystick. this joystick has x,y and z(twist) on the stick and t for speed.
i have no clue how to do mech programing and would really like some help with it .
we would like strafe with the x axis and turn with the z axis.
also we would like speed control with the t axis
how would we go about doing this in easyc?
__________________
Some people are like slinkies they are only good for 1 thing... pushing them down flights of stairs

1529 mph = 4 109 952 furlongs per fortnight
  #2   Spotlight this post!  
Unread 14-01-2008, 10:42
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Mech Wheel Programing

Quote:
Originally Posted by whlspacedude View Post
This year we would like to try mech drive with 1 joystick. this joystick has x,y and z(twist) on the stick and t for speed.
i have no clue how to do mech programing and would really like some help with it .
we would like strafe with the x axis and turn with the z axis.
also we would like speed control with the t axis
how would we go about doing this in easyc?
While it's not easyC, check here: http://www.chiefdelphi.com/forums/sh...m+drive+co de

The basic idea for either an omnidirection or mechanum drive train, each wheel will have a certain speed that it needs to be driven to contribute to the desired combination of f/b motion, strafing, and turning. You calculate these for each wheel, and sum them up.

Code:
fr_pwm = speed-turn+strafe;
fl_pwm = speed+turn-strafe;
br_pwm = speed-turn-strafe;
bl_pwm = speed+turn+strafe;
You may have to reverse some of these due to how your motors are installed, and you would be best to do a lot of bounds checking and be careful with variable types to make sure you don't have wraparound errrors.
  #3   Spotlight this post!  
Unread 14-01-2008, 12:47
RyanW RyanW is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: MD
Posts: 40
RyanW has a spectacular aura aboutRyanW has a spectacular aura about
Re: Mech Wheel Programing

What Kaszeta said is correct; however, our team decided we also wanted to scale the values. What we came up with was to take the initial inputs, change the range to (-127)-(127), add them together, then scale the sum by a factor:

The factor = Max ( |speed|, |turn|, |strafe|) / (|speed| + |turn| + |strafe|)

We used this code last year, and it seemed to work pretty well.
  #4   Spotlight this post!  
Unread 14-01-2008, 15:43
whlspacedude's Avatar
whlspacedude whlspacedude is offline
Registered User
AKA: Will
FRC #1529 (Cyber Cards)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Indianapolis,Indiana 46227
Posts: 167
whlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nice
Send a message via AIM to whlspacedude Send a message via MSN to whlspacedude Send a message via Yahoo to whlspacedude
Re: Mech Wheel Programing

Being new to "real' C programing (have a knowledge of BASIC) I really would like to have a .ecp file to look at. thanks for the other links!
__________________
Some people are like slinkies they are only good for 1 thing... pushing them down flights of stairs

1529 mph = 4 109 952 furlongs per fortnight
  #5   Spotlight this post!  
Unread 14-01-2008, 15:57
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Mech Wheel Programing

Quote:
Originally Posted by whlspacedude View Post
Being new to "real' C programing (have a knowledge of BASIC) I really would like to have a .ecp file to look at. thanks for the other links!
http://www.chiefdelphi.com/forums/sh...ad.php?t=51704 should take care of this.

Good luck.
  #6   Spotlight this post!  
Unread 14-01-2008, 15:58
whlspacedude's Avatar
whlspacedude whlspacedude is offline
Registered User
AKA: Will
FRC #1529 (Cyber Cards)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Indianapolis,Indiana 46227
Posts: 167
whlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nicewhlspacedude is just really nice
Send a message via AIM to whlspacedude Send a message via MSN to whlspacedude Send a message via Yahoo to whlspacedude
Re: Mech Wheel Programing

THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
__________________
Some people are like slinkies they are only good for 1 thing... pushing them down flights of stairs

1529 mph = 4 109 952 furlongs per fortnight
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
paper: Rat Pack and Mech Warriors Match Scouting Sheet, Revised Lisa Perez Scouting 1 08-03-2006 09:00
Attn: Mech Designers, Beta Testers Needed! JVN General Forum 18 13-12-2005 20:59
pic: Chantilly Academy's 4 Wheel Drive 4 Wheel Steering!!!! jskene Robot Showcase 25 18-02-2005 20:24
CAD Help needed. Mech Desktop 6 files backwards to AutoCAD 14? (2d files) Elgin Clock Inventor 0 30-08-2004 23:06
need glp programing steering with a steering wheel Matchew Programming 2 10-02-2003 14:20


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

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