|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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? |
|
#2
|
||||
|
||||
|
Re: Mech Wheel Programing
Quote:
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; |
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
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!
|
|
#5
|
||||
|
||||
|
Re: Mech Wheel Programing
Quote:
Good luck. |
|
#6
|
||||
|
||||
|
Re: Mech Wheel Programing
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |